pidgin: deb06ab6: Fix the Browser prefs on GNOME3. Unfortu...
qulogic at pidgin.im
qulogic at pidgin.im
Thu Feb 23 04:06:30 EST 2012
----------------------------------------------------------------------
Revision: deb06ab6aa118efb674f1a8434ff529e67b28809
Parent: dbb13fdc163c45bf080c87a5f9da83602c39a53c
Author: qulogic at pidgin.im
Date: 02/23/12 03:12:03
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/deb06ab6aa118efb674f1a8434ff529e67b28809
Changelog:
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.
Changes against parent dbb13fdc163c45bf080c87a5f9da83602c39a53c
patched ChangeLog
patched pidgin/gtkprefs.c
-------------- next part --------------
============================================================
--- ChangeLog 1e7b3cfee52d7eb8bfcc2f8a68d27888327fbfe0
+++ ChangeLog b0ed7099b9c23d29fd8c2ffe88c5b887ca00d593
@@ -53,6 +53,8 @@ version 2.10.2 (02/22/2012):
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+.
============================================================
--- pidgin/gtkprefs.c 9b6586140f8b3f9205fb6469e0e48f4c1e358850
+++ pidgin/gtkprefs.c 5ed25135604bbaef5fbab7c4a8768ab8bda6d35d
@@ -1819,11 +1819,11 @@ static void
#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);
@@ -2094,8 +2094,8 @@ browser_page(void)
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"));
@@ -2105,19 +2105,28 @@ browser_page(void)
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);
More information about the Commits
mailing list