[gnome-games] libgames-support: Use games_show_error here



commit 736a7a23a910aed26f6247bd1b0c935144cba98a
Author: Christian Persch <chpe gnome org>
Date:   Fri Jul 10 01:31:34 2009 +0200

    libgames-support: Use games_show_error here
    
    Remove this extra code and just use games_show_error().

 libgames-support/games-runtime.c |   21 +++------------------
 1 files changed, 3 insertions(+), 18 deletions(-)
---
diff --git a/libgames-support/games-runtime.c b/libgames-support/games-runtime.c
index e6ee19e..cb75234 100644
--- a/libgames-support/games-runtime.c
+++ b/libgames-support/games-runtime.c
@@ -268,25 +268,10 @@ about_url_hook (GtkAboutDialog *about,
   screen = gtk_widget_get_screen (GTK_WIDGET (about));
 
   if (!games_show_uri (screen, uri, gtk_get_current_event_time (), &error)) {
-    GtkWidget *dialog;
-
-    dialog = gtk_message_dialog_new (GTK_WINDOW (about),
-                                     GTK_DIALOG_DESTROY_WITH_PARENT |
-                                     GTK_DIALOG_MODAL,
-                                     GTK_MESSAGE_ERROR,
-                                     GTK_BUTTONS_CLOSE,
-                                     "%s", _("Could not show link"));
-    gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                              "%s", error->message);
+    games_show_error (GTK_WIDGET (about),
+                      error,
+                      "%s", _("Could not show link"));
     g_error_free (error);
-
-    gtk_window_set_title (GTK_WINDOW (dialog), "");
-    gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-
-    g_signal_connect (dialog, "response",
-                      G_CALLBACK (gtk_widget_destroy), NULL);
-
-    gtk_window_present (GTK_WINDOW (dialog));
   }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]