summaryrefslogtreecommitdiff
path: root/capplets/appearance/appearance-ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/appearance/appearance-ui.c')
-rw-r--r--capplets/appearance/appearance-ui.c91
1 files changed, 1 insertions, 90 deletions
diff --git a/capplets/appearance/appearance-ui.c b/capplets/appearance/appearance-ui.c
index 04b8a49e..00427e96 100644
--- a/capplets/appearance/appearance-ui.c
+++ b/capplets/appearance/appearance-ui.c
@@ -50,21 +50,6 @@ show_handlebar (AppearanceData *data, gboolean show)
g_object_unref (toolbar);
}
-#if !GTK_CHECK_VERSION (3, 10, 0)
-static void
-set_toolbar_style (AppearanceData *data, const char *value)
-{
- static const GtkToolbarStyle gtk_toolbar_styles[] =
- { GTK_TOOLBAR_BOTH, GTK_TOOLBAR_BOTH_HORIZ, GTK_TOOLBAR_ICONS, GTK_TOOLBAR_TEXT };
-
- int enum_val = gtk_combo_box_get_active((GtkComboBox *)
- appearance_capplet_get_widget (data, "toolbar_style_select"));
-
- gtk_toolbar_set_style (GTK_TOOLBAR (appearance_capplet_get_widget (data, "toolbar_toolbar")),
- gtk_toolbar_styles[enum_val]);
-}
-#endif
-
static void
set_have_icons (AppearanceData *data, gboolean value)
{
@@ -101,48 +86,6 @@ set_have_icons (AppearanceData *data, gboolean value)
}
}
-/** GConf Callbacks and Conversions **/
-
-#if !GTK_CHECK_VERSION (3, 10, 0)
-static gboolean
-toolbar_to_widget (GValue *value, GVariant *variant, gpointer user_data)
-{
- const gchar *val = g_variant_get_string(variant, NULL);
- gint i = 0;
-
- if (g_strcmp0(val, "both-horiz") == 0 || g_strcmp0(val, "both_horiz") == 0)
- i = 1;
- else if (g_strcmp0(val, "icons") == 0)
- i = 2;
- else if (g_strcmp0(val, "text") == 0)
- i = 3;
-
- g_value_set_int(value, i);
-
- return TRUE;
-}
-
-static GVariant *
-toolbar_from_widget (const GValue *value,
- const GVariantType *expected_type,
- gpointer user_data)
-{
- static const char *gtk_toolbar_styles_str[] = {
- "both", "both-horiz", "icons", "text" };
-
- gint index = g_value_get_int(value);
- return g_variant_new_string(gtk_toolbar_styles_str[index]);
-}
-
-static void
-toolbar_style_cb (GSettings *settings,
- gchar *key,
- AppearanceData *data)
-{
- set_toolbar_style (data, g_settings_get_string (settings, key));
-}
-#endif
-
static void
menus_have_icons_cb (GSettings *settings,
gchar *key,
@@ -176,7 +119,7 @@ ui_init (AppearanceData *data)
{
GtkWidget* widget;
-#if GTK_CHECK_VERSION (3, 10, 0)
+ /* FIXME maybe just remove that stuff from .ui file */
GtkWidget* container = appearance_capplet_get_widget(data, "vbox24");
// Remove menu accels and toolbar style toggles for new GTK versions
@@ -184,7 +127,6 @@ ui_init (AppearanceData *data)
appearance_capplet_get_widget(data, "menu_accel_toggle"));
gtk_container_remove((GtkContainer *) container,
appearance_capplet_get_widget(data, "hbox11"));
-#endif
widget = appearance_capplet_get_widget(data, "menu_icons_toggle");
g_settings_bind (data->interface_settings,
@@ -199,37 +141,6 @@ ui_init (AppearanceData *data)
g_settings_get_boolean (data->interface_settings,
MENU_ICONS_KEY));
-#if !GTK_CHECK_VERSION (3, 10, 0)
- widget = appearance_capplet_get_widget(data, "menu_accel_toggle");
- g_settings_bind (data->interface_settings,
- ACCEL_CHANGE_KEY,
- G_OBJECT (widget),
- "active",
- G_SETTINGS_BIND_DEFAULT);
-
- widget = appearance_capplet_get_widget(data, "toolbar_style_select");
- g_settings_bind_with_mapping (data->interface_settings,
- TOOLBAR_STYLE_KEY,
- G_OBJECT (widget),
- "active",
- G_SETTINGS_BIND_DEFAULT,
- toolbar_to_widget,
- toolbar_from_widget,
- data,
- NULL);
-
- g_signal_connect (data->interface_settings, "changed::" TOOLBAR_STYLE_KEY,
- (GCallback) toolbar_style_cb, data);
-
- char* toolbar_style;
-
- toolbar_style = g_settings_get_string
- (data->interface_settings,
- TOOLBAR_STYLE_KEY);
- set_toolbar_style (data, toolbar_style);
- g_free (toolbar_style);
-#endif
-
g_signal_connect (appearance_capplet_get_widget (data, "toolbar_handlebox"),
"button_press_event",
(GCallback) button_press_block_cb, NULL);