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).
This commit is contained in:
parent
d9dd7ba57b
commit
b8a3dc1505
1 changed files with 8 additions and 10 deletions
|
@ -68,7 +68,7 @@ web_radiobutton_toggled_cb (GtkWidget *togglebutton, GnomeDACapplet *capplet)
|
||||||
{
|
{
|
||||||
gint index;
|
gint index;
|
||||||
GnomeDAWebItem *item;
|
GnomeDAWebItem *item;
|
||||||
gchar *command;
|
const gchar *command;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
index = gtk_combo_box_get_active (GTK_COMBO_BOX (capplet->web_combo_box));
|
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;
|
return;
|
||||||
|
|
||||||
item = (GnomeDAWebItem *) g_list_nth_data (capplet->web_browsers, index);
|
item = (GnomeDAWebItem *) g_list_nth_data (capplet->web_browsers, index);
|
||||||
if (item == NULL) {
|
if (item == NULL)
|
||||||
command = "";
|
return;
|
||||||
}
|
|
||||||
else if (togglebutton == capplet->new_win_radiobutton) {
|
if (togglebutton == capplet->new_win_radiobutton) {
|
||||||
command = item->win_command;
|
command = item->win_command;
|
||||||
}
|
}
|
||||||
else if (togglebutton == capplet->new_tab_radiobutton) {
|
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)
|
||||||
{
|
{
|
||||||
/* if item was not found, this is probably the "Custom" item */
|
/* if item was not found, this is probably the "Custom" item */
|
||||||
|
gchar *c = gconf_client_get_string (capplet->gconf, DEFAULT_APPS_KEY_HTTP_EXEC, NULL);
|
||||||
/* XXX: returning "" as the value here is not ideal, but required to
|
gconf_value_set_string (ret, (c != NULL) ? c : "");
|
||||||
* prevent the combo box from jumping back to the previous value if the
|
g_free (c);
|
||||||
* user has selected Custom */
|
|
||||||
gconf_value_set_string (ret, "");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue