Mercurial > pidgin
diff pidgin/gtkprefs.c @ 32716:4f8626d4ef63
propagate from branch 'im.pidgin.pidgin' (head deb06ab6aa118efb674f1a8434ff529e67b28809)
to branch 'im.pidgin.cpw.qulogic.gtk3' (head 34c3103eabae4a4c23439048d383f73c94dfd23e)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Thu, 23 Feb 2012 08:13:23 +0000 |
parents | 7df79e0d1150 3f81e3c3064c |
children | e53eb11ff985 |
line wrap: on
line diff
--- a/pidgin/gtkprefs.c Sat Jan 21 12:02:41 2012 +0000 +++ b/pidgin/gtkprefs.c Thu Feb 23 08:13:23 2012 +0000 @@ -1859,11 +1859,11 @@ #ifndef _WIN32 static void -browser_button_clicked_cb(GtkWidget *button, gpointer null) +browser_button_clicked_cb(GtkWidget *button, gchar *path) { GError *err = NULL; - if (g_spawn_command_line_async ("gnome-default-applications-properties", &err)) + if (g_spawn_command_line_async(path, &err)) return; purple_notify_error(NULL, NULL, _("Cannot start browser configuration program."), err->message); @@ -2134,8 +2134,8 @@ vbox = pidgin_make_frame (ret, _("Browser Selection")); - if(purple_running_gnome()) { - gchar *path = g_find_program_in_path("gnome-default-applications-properties"); + if (purple_running_gnome()) { + gchar *path; hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); label = gtk_label_new(_("Browser preferences are configured in GNOME preferences")); @@ -2145,19 +2145,28 @@ hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); gtk_container_add(GTK_CONTAINER(vbox), hbox); - if(path == NULL) { + path = g_find_program_in_path("gnome-control-center"); + if (path != NULL) { + gchar *tmp = g_strdup_printf("%s info", path); + g_free(path); + path = tmp; + } else { + path = g_find_program_in_path("gnome-default-applications-properties"); + } + + if (path == NULL) { label = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(label), _("<b>Browser configuration program was not found.</b>")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); } else { browser_button = gtk_button_new_with_mnemonic(_("Configure _Browser")); - g_signal_connect(G_OBJECT(browser_button), "clicked", - G_CALLBACK(browser_button_clicked_cb), NULL); + g_signal_connect_data(G_OBJECT(browser_button), "clicked", + G_CALLBACK(browser_button_clicked_cb), path, + (GClosureNotify)g_free, 0); gtk_box_pack_start(GTK_BOX(hbox), browser_button, FALSE, FALSE, 0); } - g_free(path); gtk_widget_show_all(ret); } else { sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);