summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-02-19 00:50:41 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-02-19 00:50:41 +0800
commitc71ad82a51c539a83e51b08eb0ace43cbff443ca (patch)
tree0f871a4fae6dea90ec4fe4064db0f3b509bbe6e9
parent14bd863ea1cefe28de156dcf15f71a2a93c42219 (diff)
downloadcompiz-with-glib-mainloop-c71ad82a51c539a83e51b08eb0ace43cbff443ca.tar.gz
compiz-with-glib-mainloop-c71ad82a51c539a83e51b08eb0ace43cbff443ca.tar.bz2
Cleanup init_settings some more, move the switcher stuff out into the
frame ctor and move USE_GCONF into one big ifdef
-rw-r--r--gtk/window-decorator/settings.c27
-rw-r--r--gtk/window-decorator/switcher.c6
2 files changed, 9 insertions, 24 deletions
diff --git a/gtk/window-decorator/settings.c b/gtk/window-decorator/settings.c
index 57ea766..2bdb0cc 100644
--- a/gtk/window-decorator/settings.c
+++ b/gtk/window-decorator/settings.c
@@ -468,9 +468,6 @@ value_changed (GConfClient *client,
gboolean
init_settings (WnckScreen *screen)
{
- AtkObject *switcher_label_obj;
- decor_frame_t *switcher_frame = gwd_get_decor_frame ("switcher");
-
#ifdef USE_GCONF
GConfClient *gconf;
@@ -490,31 +487,13 @@ init_settings (WnckScreen *screen)
"value_changed",
G_CALLBACK (value_changed),
screen);
-#endif
-
- switcher_label = gtk_label_new ("");
- switcher_label_obj = gtk_widget_get_accessible (switcher_label);
- atk_object_set_role (switcher_label_obj, ATK_ROLE_STATUSBAR);
- gtk_container_add (GTK_CONTAINER (switcher_frame->style_window_rgba), switcher_label);
-
-#ifdef USE_GCONF
settings->use_system_font = gconf_client_get_bool (gconf,
COMPIZ_USE_SYSTEM_FONT_KEY,
NULL);
theme_changed (gconf);
theme_opacity_changed (gconf);
button_layout_changed (gconf);
-#endif
-
- update_style (switcher_frame->style_window_rgba);
-#ifdef USE_GCONF
- titlebar_font_changed (gconf);
-#endif
-
- update_titlebar_font ();
-
-#ifdef USE_GCONF
- titlebar_click_action_changed (gconf,
+ titlebar_font_changed (gconf); titlebar_click_action_changed (gconf,
COMPIZ_DOUBLE_CLICK_TITLEBAR_KEY,
&settings->double_click_action,
DOUBLE_CLICK_ACTION_DEFAULT);
@@ -530,6 +509,8 @@ init_settings (WnckScreen *screen)
blur_settings_changed (gconf);
#endif
+ update_titlebar_font ();
+
gwd_process_frames (update_frames_border_extents,
window_type_frames,
WINDOW_TYPE_FRAMES_NUM,
@@ -539,7 +520,5 @@ init_settings (WnckScreen *screen)
update_shadow ();
- gwd_decor_frame_unref (switcher_frame);
-
return TRUE;
}
diff --git a/gtk/window-decorator/switcher.c b/gtk/window-decorator/switcher.c
index 1c4254e..af5c1c2 100644
--- a/gtk/window-decorator/switcher.c
+++ b/gtk/window-decorator/switcher.c
@@ -3,6 +3,7 @@
decor_frame_t *
create_switcher_frame (const gchar *type)
{
+ AtkObject *switcher_label_obj;
decor_frame_t *frame = decor_frame_new (type);
decor_extents_t _switcher_extents = { 6, 6, 6, 6 + SWITCHER_SPACE };
@@ -26,6 +27,11 @@ create_switcher_frame (const gchar *type)
gwd_decor_frame_ref (frame);
+ switcher_label = gtk_label_new ("");
+ switcher_label_obj = gtk_widget_get_accessible (switcher_label);
+ atk_object_set_role (switcher_label_obj, ATK_ROLE_STATUSBAR);
+ gtk_container_add (GTK_CONTAINER (frame->style_window_rgba), switcher_label);
+
return frame;
}