diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index 0e634e78fc..e6c5d3e882 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -44,13 +44,13 @@ #include "gtkorientable.h" #include "gtkscrolledwindow.h" #include "gtktextview.h" -#include "gtkfilelauncher.h" #include "gtkmain.h" #include "gtktogglebutton.h" #include "gtktypebuiltins.h" #include "gtkstack.h" #include "gtkstackswitcher.h" #include "gtksettings.h" +#include "gtkurilauncher.h" #include "gtkheaderbar.h" #include "gtkprivate.h" #include @@ -932,16 +932,13 @@ static gboolean gtk_about_dialog_activate_link (GtkAboutDialog *about, const char *uri) { - GtkFileLauncher *launcher; - GFile *file; + GtkUriLauncher *launcher; - file = g_file_new_for_uri (uri); - launcher = gtk_file_launcher_new (file); + launcher = gtk_uri_launcher_new (uri); - gtk_file_launcher_launch (launcher, GTK_WINDOW (about), NULL, NULL, NULL); + gtk_uri_launcher_launch (launcher, GTK_WINDOW (about), NULL, NULL, NULL); g_object_unref (launcher); - g_object_unref (file); return TRUE; } diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 6f3fbe449e..ee0c815d93 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -40,7 +40,6 @@ #include "gtkshortcut.h" #include "gtkshortcutcontroller.h" #include "gtkshortcuttrigger.h" -#include "gtkfilelauncher.h" #include "gtksnapshot.h" #include "gtkrenderbackgroundprivate.h" #include "gtkrenderborderprivate.h" @@ -48,6 +47,7 @@ #include "gtktextutilprivate.h" #include "gtktooltip.h" #include "gtktypebuiltins.h" +#include "gtkurilauncher.h" #include "gtkwidgetprivate.h" #include "gtkpopovermenu.h" #include "gtknative.h" @@ -2102,17 +2102,14 @@ gtk_label_activate_link (GtkLabel *self, { GtkWidget *widget = GTK_WIDGET (self); GtkWidget *toplevel = GTK_WIDGET (gtk_widget_get_root (widget)); - GFile *file; - GtkFileLauncher *launcher; + GtkUriLauncher *launcher; if (!GTK_IS_WINDOW (toplevel)) return FALSE; - file = g_file_new_for_uri (uri); - launcher = gtk_file_launcher_new (file); - gtk_file_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL); + launcher = gtk_uri_launcher_new (uri); + gtk_uri_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL); g_object_unref (launcher); - g_object_unref (file); return TRUE; } diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c index f8e27ca2d6..25ed3d2333 100644 --- a/gtk/gtklinkbutton.c +++ b/gtk/gtklinkbutton.c @@ -65,9 +65,9 @@ #include "gtkmarshalers.h" #include "gtkpopovermenu.h" #include "gtkprivate.h" -#include "gtkfilelauncher.h" #include "gtksizerequest.h" #include "gtktooltip.h" +#include "gtkurilauncher.h" #include "gtkwidgetprivate.h" #include @@ -479,16 +479,13 @@ static gboolean gtk_link_button_activate_link (GtkLinkButton *link_button) { GtkWidget *toplevel; - GFile *file; - GtkFileLauncher *launcher; + GtkUriLauncher *launcher; toplevel = GTK_WIDGET (gtk_widget_get_root (GTK_WIDGET (link_button))); - file = g_file_new_for_uri (link_button->uri); - launcher = gtk_file_launcher_new (file); - gtk_file_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL); + launcher = gtk_uri_launcher_new (link_button->uri); + gtk_uri_launcher_launch (launcher, GTK_WINDOW (toplevel), NULL, NULL, NULL); g_object_unref (launcher); - g_object_unref (file); gtk_link_button_set_visited (link_button, TRUE);