git://git.jankratochvil.net
/
captive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed/fortifie libgnomeui compatibility regarding modal dialogs closing.
[captive.git]
/
src
/
install
/
acquire
/
ui-gnome.c
diff --git
a/src/install/acquire/ui-gnome.c
b/src/install/acquire/ui-gnome.c
index
8f98f98
..
e6ffc43
100644
(file)
--- a/
src/install/acquire/ui-gnome.c
+++ b/
src/install/acquire/ui-gnome.c
@@
-36,6
+36,7
@@
#include <libgnomeui/gnome-druid-page-edge.h>
#include "final.h"
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomeui/gnome-druid-page-edge.h>
#include "final.h"
#include <libgnomevfs/gnome-vfs-utils.h>
+#include <libgnomeui/gnome-dialog.h>
#include <captive/macros.h>
#include <captive/captivemodid.h>
#include <captive/macros.h>
#include <captive/captivemodid.h>
@@
-614,11
+615,15
@@
gint reply;
(GnomeReplyCallback)on_DruidButtonOK_clicked_dialog_callback,
&reply); /* data */
g_signal_connect((gpointer)dialog,"close",G_CALLBACK(gtk_main_quit),NULL);
(GnomeReplyCallback)on_DruidButtonOK_clicked_dialog_callback,
&reply); /* data */
g_signal_connect((gpointer)dialog,"close",G_CALLBACK(gtk_main_quit),NULL);
+ /* It looks as if eariler libgnomeui had default TRUE
+ * but since libgnomeui-2.10.0 it is FALSE, weird.
+ */
+ gnome_dialog_set_close(GNOME_DIALOG(dialog),TRUE);
/* Never call gtk_main() from other thread than the initial one.
* We would have to switch GTK+ context (g_main_context()?).
*/
gtk_main();
/* Never call gtk_main() from other thread than the initial one.
* We would have to switch GTK+ context (g_main_context()?).
*/
gtk_main();
- /* 'dialog' gets destroyed automatically */
+ /* 'dialog' gets destroyed automatically
due to: gnome_dialog_set_close(,TRUE);
*/
if (reply==0) /* 0 for 'OK', 1 for 'Cancel', left -1 for dialog close. */
exit(EXIT_SUCCESS);
}
if (reply==0) /* 0 for 'OK', 1 for 'Cancel', left -1 for dialog close. */
exit(EXIT_SUCCESS);
}
@@
-745,9
+750,13
@@
GtkWidget *dialog;
dialog=gnome_app_message(App,message);
gtk_window_set_modal(GTK_WINDOW(dialog),TRUE);
dialog=gnome_app_message(App,message);
gtk_window_set_modal(GTK_WINDOW(dialog),TRUE);
+ /* It looks as if eariler libgnomeui had default TRUE
+ * but since libgnomeui-2.10.0 it is FALSE, weird.
+ */
+ gnome_dialog_set_close(GNOME_DIALOG(dialog),TRUE);
g_signal_connect((gpointer)dialog,"close",G_CALLBACK(gtk_main_quit),NULL);
gtk_main();
g_signal_connect((gpointer)dialog,"close",G_CALLBACK(gtk_main_quit),NULL);
gtk_main();
- /* 'dialog' gets destroyed automatically */
+ /* 'dialog' gets destroyed automatically
due to: gnome_dialog_set_close(,TRUE);
*/
gdk_flush();
gdk_threads_leave();
gdk_flush();
gdk_threads_leave();