Revision: 1252 http://svn.sourceforge.net/geany/?rev=1252&view=rev Author: ntrel Date: 2007-02-06 09:39:19 -0800 (Tue, 06 Feb 2007)
Log Message: ----------- Fixed crashes when closing dialogs by clicking X on some systems.
Modified Paths: -------------- branches/geany-0.10.1/NEWS branches/geany-0.10.1/src/dialogs.c branches/geany-0.10.1/src/prefs.c branches/geany-0.10.1/src/prefs.h branches/geany-0.10.1/src/search.c
Modified: branches/geany-0.10.1/NEWS =================================================================== --- branches/geany-0.10.1/NEWS 2007-02-06 17:15:44 UTC (rev 1251) +++ branches/geany-0.10.1/NEWS 2007-02-06 17:39:19 UTC (rev 1252) @@ -2,6 +2,7 @@
Bugs fixed: * Wrong tab foreground colour for unmodified documents. + * Fixed crashes when closing dialogs by clicking X on some systems.
Geany 0.10 (December 21, 2006)
Modified: branches/geany-0.10.1/src/dialogs.c =================================================================== --- branches/geany-0.10.1/src/dialogs.c 2007-02-06 17:15:44 UTC (rev 1251) +++ branches/geany-0.10.1/src/dialogs.c 2007-02-06 17:39:19 UTC (rev 1252) @@ -126,7 +126,7 @@ g_signal_connect((gpointer) app->open_filesel, "selection-changed", G_CALLBACK(on_file_open_selection_changed), NULL); g_signal_connect ((gpointer) app->open_filesel, "delete_event", - G_CALLBACK(gtk_widget_hide), NULL); + G_CALLBACK(gtk_widget_hide_on_delete), NULL); g_signal_connect((gpointer) app->open_filesel, "response", G_CALLBACK(on_file_open_dialog_response), NULL); } @@ -266,8 +266,10 @@ gtk_window_set_type_hint(GTK_WINDOW(app->save_filesel), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_dialog_set_default_response(GTK_DIALOG(app->save_filesel), GTK_RESPONSE_ACCEPT);
- g_signal_connect((gpointer) app->save_filesel, "delete_event", G_CALLBACK(gtk_widget_hide), NULL); - g_signal_connect((gpointer) app->save_filesel, "response", G_CALLBACK(on_file_save_dialog_response), NULL); + g_signal_connect((gpointer) app->save_filesel, "delete_event", + G_CALLBACK(gtk_widget_hide_on_delete), NULL); + g_signal_connect((gpointer) app->save_filesel, "response", + G_CALLBACK(on_file_save_dialog_response), NULL);
gtk_window_set_transient_for(GTK_WINDOW(app->save_filesel), GTK_WINDOW(app->window)); } @@ -414,7 +416,7 @@ gtk_widget_show(GTK_FONT_SELECTION_DIALOG(app->open_fontsel)->apply_button);
g_signal_connect((gpointer) app->open_fontsel, - "delete_event", G_CALLBACK(gtk_widget_hide), NULL); + "delete_event", G_CALLBACK(gtk_widget_hide_on_delete), NULL); g_signal_connect((gpointer) GTK_FONT_SELECTION_DIALOG(app->open_fontsel)->ok_button, "clicked", G_CALLBACK(on_font_ok_button_clicked), NULL); g_signal_connect((gpointer) GTK_FONT_SELECTION_DIALOG(app->open_fontsel)->cancel_button, @@ -422,7 +424,8 @@ g_signal_connect((gpointer) GTK_FONT_SELECTION_DIALOG(app->open_fontsel)->apply_button, "clicked", G_CALLBACK(on_font_apply_button_clicked), NULL);
- gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(app->open_fontsel), app->editor_font); + gtk_font_selection_dialog_set_font_name( + GTK_FONT_SELECTION_DIALOG(app->open_fontsel), app->editor_font); gtk_window_set_transient_for(GTK_WINDOW(app->open_fontsel), GTK_WINDOW(app->window)); } /* We make sure the dialog is visible. */ @@ -545,7 +548,7 @@ g_signal_connect(GTK_COLOR_SELECTION_DIALOG(app->open_colorsel)->ok_button, "clicked", G_CALLBACK(on_color_ok_button_clicked), NULL); g_signal_connect(app->open_colorsel, "delete_event", - G_CALLBACK(gtk_widget_hide), NULL); + G_CALLBACK(gtk_widget_hide_on_delete), NULL); } // if colour is non-NULL set it in the dialog as preselected colour if (colour != NULL && (colour[0] == '0' || colour[0] == '#'))
Modified: branches/geany-0.10.1/src/prefs.c =================================================================== --- branches/geany-0.10.1/src/prefs.c 2007-02-06 17:15:44 UTC (rev 1251) +++ branches/geany-0.10.1/src/prefs.c 2007-02-06 17:39:19 UTC (rev 1252) @@ -671,14 +671,6 @@ }
-gboolean on_prefs_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data) -{ - gtk_widget_hide(widget); - - return TRUE; -} - - void on_prefs_color_choosed(GtkColorButton *widget, gpointer user_data) { GdkColor color; @@ -974,8 +966,10 @@ vte_append_preferences_tab(); #endif
- g_signal_connect((gpointer) app->prefs_dialog, "response", G_CALLBACK(on_prefs_button_clicked), NULL); - g_signal_connect((gpointer) app->prefs_dialog, "delete_event", G_CALLBACK(on_prefs_delete_event), NULL); + g_signal_connect((gpointer) app->prefs_dialog, "response", + G_CALLBACK(on_prefs_button_clicked), NULL); + g_signal_connect((gpointer) app->prefs_dialog, "delete_event", + G_CALLBACK(gtk_widget_hide_on_delete), NULL); g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "tagbar_font"), "font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(1)); g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "msgwin_font"),
Modified: branches/geany-0.10.1/src/prefs.h =================================================================== --- branches/geany-0.10.1/src/prefs.h 2007-02-06 17:15:44 UTC (rev 1251) +++ branches/geany-0.10.1/src/prefs.h 2007-02-06 17:39:19 UTC (rev 1252) @@ -27,8 +27,6 @@
void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_data);
-gboolean on_prefs_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data); - void on_prefs_font_choosed(GtkFontButton *widget, gpointer user_data);
void on_prefs_color_choosed(GtkColorButton *widget, gpointer user_data);
Modified: branches/geany-0.10.1/src/search.c =================================================================== --- branches/geany-0.10.1/src/search.c 2007-02-06 17:15:44 UTC (rev 1251) +++ branches/geany-0.10.1/src/search.c 2007-02-06 17:39:19 UTC (rev 1252) @@ -286,7 +286,7 @@ g_signal_connect((gpointer) widgets.find_dialog, "response", G_CALLBACK(on_find_dialog_response), entry); g_signal_connect((gpointer) widgets.find_dialog, "delete_event", - G_CALLBACK(gtk_widget_hide), NULL); + G_CALLBACK(gtk_widget_hide_on_delete), NULL);
sbox = gtk_hbox_new(FALSE, 6); gtk_box_pack_start(GTK_BOX(sbox), label, FALSE, FALSE, 0); @@ -416,7 +416,7 @@ g_signal_connect((gpointer) widgets.replace_dialog, "response", G_CALLBACK(on_replace_dialog_response), entry_replace); g_signal_connect((gpointer) widgets.replace_dialog, "delete_event", - G_CALLBACK(gtk_widget_hide), NULL); + G_CALLBACK(gtk_widget_hide_on_delete), NULL);
fbox = gtk_hbox_new(FALSE, 6); gtk_box_pack_start(GTK_BOX(fbox), label_find, FALSE, FALSE, 0); @@ -620,7 +620,7 @@ g_signal_connect((gpointer) widgets.find_in_files_dialog, "response", G_CALLBACK(on_find_in_files_dialog_response), combo); g_signal_connect((gpointer) widgets.find_in_files_dialog, "delete_event", - G_CALLBACK(gtk_widget_hide), NULL); + G_CALLBACK(gtk_widget_hide_on_delete), NULL);
gtk_widget_show_all(widgets.find_in_files_dialog); sel = get_default_text(idx);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.