• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revisión02f73b72800626af4e1d77b33c9e1b516c0b3526 (tree)
Tiempo2004-04-13 22:30:15
AutorLars Clausen <lclausen@src....>
CommiterLars Clausen

Log Message

Disappearing toolbox fix

Cambiar Resumen

Diferencia incremental

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
1+2004-04-13 Lars Clausen <lc@pc770.sb.statsbiblioteket.dk>
2+
3+ * app/interface.c (toolbox_delete):
4+ * app/app_procs.[ch] (app_exit): Stop the delete event if the user
5+ cancels quit due to modified diagrams.
6+
17 2004-04-07 Samúel Jón Gunnarsson <sammi@techattack.nu>
28
39 * is.po: Added "is" to ALL_LINGUAS.
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -574,7 +574,7 @@ set_true_callback(GtkWidget *w, int *data)
574574 }
575575 #endif
576576
577-void
577+gboolean
578578 app_exit(void)
579579 {
580580 GList *list;
@@ -589,7 +589,7 @@ app_exit(void)
589589
590590 if (app_exit_once) {
591591 g_error(_("This shouldn't happen. Please file a bug report at bugzilla.gnome.org\ndescribing how you can cause this message to appear.\n"));
592- return;
592+ return FALSE;
593593 }
594594
595595 if (diagram_modified_exists()) {
@@ -618,7 +618,7 @@ app_exit(void)
618618
619619 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_OK) {
620620 gtk_widget_destroy(dialog);
621- return;
621+ return FALSE;
622622 }
623623 gtk_widget_destroy(dialog);
624624 }
@@ -661,6 +661,8 @@ app_exit(void)
661661 /* Yuck. -Lars */
662662 printf(_("Thank you for using Dia.\n"));
663663 app_exit_once = TRUE;
664+
665+ return TRUE;
664666 }
665667
666668 static void create_user_dirs(void)
--- a/app/app_procs.h
+++ b/app/app_procs.h
@@ -21,7 +21,11 @@
2121 #include <lib/filter.h>
2222
2323 void app_init(int argc, char **argv);
24-void app_exit(void);
24+/** Exit the application, but asking the user for confirmation
25+ * if there are changed diagrams.
26+ * Returns TRUE if the application exits.
27+ */
28+gboolean app_exit(void);
2529 int app_is_embedded(void);
2630
2731 gboolean do_convert(const char *infname,
--- a/app/interface.c
+++ b/app/interface.c
@@ -1135,7 +1135,7 @@ toolbox_destroy (GtkWidget *widget, gpointer data)
11351135 app_exit();
11361136 }
11371137
1138-static void
1138+static gboolean
11391139 toolbox_delete (GtkWidget *widget, GdkEvent *event, gpointer data)
11401140 {
11411141 if (!app_is_embedded()) {
@@ -1147,7 +1147,8 @@ toolbox_delete (GtkWidget *widget, GdkEvent *event, gpointer data)
11471147 g_signal_handler_disconnect (GTK_OBJECT (widget), handlerid);
11481148 prefs.recent_sheet = gtk_option_menu_get_history(GTK_OPTION_MENU(sheet_option_menu));
11491149
1150- app_exit();
1150+ /** If the app didn't exit, don't close the window */
1151+ return (!app_exit());
11511152 }
11521153 }
11531154