Revision: 1948 http://geany.svn.sourceforge.net/geany/?rev=1948&view=rev Author: eht16 Date: 2007-10-16 01:54:54 -0700 (Tue, 16 Oct 2007)
Log Message: ----------- Suppress selection changed signal when switching between open files and symbol list.
Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/callbacks.c trunk/src/callbacks.h trunk/src/interface.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-10-15 18:30:26 UTC (rev 1947) +++ trunk/ChangeLog 2007-10-16 08:54:54 UTC (rev 1948) @@ -1,3 +1,10 @@ +2007-10-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * geany.glade, src/callbacks.c, src/callbacks.h, src/interface.c: + Suppress selection changed signal when switching between open files + and symbol list. + + 2007-10-15 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* plugins/svndiff.c, plugins/Makefile.am, plugins/makefile.win32,
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2007-10-15 18:30:26 UTC (rev 1947) +++ trunk/geany.glade 2007-10-16 08:54:54 UTC (rev 1948) @@ -1962,6 +1962,7 @@ <property name="scrollable">True</property> <property name="enable_popup">False</property> <signal name="switch_page" handler="on_tv_notebook_switch_page" last_modification_time="Sun, 20 Nov 2005 00:41:15 GMT"/> + <signal name="switch_page" handler="on_tv_notebook_switch_page_after" after="yes" last_modification_time="Tue, 16 Oct 2007 07:03:41 GMT"/>
<child> <widget class="GtkScrolledWindow" id="scrolledwindow2">
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2007-10-15 18:30:26 UTC (rev 1947) +++ trunk/src/callbacks.c 2007-10-16 08:54:54 UTC (rev 1948) @@ -61,6 +61,7 @@ #include "tools.h" #include "project.h" #include "navqueue.h" +#include "printing.h"
#include "geanyobject.h"
@@ -806,11 +807,22 @@ guint page_num, gpointer user_data) { - //switch_tv_notebook_page = TRUE; + // suppress selection changed signal when switching to the open files list + app->ignore_callback = TRUE; }
void +on_tv_notebook_switch_page_after (GtkNotebook *notebook, + GtkNotebookPage *page, + guint page_num, + gpointer user_data) +{ + app->ignore_callback = FALSE; +} + + +void on_crlf_activate (GtkMenuItem *menuitem, gpointer user_data) { @@ -1604,7 +1616,9 @@ gpointer user_data) { gint idx = document_get_cur_idx(); - + if (! DOC_IDX_VALID(idx)) + return; + //printing_print_doc(idx); document_print(idx); }
Modified: trunk/src/callbacks.h =================================================================== --- trunk/src/callbacks.h 2007-10-15 18:30:26 UTC (rev 1947) +++ trunk/src/callbacks.h 2007-10-16 08:54:54 UTC (rev 1948) @@ -572,3 +572,9 @@ on_entry_goto_line_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data); + +void +on_tv_notebook_switch_page_after (GtkNotebook *notebook, + GtkNotebookPage *page, + guint page_num, + gpointer user_data);
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2007-10-15 18:30:26 UTC (rev 1947) +++ trunk/src/interface.c 2007-10-16 08:54:54 UTC (rev 1948) @@ -1581,6 +1581,9 @@ g_signal_connect ((gpointer) notebook3, "switch_page", G_CALLBACK (on_tv_notebook_switch_page), NULL); + g_signal_connect_after ((gpointer) notebook3, "switch_page", + G_CALLBACK (on_tv_notebook_switch_page_after), + NULL); g_signal_connect ((gpointer) notebook1, "switch_page", G_CALLBACK (on_notebook1_switch_page), NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.