diff options
author | Erik Bročko <[email protected]> | 2018-05-19 16:09:27 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-05-21 11:58:25 +0200 |
commit | 8a96f64f45f3da95413514fad2179d0d9fc8ed11 (patch) | |
tree | 09506dc3635819a7cc2cb1ed5a120feed73bf61a /capplets/appearance/appearance-ui.c | |
parent | 31880fa4ee2c7513d15204aec3c997a9084c9a0c (diff) | |
download | mate-control-center-8a96f64f45f3da95413514fad2179d0d9fc8ed11.tar.bz2 mate-control-center-8a96f64f45f3da95413514fad2179d0d9fc8ed11.tar.xz |
appearance: fixed indentations
Diffstat (limited to 'capplets/appearance/appearance-ui.c')
-rw-r--r-- | capplets/appearance/appearance-ui.c | 118 |
1 files changed, 60 insertions, 58 deletions
diff --git a/capplets/appearance/appearance-ui.c b/capplets/appearance/appearance-ui.c index 6bb59953..0ef8d35b 100644 --- a/capplets/appearance/appearance-ui.c +++ b/capplets/appearance/appearance-ui.c @@ -25,55 +25,57 @@ static void set_have_icons (AppearanceData *data, gboolean value) { - static const char *menu_item_names[] = { - "menu_item_1", - "menu_item_2", - "menu_item_3", - "menu_item_4", - "menu_item_5", - "cut", - "copy", - "paste", - NULL - }; + static const char *menu_item_names[] = { + "menu_item_1", + "menu_item_2", + "menu_item_3", + "menu_item_4", + "menu_item_5", + "cut", + "copy", + "paste", + NULL + }; - const char **name; + const char **name; - for (name = menu_item_names; *name != NULL; name++) { - GtkImageMenuItem *item = GTK_IMAGE_MENU_ITEM (appearance_capplet_get_widget (data, *name)); - GtkWidget *image; + for (name = menu_item_names; *name != NULL; name++) { + GtkImageMenuItem *item = GTK_IMAGE_MENU_ITEM (appearance_capplet_get_widget (data, *name)); + GtkWidget *image; - if (value) { - image = g_object_get_data (G_OBJECT (item), "image"); - if (image) { - gtk_image_menu_item_set_image (item, image); - g_object_unref (image); - } - } else { - image = gtk_image_menu_item_get_image (item); - g_object_set_data (G_OBJECT (item), "image", image); - g_object_ref (image); - gtk_image_menu_item_set_image (item, NULL); + if (value) { + image = g_object_get_data (G_OBJECT (item), "image"); + if (image) { + gtk_image_menu_item_set_image (item, image); + g_object_unref (image); + } + } + else + { + image = gtk_image_menu_item_get_image (item); + g_object_set_data (G_OBJECT (item), "image", image); + g_object_ref (image); + gtk_image_menu_item_set_image (item, NULL); + } } - } } static void menus_have_icons_cb (GSettings *settings, - gchar *key, - AppearanceData *data) + gchar *key, + AppearanceData *data) { - set_have_icons (data, g_settings_get_boolean (settings, key)); + set_have_icons (data, g_settings_get_boolean (settings, key)); } /** GUI Callbacks **/ static gint button_press_block_cb (GtkWidget *toolbar, - GdkEvent *event, - gpointer data) + GdkEvent *event, + gpointer data) { - return TRUE; + return TRUE; } /** Public Functions **/ @@ -81,34 +83,34 @@ button_press_block_cb (GtkWidget *toolbar, void ui_init (AppearanceData *data) { - GtkWidget* widget; + GtkWidget* widget; - /* FIXME maybe just remove that stuff from .ui file */ - GtkWidget* container = appearance_capplet_get_widget(data, "vbox24"); + /* 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 - gtk_container_remove((GtkContainer *) container, - appearance_capplet_get_widget(data, "menu_accel_toggle")); - gtk_container_remove((GtkContainer *) container, - appearance_capplet_get_widget(data, "hbox11")); + // Remove menu accels and toolbar style toggles for new GTK versions + gtk_container_remove((GtkContainer *) container, + appearance_capplet_get_widget(data, "menu_accel_toggle")); + gtk_container_remove((GtkContainer *) container, + appearance_capplet_get_widget(data, "hbox11")); - widget = appearance_capplet_get_widget(data, "menu_icons_toggle"); - g_settings_bind (data->interface_settings, - MENU_ICONS_KEY, - G_OBJECT (widget), - "active", - G_SETTINGS_BIND_DEFAULT); - g_signal_connect (data->interface_settings, "changed::" MENU_ICONS_KEY, - G_CALLBACK (menus_have_icons_cb), data); + widget = appearance_capplet_get_widget(data, "menu_icons_toggle"); + g_settings_bind (data->interface_settings, + MENU_ICONS_KEY, + G_OBJECT (widget), + "active", + G_SETTINGS_BIND_DEFAULT); + g_signal_connect (data->interface_settings, "changed::" MENU_ICONS_KEY, + G_CALLBACK (menus_have_icons_cb), data); - set_have_icons (data, - g_settings_get_boolean (data->interface_settings, - MENU_ICONS_KEY)); + set_have_icons (data, + g_settings_get_boolean (data->interface_settings, + MENU_ICONS_KEY)); - widget = appearance_capplet_get_widget(data, "button_icons_toggle"); - g_settings_bind (data->interface_settings, - BUTTON_ICONS_KEY, - G_OBJECT (widget), - "active", - G_SETTINGS_BIND_DEFAULT); + widget = appearance_capplet_get_widget(data, "button_icons_toggle"); + g_settings_bind (data->interface_settings, + BUTTON_ICONS_KEY, + G_OBJECT (widget), + "active", + G_SETTINGS_BIND_DEFAULT); } |