summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--ChangeLog.pre-2-103
-rw-r--r--gtk/gtkmain.c17
3 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c353622d5..22b99c4abc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2006-03-06 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkmain.c (post_parse_hook): Set error when returning
+ FALSE. (#333268, Paolo Maggi, Christian Persch)
+
* gtk/gtkpixmap.c (gtk_pixmap_set): Check that the pixmap
has the right depth. (#333363, Ed Catmur)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 6c353622d5..22b99c4abc 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,8 @@
2006-03-06 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkmain.c (post_parse_hook): Set error when returning
+ FALSE. (#333268, Paolo Maggi, Christian Persch)
+
* gtk/gtkpixmap.c (gtk_pixmap_set): Check that the pixmap
has the right depth. (#333363, Ed Catmur)
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index d31dbce25f..3d767c12cf 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -550,9 +550,20 @@ post_parse_hook (GOptionContext *context,
do_post_parse_initialization (NULL, NULL);
if (info->open_default_display)
- return gdk_display_open_default_libgtk_only () != NULL;
- else
- return TRUE;
+ {
+ if (gdk_display_open_default_libgtk_only () == NULL)
+ {
+ g_set_error (error,
+ G_OPTION_ERROR,
+ G_OPTION_ERROR_FAILED,
+ "cannot open display: %s",
+ gdk_get_display_arg_name ());
+
+ return FALSE;
+ }
+ }
+
+ return TRUE;
}