diff options
author | jstebbins <[email protected]> | 2010-02-23 00:06:22 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-02-23 00:06:22 +0000 |
commit | 0df7722d93ee1eda7eda1d86745fea2b6df19933 (patch) | |
tree | a1e30a7d5cfd55b6c1b6247d12cdff2c77aa0ea9 /gtk/src/settings.c | |
parent | 0a08b6778fa3dc2c38379d72252f23671e02e3c7 (diff) |
LinGui: fix a bunch of brokenness on Ubuntu 10.04 (lucid)
gtk 2.19 has changed how object id's are stored by gtkbuilder.
The widget name is no longer assigned to the builder object id. Instead
the id is stored in a special property. Getting incorrect object id's
caused all settings values to be referenced incorrectly.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3135 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/settings.c')
-rw-r--r-- | gtk/src/settings.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gtk/src/settings.c b/gtk/src/settings.c index 4bafd9b2d..cc9ae4bc8 100644 --- a/gtk/src/settings.c +++ b/gtk/src/settings.c @@ -179,17 +179,14 @@ ghb_settings_combo_string(const GValue *settings, const gchar *key) // Map widget names to setting keys // Widgets that map to settings have names // of this format: s_<setting key> -static const gchar* -get_setting_key(GtkWidget *widget) +const gchar* +ghb_get_setting_key(GtkWidget *widget) { const gchar *name; g_debug("get_setting_key ()\n"); if (widget == NULL) return NULL; - if (GTK_IS_ACTION(widget)) - name = gtk_action_get_name(GTK_ACTION(widget)); - else - name = gtk_widget_get_name(widget); + name = gtk_buildable_get_name(GTK_BUILDABLE(widget)); if (name == NULL) { @@ -214,10 +211,7 @@ ghb_widget_value(GtkWidget *widget) } type = GTK_WIDGET_TYPE(widget); - if (GTK_IS_ACTION(widget)) - name = gtk_action_get_name(GTK_ACTION(widget)); - else - name = gtk_widget_get_name(widget); + name = ghb_get_setting_key(widget); g_debug("ghb_widget_value widget (%s)\n", name); if (type == GTK_TYPE_ENTRY) { @@ -442,7 +436,7 @@ ghb_widget_to_setting(GValue *settings, GtkWidget *widget) if (widget == NULL) return; g_debug("ghb_widget_to_setting"); // Find corresponding setting - key = get_setting_key(widget); + key = ghb_get_setting_key(widget); if (key == NULL) return; value = ghb_widget_value(widget); if (value != NULL) |