[gnome-software: 32/110] gs-app-translation-dialog: Use gtk_show_uri()




commit 95b5d2ebbb2126cb730dd9ff0e45738bdd1fc0c6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sun Aug 22 21:27:26 2021 -0300

    gs-app-translation-dialog: Use gtk_show_uri()

 src/gs-app-translation-dialog.c | 13 ++-----------
 src/gs-shell.c                  | 10 +---------
 2 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/src/gs-app-translation-dialog.c b/src/gs-app-translation-dialog.c
index 1f41eccee..81f278666 100644
--- a/src/gs-app-translation-dialog.c
+++ b/src/gs-app-translation-dialog.c
@@ -106,18 +106,9 @@ button_clicked_cb (GtkButton *button,
                    gpointer   user_data)
 {
        GsAppTranslationDialog *self = GS_APP_TRANSLATION_DIALOG (user_data);
-       g_autoptr(GError) error = NULL;
-       const gchar *url;
-
-       url = get_url_for_app (self->app);
+       const gchar *url = get_url_for_app (self->app);
 
-       if (!gtk_show_uri_on_window (GTK_WINDOW (self),
-                                    url,
-                                    GDK_CURRENT_TIME,
-                                    &error)) {
-               g_warning ("failed to show URI %s: %s",
-                          url, error->message);
-       }
+       gtk_show_uri (GTK_WINDOW (self), url, GDK_CURRENT_TIME);
 }
 
 static void
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 8cb123e5a..0d0de233e 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -2386,15 +2386,7 @@ gs_shell_show_search_result (GsShell *shell, const gchar *id, const gchar *searc
 void
 gs_shell_show_uri (GsShell *shell, const gchar *url)
 {
-       g_autoptr(GError) error = NULL;
-
-       if (!gtk_show_uri_on_window (GTK_WINDOW (shell),
-                                    url,
-                                    GDK_CURRENT_TIME,
-                                    &error)) {
-               g_warning ("failed to show URI %s: %s",
-                          url, error->message);
-       }
+       gtk_show_uri (GTK_WINDOW (shell), url, GDK_CURRENT_TIME);
 }
 
 /**


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