[gnome-games] libgames-support: Set help error dialogue title to empty
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] libgames-support: Set help error dialogue title to empty
- Date: Thu, 9 Jul 2009 23:10:45 +0000 (UTC)
commit 6f0eeae57c4b4a5daab8c8ed4ad7468be07bea7d
Author: Christian Persch <chpe gnome org>
Date: Mon Jun 29 18:13:40 2009 +0200
libgames-support: Set help error dialogue title to empty
Except on Hildon (at least maemo3), where empty dialogue titles show
"<unnamed>".
libgames-support/games-help.c | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/libgames-support/games-help.c b/libgames-support/games-help.c
index 9461070..e6de0b1 100644
--- a/libgames-support/games-help.c
+++ b/libgames-support/games-help.c
@@ -194,17 +194,26 @@ err:
#endif
if (error != NULL) {
- GtkWidget *d;
- d = gtk_message_dialog_new (GTK_WINDOW (window),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
- "%s", _("Unable to open help file"));
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (d),
- "%s", error->message);
- g_signal_connect (d, "response", G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_window_present (GTK_WINDOW (d));
+ GtkWidget *dialog;
+ dialog = gtk_message_dialog_new (GTK_WINDOW (window),
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ "%s", _("Unable to open help file"));
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ "%s", error->message);
g_error_free (error);
+
+#ifdef HAVE_HILDON
+ /* Empty title shows up as "<unnamed>" on maemo */
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Error"));
+#else
+ gtk_window_set_title (GTK_WINDOW (dialog), "");
+#endif /* HAVE_HILDON */
+
+ g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+
+ gtk_window_present (GTK_WINDOW (dialog));
}
g_free (help_uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]