SF.net SVN: geany: [924] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Oct 24 16:23:31 UTC 2006


Revision: 924
          http://svn.sourceforge.net/geany/?rev=924&view=rev
Author:   ntrel
Date:     2006-10-24 09:23:25 -0700 (Tue, 24 Oct 2006)

Log Message:
-----------
Change Messages and Compiler window to go to line with a single
click instead of double click.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c
    trunk/src/msgwindow.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-10-24 16:15:29 UTC (rev 923)
+++ trunk/ChangeLog	2006-10-24 16:23:25 UTC (rev 924)
@@ -6,6 +6,11 @@
    encoding or BOM changes.
    Add sci_is_modified().
    Added useful doc() function used only when debugging.
+ * src/search.c:
+   Reorder Replace All buttons.
+ * src/msgwindow.c src/callbacks.c:
+   Change Messages and Compiler window to go to line with a single
+   click instead of double click.
 
 
 2006-10-23  Enrico Tröger  <enrico.troeger at uvena.de>

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2006-10-24 16:15:29 UTC (rev 923)
+++ trunk/src/callbacks.c	2006-10-24 16:23:25 UTC (rev 924)
@@ -1335,25 +1335,30 @@
 {
 	// user_data might be NULL, GPOINTER_TO_INT returns 0 if called with NULL
 	
-	if (event->type == GDK_2BUTTON_PRESS)
+	if (event->button == 1)
 	{
-		if (GPOINTER_TO_INT(user_data) == MSG_MESSAGE)
-		{	// double click in the message treeview (results of 'Find usage')
-			msgwin_goto_messages_file_line();
+		switch (GPOINTER_TO_INT(user_data))
+		{
+			case TREEVIEW_SYMBOL:
+			{	// allow reclicking of taglist treeview item
+				GtkTreeSelection *select =
+					gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
+				on_taglist_tree_selection_changed(select, NULL);
+				break;
+			}
+			case MSG_COMPILER:
+			{	// single click in the compiler treeview
+				msgwin_goto_compiler_file_line();
+				break;
+			}
+			case MSG_MESSAGE:
+			{	// single click in the message treeview (results of 'Find usage')
+				msgwin_goto_messages_file_line();
+				break;
+			}
 		}
-		else if (GPOINTER_TO_INT(user_data) == MSG_COMPILER)
-		{	// double click in the compiler treeview
-			msgwin_goto_compiler_file_line();
-		}
 	}
 
-	if (event->button == 1 && GPOINTER_TO_INT(user_data) == TREEVIEW_SYMBOL)
-	{	// allow reclicking of taglist treeview item
-		GtkTreeSelection *select =
-			gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
-		on_taglist_tree_selection_changed(select, NULL);
-	}
-
 	if (event->button == 3)
 	{	// popupmenu to hide or clear the active treeview
 		if (GPOINTER_TO_INT(user_data) == MSG_STATUS)

Modified: trunk/src/msgwindow.c
===================================================================
--- trunk/src/msgwindow.c	2006-10-24 16:15:29 UTC (rev 923)
+++ trunk/src/msgwindow.c	2006-10-24 16:23:25 UTC (rev 924)
@@ -113,7 +113,8 @@
 	gtk_tree_view_set_enable_search(GTK_TREE_VIEW(msgwindow.tree_msg), FALSE);
 
 	gtk_widget_modify_font(msgwindow.tree_msg, pango_font_description_from_string(app->msgwin_font));
-	g_signal_connect(G_OBJECT(msgwindow.tree_msg), "button-press-event",
+	// use button-release-event so the selection has changed (connect_after button-press-event doesn't work)
+	g_signal_connect(G_OBJECT(msgwindow.tree_msg), "button-release-event",
 					G_CALLBACK(on_tree_view_button_press_event), GINT_TO_POINTER(MSG_MESSAGE));
 
 	// selection handling
@@ -140,7 +141,8 @@
 	gtk_tree_view_set_enable_search(GTK_TREE_VIEW(msgwindow.tree_compiler), FALSE);
 
 	gtk_widget_modify_font(msgwindow.tree_compiler, pango_font_description_from_string(app->msgwin_font));
-	g_signal_connect(G_OBJECT(msgwindow.tree_compiler), "button-press-event",
+	// use button-release-event so the selection has changed (connect_after button-press-event doesn't work)
+	g_signal_connect(G_OBJECT(msgwindow.tree_compiler), "button-release-event",
 					G_CALLBACK(on_tree_view_button_press_event), GINT_TO_POINTER(MSG_COMPILER));
 
 	// selection handling


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list