1
0

Accepting request 21879 from home:vuntz:branches:GNOME:Factory

Copy from home:vuntz:branches:GNOME:Factory/gnome-control-center via accept of submit request 21879 revision 30.

OBS-URL: https://build.opensuse.org/request/show/21879
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-control-center?expand=0&rev=50
This commit is contained in:
Vincent Untz 2009-10-05 22:28:07 +00:00 committed by Git OBS Bridge
parent d6dcb45df2
commit 08ef5f3826
3 changed files with 96 additions and 0 deletions

View File

@ -0,0 +1,86 @@
From f36a1c80f1b38a61cbee07e79462bddd41e0f996 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@gnome.org>
Date: Sat, 3 Oct 2009 10:14:24 +0200
Subject: [PATCH] [defaultapplications] Update the exec arg when changing terminal
When selecting a known terminal from the combo box, also update the exec
arg gconf key to the known value from the xml file.
https://bugzilla.gnome.org/show_bug.cgi?id=597185
---
capplets/default-applications/gnome-da-capplet.c | 52 ++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/capplets/default-applications/gnome-da-capplet.c b/capplets/default-applications/gnome-da-capplet.c
index 38fb9db..eed2690 100644
--- a/capplets/default-applications/gnome-da-capplet.c
+++ b/capplets/default-applications/gnome-da-capplet.c
@@ -573,6 +573,50 @@ combo_conv_from_widget (GConfPropertyEditor *peditor, const GConfValue *value)
}
}
+static GConfValue*
+combo_conv_from_widget_term_flag (GConfPropertyEditor *peditor, const GConfValue *value)
+{
+ GConfValue *ret;
+ GList *handlers;
+ gint index;
+ GnomeDATermItem *item;
+
+ g_object_get (G_OBJECT (peditor), "data", &handlers, NULL);
+ index = gconf_value_get_int (value);
+
+ item = g_list_nth_data (handlers, index);
+ ret = gconf_value_new (GCONF_VALUE_STRING);
+
+ 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, "");
+ return ret;
+ }
+ else
+ {
+ gconf_value_set_string (ret, item->exec_flag);
+ return ret;
+ }
+}
+
+static GConfValue*
+combo_conv_to_widget_term_flag (GConfPropertyEditor *peditor, const GConfValue *value)
+{
+ GConfValue *ret;
+ GtkComboBox *combo;
+
+ combo = GTK_COMBO_BOX (gconf_property_editor_get_ui_control (peditor));
+
+ ret = gconf_value_new (GCONF_VALUE_INT);
+ gconf_value_set_int (ret, gtk_combo_box_get_active (combo));
+ return ret;
+}
+
static gboolean
is_separator (GtkTreeModel *model, GtkTreeIter *iter, gpointer sep_index)
{
@@ -814,6 +858,14 @@ show_dialog (GnomeDACapplet *capplet, const gchar *start_page)
"data", capplet->terminals,
NULL);
+ gconf_peditor_new_combo_box (NULL,
+ DEFAULT_APPS_KEY_TERMINAL_EXEC_ARG,
+ capplet->term_combo_box,
+ "conv-from-widget-cb", combo_conv_from_widget_term_flag,
+ "conv-to-widget-cb", combo_conv_to_widget_term_flag,
+ "data", capplet->terminals,
+ NULL);
+
gconf_peditor_new_string (NULL,
DEFAULT_APPS_KEY_TERMINAL_EXEC,
capplet->terminal_command_entry,
--
1.6.4.2

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Oct 3 10:20:28 CEST 2009 - vuntz@opensuse.org
- Add gnome-control-center-default-app-xterm.patch to correctly set
the exec arg gconf key when changing the preferred terminal. Fix
bnc#544006.
-------------------------------------------------------------------
Mon Sep 21 23:22:55 CEST 2009 - dimstar@opensuse.org

View File

@ -53,6 +53,8 @@ Patch28: gnome-control-center-use-settings-menu.patch
Patch30: gnome-control-center-bnc373197-layout-switch-keybinding.patch
# PATCH-FIX-UPSTREAM gnome-control-center-bnc436206-add-to-default.patch bnc436206 sreeves@novell.com -- Add groupwise to defaults list
Patch31: gnome-control-center-bnc436206-add-to-default.patch
# PATCH-FIX-UPSTREAM gnome-control-center-default-app-xterm.patch bnc544006 bgo597185 vuntz@opensuse.org -- exec_arg key wasn't set when changing the terminal
Patch32: gnome-control-center-default-app-xterm.patch
Url: http://www.gnome.org
Requires: nautilus gnome-settings-daemon gnome-menus libcanberra-gtk
Requires: %{name}-lang = %{version}
@ -106,6 +108,7 @@ of window managers.
%patch28
%patch30 -p1
%patch31 -p1
%patch32 -p1
%build
autoreconf -f -i