Skip to content

Commit

Permalink
appearance: add buttons-have-icons switch
Browse files Browse the repository at this point in the history
  • Loading branch information
ericek111 authored and raveit65 committed May 21, 2018
1 parent af21077 commit 31880fa
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 14 deletions.
7 changes: 7 additions & 0 deletions capplets/appearance/appearance-ui.c
Expand Up @@ -104,4 +104,11 @@ ui_init (AppearanceData *data)
set_have_icons (data, set_have_icons (data,
g_settings_get_boolean (data->interface_settings, g_settings_get_boolean (data->interface_settings,
MENU_ICONS_KEY)); 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);
} }
1 change: 1 addition & 0 deletions capplets/appearance/appearance.h
Expand Up @@ -47,6 +47,7 @@
#define COLOR_SCHEME_KEY "gtk-color-scheme" #define COLOR_SCHEME_KEY "gtk-color-scheme"
#define ACCEL_CHANGE_KEY "can-change-accels" #define ACCEL_CHANGE_KEY "can-change-accels"
#define MENU_ICONS_KEY "menus-have-icons" #define MENU_ICONS_KEY "menus-have-icons"
#define BUTTON_ICONS_KEY "buttons-have-icons"
#define TOOLBAR_STYLE_KEY "toolbar-style" #define TOOLBAR_STYLE_KEY "toolbar-style"
#define GTK_FONT_DEFAULT_VALUE "Sans 10" #define GTK_FONT_DEFAULT_VALUE "Sans 10"


Expand Down
98 changes: 84 additions & 14 deletions capplets/appearance/data/appearance.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.0 <!-- Generated with glade 3.22.1
mate-appearance-properties - appearance properties dialog window mate-appearance-properties - appearance properties dialog window
Copyright (C) MATE Developers Copyright (C) MATE Developers
Expand Down Expand Up @@ -35,6 +35,9 @@ Author: Wolfgang Ulbrich
<property name="title" translatable="yes">Font Rendering Details</property> <property name="title" translatable="yes">Font Rendering Details</property>
<property name="resizable">False</property> <property name="resizable">False</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1"> <object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property> <property name="visible">True</property>
Expand Down Expand Up @@ -828,9 +831,6 @@ Author: Wolfgang Ulbrich
<action-widgets> <action-widgets>
<action-widget response="-7">button3</action-widget> <action-widget response="-7">button3</action-widget>
</action-widgets> </action-widgets>
<child>
<placeholder/>
</child>
</object> </object>
<object class="GtkDialog" id="theme_details"> <object class="GtkDialog" id="theme_details">
<property name="can_focus">False</property> <property name="can_focus">False</property>
Expand All @@ -840,6 +840,9 @@ Author: Wolfgang Ulbrich
<property name="window_position">center-on-parent</property> <property name="window_position">center-on-parent</property>
<property name="default_height">450</property> <property name="default_height">450</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox4"> <object class="GtkBox" id="dialog-vbox4">
<property name="visible">True</property> <property name="visible">True</property>
Expand Down Expand Up @@ -1615,16 +1618,16 @@ Author: Wolfgang Ulbrich
<action-widget response="-11">theme_help_button</action-widget> <action-widget response="-11">theme_help_button</action-widget>
<action-widget response="-7">theme_close_button</action-widget> <action-widget response="-7">theme_close_button</action-widget>
</action-widgets> </action-widgets>
<child>
<placeholder/>
</child>
</object> </object>
<object class="GtkDialog" id="theme_save_dialog"> <object class="GtkDialog" id="theme_save_dialog">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="title" translatable="yes">Save Theme As...</property> <property name="title" translatable="yes">Save Theme As...</property>
<property name="modal">True</property> <property name="modal">True</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox3"> <object class="GtkBox" id="dialog-vbox3">
<property name="visible">True</property> <property name="visible">True</property>
Expand Down Expand Up @@ -1789,9 +1792,6 @@ Author: Wolfgang Ulbrich
<action-widget response="-6">save_dialog_cancel_button</action-widget> <action-widget response="-6">save_dialog_cancel_button</action-widget>
<action-widget response="-5">save_dialog_save_button</action-widget> <action-widget response="-5">save_dialog_save_button</action-widget>
</action-widgets> </action-widgets>
<child>
<placeholder/>
</child>
</object> </object>
<object class="GtkListStore" id="toolbar_style_liststore"> <object class="GtkListStore" id="toolbar_style_liststore">
<columns> <columns>
Expand Down Expand Up @@ -1864,6 +1864,9 @@ Author: Wolfgang Ulbrich
<property name="default_width">790</property> <property name="default_width">790</property>
<property name="default_height">560</property> <property name="default_height">560</property>
<property name="type_hint">normal</property> <property name="type_hint">normal</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2"> <object class="GtkBox" id="dialog-vbox2">
<property name="visible">True</property> <property name="visible">True</property>
Expand Down Expand Up @@ -2984,6 +2987,76 @@ Author: Wolfgang Ulbrich
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkBox" id="vbox28">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label52">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Buttons</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="hbox14">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label53">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label"> </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="button_icons_toggle">
<property name="label" translatable="yes">Show icons on buttons</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Whether buttons may display an icon in addition to the button text</property>
<property name="halign">start</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child> <child>
<object class="GtkBox" id="vbox25"> <object class="GtkBox" id="vbox25">
<property name="visible">True</property> <property name="visible">True</property>
Expand Down Expand Up @@ -3221,7 +3294,7 @@ Author: Wolfgang Ulbrich
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
</object> </object>
Expand Down Expand Up @@ -3254,8 +3327,5 @@ Author: Wolfgang Ulbrich
<action-widget response="-11">help_button</action-widget> <action-widget response="-11">help_button</action-widget>
<action-widget response="-7">close_button</action-widget> <action-widget response="-7">close_button</action-widget>
</action-widgets> </action-widgets>
<child>
<placeholder/>
</child>
</object> </object>
</interface> </interface>

0 comments on commit 31880fa

Please sign in to comment.