SF.net SVN: geany: [905] trunk/src
eht16 at users.sourceforge.net
eht16 at xxxxx
Thu Oct 19 13:20:03 UTC 2006
Revision: 905
http://svn.sourceforge.net/geany/?rev=905&view=rev
Author: eht16
Date: 2006-10-19 06:19:58 -0700 (Thu, 19 Oct 2006)
Log Message:
-----------
Keep treeview enum values in sync with the notebook page numbers.
Modified Paths:
--------------
trunk/src/callbacks.c
trunk/src/geany.h
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2006-10-18 20:48:54 UTC (rev 904)
+++ trunk/src/callbacks.c 2006-10-19 13:19:58 UTC (rev 905)
@@ -1402,7 +1402,9 @@
GdkEventButton *event,
gpointer user_data)
{
- if (event->type == GDK_2BUTTON_PRESS && user_data)
+ // user_data might be NULL, GPOINTER_TO_INT returns 0 if called with NULL
+
+ if (event->type == GDK_2BUTTON_PRESS)
{
if (GPOINTER_TO_INT(user_data) == MSG_MESSAGE)
{ // double click in the message treeview (results of 'Find usage')
@@ -1414,14 +1416,14 @@
}
}
- if (event->button == 1 && user_data && GPOINTER_TO_INT(user_data) == TREEVIEW_SYMBOL)
+ 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, user_data);
+ on_taglist_tree_selection_changed(select, NULL);
}
- if (user_data && event->button == 3)
+ if (event->button == 3)
{ // popupmenu to hide or clear the active treeview
if (GPOINTER_TO_INT(user_data) == MSG_STATUS)
gtk_menu_popup(GTK_MENU(msgwindow.popup_status_menu), NULL, NULL, NULL, NULL, event->button, event->time);
Modified: trunk/src/geany.h
===================================================================
--- trunk/src/geany.h 2006-10-18 20:48:54 UTC (rev 904)
+++ trunk/src/geany.h 2006-10-19 13:19:58 UTC (rev 905)
@@ -212,7 +212,7 @@
enum
{
- MSG_STATUS = 1,
+ MSG_STATUS = 0, // force it to start at 0 to keep in sync with the notebook page numbers
MSG_COMPILER,
MSG_MESSAGE,
MSG_SCRATCH,
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