summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2010-04-08 13:51:24 +0100
committerBastien Nocera <hadess@hadess.net>2010-04-08 13:51:24 +0100
commit2082669fb983e9a0ae79b99ef585691c25ee54af (patch)
tree029bd2741f5103456818f46be63c06e6b33f069d /src
parent4150fa8888acb322323ffc1a65c224c2080a78a8 (diff)
downloadtotem-2082669fb983e9a0ae79b99ef585691c25ee54af.tar.gz
Don't handle GtkLinkButton cliking ourselves
GtkLinkButton already calls gtk_show_uri() itself when clicked, so no need to handle it ourselves. Should fix 2 web pages popping up (once for the URI hook, once for click handler), and avoid quoting problems. https://bugzilla.gnome.org/show_bug.cgi?id=612579
Diffstat (limited to 'src')
-rw-r--r--src/totem-interface.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/totem-interface.c b/src/totem-interface.c
index 87f5a9194..c877cb60d 100644
--- a/src/totem-interface.c
+++ b/src/totem-interface.c
@@ -122,40 +122,6 @@ totem_interface_error_blocking (const char *title, const char *reason,
gtk_widget_destroy (error_dialog);
}
-static void
-link_button_clicked_cb (GtkWidget *widget, Totem *totem)
-{
- const char *uri;
- char *command, *browser, *escaped_uri;
- GError *error = NULL;
-
- uri = gtk_link_button_get_uri (GTK_LINK_BUTTON (widget));
- escaped_uri = g_shell_quote (uri);
- browser = gconf_client_get_string (totem->gc, "/desktop/gnome/url-handlers/http/command", NULL);
-
- if (browser == NULL || browser[0] == '\0') {
- char *message;
-
- message = g_strdup_printf(_("Could not launch URL \"%s\": %s"), uri, _("Default browser not configured"));
- totem_interface_error (_("Error launching URI"), message, GTK_WINDOW (totem->win));
- g_free (message);
- } else {
- char *message;
-
- command = g_strdup_printf (browser, escaped_uri);
- if (g_spawn_command_line_async ((const char*) command, &error) == FALSE) {
- message = g_strdup_printf(_("Could not launch URL \"%s\": %s"), uri, error->message);
- totem_interface_error (_("Error launching URI"), message, GTK_WINDOW (totem->win));
- g_free (message);
- g_error_free (error);
- }
- g_free (command);
- }
-
- g_free (escaped_uri);
- g_free (browser);
-}
-
/**
* totem_interface_error_with_link:
* @title: the error title
@@ -179,7 +145,6 @@ totem_interface_error_with_link (const char *title, const char *reason,
error_dialog = totem_interface_error_dialog (title, reason, parent);
link_button = gtk_link_button_new_with_label (uri, label);
- g_signal_connect (G_OBJECT (link_button), "clicked", G_CALLBACK (link_button_clicked_cb), totem);
hbox = gtk_hbox_new (TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), link_button, FALSE, FALSE, 0);