Revision: 365 Author: ntrel Date: 2006-05-26 05:22:39 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=365&view=rev
Log Message: ----------- Fixed nasty hang when closing a tab and both the next tab and the first tab files have been externally modified
Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/callbacks.c trunk/src/callbacks.h trunk/src/interface.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-05-25 15:32:03 UTC (rev 364) +++ trunk/ChangeLog 2006-05-26 12:22:39 UTC (rev 365) @@ -1,3 +1,10 @@ +2006-05-26 Nick Treleaven nick.treleaven@btinternet.com + + * src/interface.c, src/callbacks.c, src/callbacks.h, geany.glade: + Fixed nasty hang when closing a tab and both the next tab and the + first tab files have been externally modified. + + 2006-05-25 Nick Treleaven nick.treleaven@btinternet.com
* src/document.c: On loading use SCI_SETTEXT instead of SCI_ADDTEXT
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2006-05-25 15:32:03 UTC (rev 364) +++ trunk/geany.glade 2006-05-26 12:22:39 UTC (rev 365) @@ -1520,6 +1520,7 @@ <property name="scrollable">True</property> <property name="enable_popup">True</property> <signal name="switch_page" handler="on_notebook1_switch_page" last_modification_time="Sat, 23 Apr 2005 15:17:51 GMT"/> + <signal name="switch_page" handler="on_notebook1_switch_page_after" after="yes" last_modification_time="Fri, 26 May 2006 11:47:25 GMT"/> </widget> <packing> <property name="shrink">True</property>
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2006-05-25 15:32:03 UTC (rev 364) +++ trunk/src/callbacks.c 2006-05-26 12:22:39 UTC (rev 365) @@ -692,7 +692,6 @@ utils_update_statusbar(idx, -1); utils_set_window_title(idx); utils_update_tag_list(idx, FALSE); - utils_check_disk_status(idx);
switch_notebook_page = FALSE; } @@ -700,6 +699,29 @@
void +on_notebook1_switch_page_after (GtkNotebook *notebook, + GtkNotebookPage *page, + guint page_num, + gpointer user_data) +{ + gint idx; + + if (closing_all) return; + + // guint == -1 seems useless, but it isn't! + if (page_num == -1 && page != NULL) + idx = document_find_by_sci(SCINTILLA(page)); + else + idx = document_get_n_idx(page_num); + + if (idx >= 0 && app->opening_session_files == FALSE) + { + utils_check_disk_status(idx); + } +} + + +void on_tv_notebook_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num,
Modified: trunk/src/callbacks.h =================================================================== --- trunk/src/callbacks.h 2006-05-25 15:32:03 UTC (rev 364) +++ trunk/src/callbacks.h 2006-05-26 12:22:39 UTC (rev 365) @@ -570,3 +570,9 @@ void on_go_to_line1_activate (GtkMenuItem *menuitem, gpointer user_data); + +void +on_notebook1_switch_page_after (GtkNotebook *notebook, + GtkNotebookPage *page, + guint page_num, + gpointer user_data);
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2006-05-25 15:32:03 UTC (rev 364) +++ trunk/src/interface.c 2006-05-26 12:22:39 UTC (rev 365) @@ -1163,6 +1163,9 @@ g_signal_connect ((gpointer) notebook1, "switch_page", G_CALLBACK (on_notebook1_switch_page), NULL); + g_signal_connect_after ((gpointer) notebook1, "switch_page", + G_CALLBACK (on_notebook1_switch_page_after), + NULL);
atko = gtk_widget_get_accessible (window1); atk_object_set_name (atko, _("Geany"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.