Skip to content

Commit 31880fa

Browse files
ericek111raveit65
authored andcommitted
appearance: add buttons-have-icons switch
1 parent af21077 commit 31880fa

File tree

3 files changed

+92
-14
lines changed

3 files changed

+92
-14
lines changed

capplets/appearance/appearance-ui.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,11 @@ ui_init (AppearanceData *data)
104104
set_have_icons (data,
105105
g_settings_get_boolean (data->interface_settings,
106106
MENU_ICONS_KEY));
107+
108+
widget = appearance_capplet_get_widget(data, "button_icons_toggle");
109+
g_settings_bind (data->interface_settings,
110+
BUTTON_ICONS_KEY,
111+
G_OBJECT (widget),
112+
"active",
113+
G_SETTINGS_BIND_DEFAULT);
107114
}

capplets/appearance/appearance.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#define COLOR_SCHEME_KEY "gtk-color-scheme"
4848
#define ACCEL_CHANGE_KEY "can-change-accels"
4949
#define MENU_ICONS_KEY "menus-have-icons"
50+
#define BUTTON_ICONS_KEY "buttons-have-icons"
5051
#define TOOLBAR_STYLE_KEY "toolbar-style"
5152
#define GTK_FONT_DEFAULT_VALUE "Sans 10"
5253

capplets/appearance/data/appearance.ui

Lines changed: 84 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- Generated with glade 3.22.0
2+
<!-- Generated with glade 3.22.1
33
44
mate-appearance-properties - appearance properties dialog window
55
Copyright (C) MATE Developers
@@ -35,6 +35,9 @@ Author: Wolfgang Ulbrich
3535
<property name="title" translatable="yes">Font Rendering Details</property>
3636
<property name="resizable">False</property>
3737
<property name="type_hint">dialog</property>
38+
<child>
39+
<placeholder/>
40+
</child>
3841
<child internal-child="vbox">
3942
<object class="GtkBox" id="dialog-vbox1">
4043
<property name="visible">True</property>
@@ -828,9 +831,6 @@ Author: Wolfgang Ulbrich
828831
<action-widgets>
829832
<action-widget response="-7">button3</action-widget>
830833
</action-widgets>
831-
<child>
832-
<placeholder/>
833-
</child>
834834
</object>
835835
<object class="GtkDialog" id="theme_details">
836836
<property name="can_focus">False</property>
@@ -840,6 +840,9 @@ Author: Wolfgang Ulbrich
840840
<property name="window_position">center-on-parent</property>
841841
<property name="default_height">450</property>
842842
<property name="type_hint">dialog</property>
843+
<child>
844+
<placeholder/>
845+
</child>
843846
<child internal-child="vbox">
844847
<object class="GtkBox" id="dialog-vbox4">
845848
<property name="visible">True</property>
@@ -1615,16 +1618,16 @@ Author: Wolfgang Ulbrich
16151618
<action-widget response="-11">theme_help_button</action-widget>
16161619
<action-widget response="-7">theme_close_button</action-widget>
16171620
</action-widgets>
1618-
<child>
1619-
<placeholder/>
1620-
</child>
16211621
</object>
16221622
<object class="GtkDialog" id="theme_save_dialog">
16231623
<property name="can_focus">False</property>
16241624
<property name="border_width">6</property>
16251625
<property name="title" translatable="yes">Save Theme As...</property>
16261626
<property name="modal">True</property>
16271627
<property name="type_hint">dialog</property>
1628+
<child>
1629+
<placeholder/>
1630+
</child>
16281631
<child internal-child="vbox">
16291632
<object class="GtkBox" id="dialog-vbox3">
16301633
<property name="visible">True</property>
@@ -1789,9 +1792,6 @@ Author: Wolfgang Ulbrich
17891792
<action-widget response="-6">save_dialog_cancel_button</action-widget>
17901793
<action-widget response="-5">save_dialog_save_button</action-widget>
17911794
</action-widgets>
1792-
<child>
1793-
<placeholder/>
1794-
</child>
17951795
</object>
17961796
<object class="GtkListStore" id="toolbar_style_liststore">
17971797
<columns>
@@ -1864,6 +1864,9 @@ Author: Wolfgang Ulbrich
18641864
<property name="default_width">790</property>
18651865
<property name="default_height">560</property>
18661866
<property name="type_hint">normal</property>
1867+
<child>
1868+
<placeholder/>
1869+
</child>
18671870
<child internal-child="vbox">
18681871
<object class="GtkBox" id="dialog-vbox2">
18691872
<property name="visible">True</property>
@@ -2984,6 +2987,76 @@ Author: Wolfgang Ulbrich
29842987
<property name="position">0</property>
29852988
</packing>
29862989
</child>
2990+
<child>
2991+
<object class="GtkBox" id="vbox28">
2992+
<property name="visible">True</property>
2993+
<property name="can_focus">False</property>
2994+
<property name="orientation">vertical</property>
2995+
<property name="spacing">6</property>
2996+
<child>
2997+
<object class="GtkLabel" id="label52">
2998+
<property name="visible">True</property>
2999+
<property name="can_focus">False</property>
3000+
<property name="halign">start</property>
3001+
<property name="label" translatable="yes">Buttons</property>
3002+
<attributes>
3003+
<attribute name="weight" value="bold"/>
3004+
</attributes>
3005+
</object>
3006+
<packing>
3007+
<property name="expand">False</property>
3008+
<property name="fill">False</property>
3009+
<property name="position">0</property>
3010+
</packing>
3011+
</child>
3012+
<child>
3013+
<object class="GtkBox" id="hbox14">
3014+
<property name="visible">True</property>
3015+
<property name="can_focus">False</property>
3016+
<child>
3017+
<object class="GtkLabel" id="label53">
3018+
<property name="visible">True</property>
3019+
<property name="can_focus">False</property>
3020+
<property name="label"> </property>
3021+
</object>
3022+
<packing>
3023+
<property name="expand">False</property>
3024+
<property name="fill">False</property>
3025+
<property name="position">0</property>
3026+
</packing>
3027+
</child>
3028+
<child>
3029+
<object class="GtkCheckButton" id="button_icons_toggle">
3030+
<property name="label" translatable="yes">Show icons on buttons</property>
3031+
<property name="visible">True</property>
3032+
<property name="can_focus">True</property>
3033+
<property name="receives_default">False</property>
3034+
<property name="tooltip_text" translatable="yes">Whether buttons may display an icon in addition to the button text</property>
3035+
<property name="halign">start</property>
3036+
<property name="use_underline">True</property>
3037+
<property name="active">True</property>
3038+
<property name="draw_indicator">True</property>
3039+
</object>
3040+
<packing>
3041+
<property name="expand">False</property>
3042+
<property name="fill">False</property>
3043+
<property name="position">1</property>
3044+
</packing>
3045+
</child>
3046+
</object>
3047+
<packing>
3048+
<property name="expand">False</property>
3049+
<property name="fill">True</property>
3050+
<property name="position">1</property>
3051+
</packing>
3052+
</child>
3053+
</object>
3054+
<packing>
3055+
<property name="expand">False</property>
3056+
<property name="fill">True</property>
3057+
<property name="position">1</property>
3058+
</packing>
3059+
</child>
29873060
<child>
29883061
<object class="GtkBox" id="vbox25">
29893062
<property name="visible">True</property>
@@ -3221,7 +3294,7 @@ Author: Wolfgang Ulbrich
32213294
<packing>
32223295
<property name="expand">False</property>
32233296
<property name="fill">True</property>
3224-
<property name="position">1</property>
3297+
<property name="position">2</property>
32253298
</packing>
32263299
</child>
32273300
</object>
@@ -3254,8 +3327,5 @@ Author: Wolfgang Ulbrich
32543327
<action-widget response="-11">help_button</action-widget>
32553328
<action-widget response="-7">close_button</action-widget>
32563329
</action-widgets>
3257-
<child>
3258-
<placeholder/>
3259-
</child>
32603330
</object>
32613331
</interface>

0 commit comments

Comments
 (0)