# HG changeset patch # User Elliott Sales de Andrade # Date 1329984781 0 # Node ID fd4a16fdb7aef0e756bc68d61151f7d40cd85eae # Parent 9f580e02d1e71d6b7648f1952d27a4f0dc67e45b *** Plucked rev deb06ab6aa118efb674f1a8434ff529e67b28809 (qulogic@pidgin.im): Fix the Browser prefs on GNOME3. Unfortunately, there doesn't seem to be a way to go directly to the Default Applications screen, but we'll have to settle for the System Information panel. diff -r 9f580e02d1e7 -r fd4a16fdb7ae ChangeLog --- a/ChangeLog Wed Feb 22 05:54:38 2012 +0000 +++ b/ChangeLog Thu Feb 23 08:13:01 2012 +0000 @@ -8,6 +8,8 @@ Pidgin: * Add support for the GNOME3 Network dialog. (#13882) * Fix rare crash. (#14392) + * Add support for the GNOME3 Default Application dialog for configuring + the Browser. libpurple: * Support new connection states and signals for NetworkManager 0.9+. diff -r 9f580e02d1e7 -r fd4a16fdb7ae pidgin/gtkprefs.c --- a/pidgin/gtkprefs.c Wed Feb 22 05:54:38 2012 +0000 +++ b/pidgin/gtkprefs.c Thu Feb 23 08:13:01 2012 +0000 @@ -1660,11 +1660,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); @@ -1935,8 +1935,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")); @@ -1946,19 +1946,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), _("Browser configuration program was not found.")); 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);