[gnome-control-center] Don't clear the custom browser command on startup
- From: Jens Granseuer <jensg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Don't clear the custom browser command on startup
- Date: Sat, 1 Aug 2009 15:40:08 +0000 (UTC)
commit b8a3dc1505b1a91e4b07dd8fac30f7658c4e9d85
Author: Jens Granseuer <jensgr gmx net>
Date: Sat Aug 1 17:31:02 2009 +0200
Don't clear the custom browser command on startup
When a custom browser command was set we would clear that command
when the capplet was restarted. As a side effect of no longer
doing that, we now use the last used browser command as the
starting point instead of an empty commmand (bug #590316).
capplets/default-applications/gnome-da-capplet.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/capplets/default-applications/gnome-da-capplet.c b/capplets/default-applications/gnome-da-capplet.c
index 2f3c3a8..38fb9db 100644
--- a/capplets/default-applications/gnome-da-capplet.c
+++ b/capplets/default-applications/gnome-da-capplet.c
@@ -68,7 +68,7 @@ web_radiobutton_toggled_cb (GtkWidget *togglebutton, GnomeDACapplet *capplet)
{
gint index;
GnomeDAWebItem *item;
- gchar *command;
+ const gchar *command;
GError *error = NULL;
index = gtk_combo_box_get_active (GTK_COMBO_BOX (capplet->web_combo_box));
@@ -77,10 +77,10 @@ web_radiobutton_toggled_cb (GtkWidget *togglebutton, GnomeDACapplet *capplet)
return;
item = (GnomeDAWebItem *) g_list_nth_data (capplet->web_browsers, index);
- if (item == NULL) {
- command = "";
- }
- else if (togglebutton == capplet->new_win_radiobutton) {
+ if (item == NULL)
+ return;
+
+ if (togglebutton == capplet->new_win_radiobutton) {
command = item->win_command;
}
else if (togglebutton == capplet->new_tab_radiobutton) {
@@ -492,11 +492,9 @@ web_combo_conv_from_widget (GConfPropertyEditor *peditor, const GConfValue *valu
if (!item)
{
/* if item was not found, this is probably the "Custom" item */
-
- /* XXX: returning "" as the value here is not ideal, but required to
- * prevent the combo box from jumping back to the previous value if the
- * user has selected Custom */
- gconf_value_set_string (ret, "");
+ gchar *c = gconf_client_get_string (capplet->gconf, DEFAULT_APPS_KEY_HTTP_EXEC, NULL);
+ gconf_value_set_string (ret, (c != NULL) ? c : "");
+ g_free (c);
return ret;
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]