Revision: 4817 http://geany.svn.sourceforge.net/geany/?rev=4817&view=rev Author: eht16 Date: 2010-04-11 21:56:08 +0000 (Sun, 11 Apr 2010)
Log Message: ----------- Add option 'System Default' for toolbar icon style and size to use the GTK default value.
Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.txt trunk/geany.glade trunk/plugins/geanyfunctions.h trunk/src/callbacks.c trunk/src/interface.c trunk/src/keyfile.c trunk/src/plugindata.h trunk/src/plugins.c trunk/src/prefs.c trunk/src/toolbar.c trunk/src/toolbar.h trunk/src/ui_utils.c trunk/src/ui_utils.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/ChangeLog 2010-04-11 21:56:08 UTC (rev 4817) @@ -1,3 +1,13 @@ +2010-04-11 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * geany.glade, doc/geany.txt, plugins/geanyfunctions.h, + src/callbacks.c, src/interface.c, src/keyfile.c, src/plugindata.h, + src/plugins.c, src/prefs.c, src/toolbar.c, src/toolbar.h, + src/ui_utils.c, src/ui_utils.h: + Add option 'System Default' for toolbar icon style and size to + use the GTK default value. + + 2010-04-09 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* plugins/htmlchars.c:
Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/doc/geany.txt 2010-04-11 21:56:08 UTC (rev 4817) @@ -1792,6 +1792,8 @@ Allows to append the toolbar to the main menu bar instead of placing it below. This is useful to save vertical space.
+Customize Toolbar + See `Customizing the toolbar`_.
Appearance `````````` @@ -1799,14 +1801,13 @@ Icon Style Select the toolbar icon style to use - either icons and text, just icons or just text. + The choice System default uses whatever icon style is set by GTK.
Icon size Select the size of the icons you see (large, small or very small). + The choice System default uses whatever icon size is set by GTK.
-Customize Toolbar - See `Customizing the toolbar`_.
- Editor Features preferences ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/geany.glade 2010-04-11 21:56:08 UTC (rev 4817) @@ -18,7 +18,6 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> <accessibility> <atkproperty name="AtkObject::accessible_name" translatable="yes">Geany</atkproperty> </accessibility> @@ -38,8 +37,6 @@ <child> <widget class="GtkMenuBar" id="menubar1"> <property name="visible">True</property> - <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property> - <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
<child> <widget class="GtkMenuItem" id="file1"> @@ -2785,7 +2782,6 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> <property name="has_separator">True</property>
<child internal-child="vbox"> @@ -4843,390 +4839,451 @@ <widget class="GtkVBox" id="vbox42"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="spacing">5</property>
<child> - <widget class="GtkCheckButton" id="check_toolbar_show"> + <widget class="GtkHBox" id="hbox18"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Show T_oolbar</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">0</property>
- <child> - <widget class="GtkCheckButton" id="check_toolbar_in_menu"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Pack the toolbar to the main menu to save vertical space</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Append Toolbar to the Menu</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> + <child> + <widget class="GtkVBox" id="vbox52"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property>
- <child> - <widget class="GtkLabel" id="label196"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Toolbar</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> + <child> + <widget class="GtkCheckButton" id="check_toolbar_show"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show T_oolbar</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child>
- <child> - <widget class="GtkFrame" id="frame13"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> + <child> + <widget class="GtkCheckButton" id="check_toolbar_in_menu"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Pack the toolbar to the main menu to save vertical space</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Append Toolbar to the Menu</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child>
- <child> - <widget class="GtkAlignment" id="alignment16"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> + <child> + <widget class="GtkVBox" id="vbox53"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property>
- <child> - <widget class="GtkTable" id="table9"> - <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">3</property> - <property name="column_spacing">12</property> + <child> + <widget class="GtkButton" id="button_customize_toolbar"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button_customize_toolbar_clicked" last_modification_time="Thu, 25 Jun 2009 17:09:43 GMT"/>
- <child> - <widget class="GtkLabel" id="label169"> - <property name="visible">True</property> - <property name="label" translatable="yes">Icon style:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> + <child> + <widget class="GtkAlignment" id="alignment45"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property>
- <child> - <widget class="GtkLabel" id="label170"> - <property name="visible">True</property> - <property name="label" translatable="yes">Icon size:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> + <child> + <widget class="GtkHBox" id="hbox16"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property>
- <child> - <widget class="GtkRadioButton" id="radio_toolbar_imagetext"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Images _and Text</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> + <child> + <widget class="GtkImage" id="image2877"> + <property name="visible">True</property> + <property name="stock">gtk-properties</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child>
- <child> - <widget class="GtkRadioButton" id="radio_toolbar_small"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Small Icons</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> + <child> + <widget class="GtkLabel" id="label236"> + <property name="visible">True</property> + <property name="label" translatable="yes">Customize Toolbar</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child>
<child> - <widget class="GtkRadioButton" id="radio_toolbar_large"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Large Icons</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radio_toolbar_small</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> + <placeholder/> </child>
<child> - <widget class="GtkRadioButton" id="radio_toolbar_text"> + <widget class="GtkFrame" id="frame_toolbar_style"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Text Only</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radio_toolbar_imagetext</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child> - <widget class="GtkRadioButton" id="radio_toolbar_image"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Images Only</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radio_toolbar_imagetext</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> + <child> + <widget class="GtkAlignment" id="alignment50"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property>
- <child> - <widget class="GtkRadioButton" id="radio_toolbar_verysmall"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Very Small Icons</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radio_toolbar_small</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - </child> - </widget> - </child> + <child> + <widget class="GtkTable" id="table19"> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">3</property> + <property name="column_spacing">20</property>
- <child> - <widget class="GtkLabel" id="label167"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Appearance</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkRadioButton" id="radio_toolbar_style_default"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">System _Default</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child>
- <child> - <widget class="GtkHBox" id="hbox15"> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">0</property> + <child> + <widget class="GtkRadioButton" id="radio_toolbar_imagetext"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Images _and Text</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radio_toolbar_style_default</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child>
- <child> - <widget class="GtkButton" id="button_customize_toolbar"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_button_customize_toolbar_clicked" last_modification_time="Thu, 25 Jun 2009 17:09:43 GMT"/> + <child> + <widget class="GtkRadioButton" id="radio_toolbar_image"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Images Only</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radio_toolbar_style_default</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child>
- <child> - <widget class="GtkAlignment" id="alignment45"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> + <child> + <widget class="GtkRadioButton" id="radio_toolbar_text"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Text Only</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radio_toolbar_style_default</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child>
- <child> - <widget class="GtkHBox" id="hbox16"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - <child> - <widget class="GtkImage" id="image2877"> + <widget class="GtkLabel" id="label244"> <property name="visible">True</property> - <property name="stock">gtk-properties</property> - <property name="icon_size">4</property> + <property name="label" translatable="yes"><b>Icon Style</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="type">label_item</property> </packing> </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child>
+ <child> + <widget class="GtkFrame" id="frame_toolbar_icon"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <child> - <widget class="GtkLabel" id="label236"> + <widget class="GtkAlignment" id="alignment51"> <property name="visible">True</property> - <property name="label" translatable="yes">Customize Toolbar</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table20"> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <property name="homogeneous">True</property> + <property name="row_spacing">3</property> + <property name="column_spacing">20</property> + + <child> + <widget class="GtkRadioButton" id="radio_toolbar_icon_default"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">S_ystem Default</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="radio_toolbar_small"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Small Icons</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radio_toolbar_icon_default</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="radio_toolbar_verysmall"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Very Small Icons</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radio_toolbar_icon_default</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="radio_toolbar_large"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Large Icons</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radio_toolbar_icon_default</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label245"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Icon Size</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> @@ -5240,27 +5297,48 @@ <property name="angle">0</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="type">label_item</property> </packing> </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> </child> </widget> + </child> + + <child> + <widget class="GtkLabel" id="label246"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Toolbar</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="type">label_item</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">False</property> + <property name="fill">True</property> </packing> </child> </widget> @@ -9637,7 +9715,6 @@ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="focus_on_map">True</property> - <property name="urgency_hint">False</property> <property name="has_separator">True</property>
<child internal-child="vbox">
Modified: trunk/plugins/geanyfunctions.h =================================================================== --- trunk/plugins/geanyfunctions.h 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/plugins/geanyfunctions.h 2010-04-11 21:56:08 UTC (rev 4817) @@ -266,6 +266,8 @@ geany_functions->p_ui->ui_widget_modify_font_from_string #define ui_is_keyval_enter_or_return \ geany_functions->p_ui->ui_is_keyval_enter_or_return +#define ui_get_gtk_settings_integer \ + geany_functions->p_ui->ui_get_gtk_settings_integer #define dialogs_show_question \ geany_functions->p_dialogs->dialogs_show_question #define dialogs_show_msgbox \
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/callbacks.c 2010-04-11 21:56:08 UTC (rev 4817) @@ -507,8 +507,8 @@ if (ignore_toolbar_toggle || ! gtk_check_menu_item_get_active(menuitem)) return;
- gtk_toolbar_set_style(GTK_TOOLBAR(main_widgets.toolbar), GTK_TOOLBAR_BOTH); toolbar_prefs.icon_style = GTK_TOOLBAR_BOTH; + toolbar_set_icon_style(); }
@@ -519,8 +519,8 @@ if (ignore_toolbar_toggle || ! gtk_check_menu_item_get_active(menuitem)) return;
- gtk_toolbar_set_style(GTK_TOOLBAR(main_widgets.toolbar), GTK_TOOLBAR_ICONS); toolbar_prefs.icon_style = GTK_TOOLBAR_ICONS; + toolbar_set_icon_style(); }
@@ -531,8 +531,8 @@ if (ignore_toolbar_toggle || ! gtk_check_menu_item_get_active(menuitem)) return;
- gtk_toolbar_set_style(GTK_TOOLBAR(main_widgets.toolbar), GTK_TOOLBAR_TEXT); toolbar_prefs.icon_style = GTK_TOOLBAR_TEXT; + toolbar_set_icon_style(); }
@@ -626,7 +626,7 @@ return;
toolbar_prefs.icon_size = GTK_ICON_SIZE_LARGE_TOOLBAR; - gtk_toolbar_set_icon_size(GTK_TOOLBAR(main_widgets.toolbar), toolbar_prefs.icon_size); + toolbar_set_icon_size(); }
@@ -638,7 +638,7 @@ return;
toolbar_prefs.icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR; - gtk_toolbar_set_icon_size(GTK_TOOLBAR(main_widgets.toolbar), toolbar_prefs.icon_size); + toolbar_set_icon_size(); }
@@ -650,7 +650,7 @@ return;
toolbar_prefs.icon_size = GTK_ICON_SIZE_MENU; - gtk_toolbar_set_icon_size(GTK_TOOLBAR(main_widgets.toolbar), toolbar_prefs.icon_size); + toolbar_set_icon_size(); }
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/interface.c 2010-04-11 21:56:08 UTC (rev 4817) @@ -2453,29 +2453,35 @@ GtkWidget *frame28; GtkWidget *alignment31; GtkWidget *vbox42; + GtkWidget *hbox18; + GtkWidget *vbox52; GtkWidget *check_toolbar_show; GtkWidget *check_toolbar_in_menu; - GtkWidget *label196; - GtkWidget *frame13; - GtkWidget *alignment16; - GtkWidget *table9; - GtkWidget *label169; - GtkWidget *label170; - GtkWidget *radio_toolbar_imagetext; - GSList *radio_toolbar_imagetext_group = NULL; - GtkWidget *radio_toolbar_small; - GSList *radio_toolbar_small_group = NULL; - GtkWidget *radio_toolbar_large; - GtkWidget *radio_toolbar_text; - GtkWidget *radio_toolbar_image; - GtkWidget *radio_toolbar_verysmall; - GtkWidget *label167; - GtkWidget *hbox15; + GtkWidget *vbox53; GtkWidget *button_customize_toolbar; GtkWidget *alignment45; GtkWidget *hbox16; GtkWidget *image2877; GtkWidget *label236; + GtkWidget *frame_toolbar_style; + GtkWidget *alignment50; + GtkWidget *table19; + GtkWidget *radio_toolbar_style_default; + GSList *radio_toolbar_style_default_group = NULL; + GtkWidget *radio_toolbar_imagetext; + GtkWidget *radio_toolbar_image; + GtkWidget *radio_toolbar_text; + GtkWidget *label244; + GtkWidget *frame_toolbar_icon; + GtkWidget *alignment51; + GtkWidget *table20; + GtkWidget *radio_toolbar_icon_default; + GSList *radio_toolbar_icon_default_group = NULL; + GtkWidget *radio_toolbar_small; + GtkWidget *radio_toolbar_verysmall; + GtkWidget *radio_toolbar_large; + GtkWidget *label245; + GtkWidget *label246; GtkWidget *label164; GtkWidget *notebook4; GtkWidget *vbox5; @@ -3343,131 +3349,162 @@ gtk_container_add (GTK_CONTAINER (frame28), alignment31); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment31), 0, 0, 12, 0);
- vbox42 = gtk_vbox_new (FALSE, 0); + vbox42 = gtk_vbox_new (FALSE, 5); gtk_widget_show (vbox42); gtk_container_add (GTK_CONTAINER (alignment31), vbox42);
+ hbox18 = gtk_hbox_new (FALSE, 0); + gtk_widget_show (hbox18); + gtk_box_pack_start (GTK_BOX (vbox42), hbox18, FALSE, FALSE, 0); + + vbox52 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox52); + gtk_box_pack_start (GTK_BOX (hbox18), vbox52, TRUE, TRUE, 0); + check_toolbar_show = gtk_check_button_new_with_mnemonic (_("Show T_oolbar")); gtk_widget_show (check_toolbar_show); - gtk_box_pack_start (GTK_BOX (vbox42), check_toolbar_show, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox52), check_toolbar_show, FALSE, FALSE, 0);
check_toolbar_in_menu = gtk_check_button_new_with_mnemonic (_("_Append Toolbar to the Menu")); gtk_widget_show (check_toolbar_in_menu); - gtk_box_pack_start (GTK_BOX (vbox42), check_toolbar_in_menu, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox52), check_toolbar_in_menu, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, check_toolbar_in_menu, _("Pack the toolbar to the main menu to save vertical space"), NULL);
- label196 = gtk_label_new (_("<b>Toolbar</b>")); - gtk_widget_show (label196); - gtk_frame_set_label_widget (GTK_FRAME (frame28), label196); - gtk_label_set_use_markup (GTK_LABEL (label196), TRUE); + vbox53 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox53); + gtk_box_pack_start (GTK_BOX (hbox18), vbox53, FALSE, FALSE, 0);
- frame13 = gtk_frame_new (NULL); - gtk_widget_show (frame13); - gtk_box_pack_start (GTK_BOX (vbox15), frame13, FALSE, FALSE, 0); - gtk_frame_set_shadow_type (GTK_FRAME (frame13), GTK_SHADOW_NONE); + button_customize_toolbar = gtk_button_new (); + gtk_widget_show (button_customize_toolbar); + gtk_box_pack_start (GTK_BOX (vbox53), button_customize_toolbar, FALSE, FALSE, 0);
- alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1); - gtk_widget_show (alignment16); - gtk_container_add (GTK_CONTAINER (frame13), alignment16); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment16), 0, 0, 12, 0); + alignment45 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment45); + gtk_container_add (GTK_CONTAINER (button_customize_toolbar), alignment45);
- table9 = gtk_table_new (2, 4, FALSE); - gtk_widget_show (table9); - gtk_container_add (GTK_CONTAINER (alignment16), table9); - gtk_table_set_row_spacings (GTK_TABLE (table9), 3); - gtk_table_set_col_spacings (GTK_TABLE (table9), 12); + hbox16 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox16); + gtk_container_add (GTK_CONTAINER (alignment45), hbox16);
- label169 = gtk_label_new (_("Icon style:")); - gtk_widget_show (label169); - gtk_table_attach (GTK_TABLE (table9), label169, 0, 1, 0, 1, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label169), 0, 0.5); + image2877 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image2877); + gtk_box_pack_start (GTK_BOX (hbox16), image2877, FALSE, FALSE, 0);
- label170 = gtk_label_new (_("Icon size:")); - gtk_widget_show (label170); - gtk_table_attach (GTK_TABLE (table9), label170, 0, 1, 1, 2, + label236 = gtk_label_new_with_mnemonic (_("Customize Toolbar")); + gtk_widget_show (label236); + gtk_box_pack_start (GTK_BOX (hbox16), label236, FALSE, FALSE, 0); + + frame_toolbar_style = gtk_frame_new (NULL); + gtk_widget_show (frame_toolbar_style); + gtk_box_pack_start (GTK_BOX (vbox42), frame_toolbar_style, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame_toolbar_style), GTK_SHADOW_NONE); + + alignment50 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment50); + gtk_container_add (GTK_CONTAINER (frame_toolbar_style), alignment50); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment50), 0, 0, 12, 0); + + table19 = gtk_table_new (2, 2, FALSE); + gtk_widget_show (table19); + gtk_container_add (GTK_CONTAINER (alignment50), table19); + gtk_table_set_row_spacings (GTK_TABLE (table19), 3); + gtk_table_set_col_spacings (GTK_TABLE (table19), 20); + + radio_toolbar_style_default = gtk_radio_button_new_with_mnemonic (NULL, _("System _Default")); + gtk_widget_show (radio_toolbar_style_default); + gtk_table_attach (GTK_TABLE (table19), radio_toolbar_style_default, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label170), 0, 0.5); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_style_default), radio_toolbar_style_default_group); + radio_toolbar_style_default_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_style_default));
radio_toolbar_imagetext = gtk_radio_button_new_with_mnemonic (NULL, _("Images _and Text")); gtk_widget_show (radio_toolbar_imagetext); - gtk_table_attach (GTK_TABLE (table9), radio_toolbar_imagetext, 1, 2, 0, 1, + gtk_table_attach (GTK_TABLE (table19), radio_toolbar_imagetext, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_imagetext), radio_toolbar_imagetext_group); - radio_toolbar_imagetext_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_imagetext)); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_imagetext), radio_toolbar_style_default_group); + radio_toolbar_style_default_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_imagetext));
- radio_toolbar_small = gtk_radio_button_new_with_mnemonic (NULL, _("_Small Icons")); - gtk_widget_show (radio_toolbar_small); - gtk_table_attach (GTK_TABLE (table9), radio_toolbar_small, 2, 3, 1, 2, + radio_toolbar_image = gtk_radio_button_new_with_mnemonic (NULL, _("_Images Only")); + gtk_widget_show (radio_toolbar_image); + gtk_table_attach (GTK_TABLE (table19), radio_toolbar_image, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_small), radio_toolbar_small_group); - radio_toolbar_small_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_small)); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_image), radio_toolbar_style_default_group); + radio_toolbar_style_default_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_image));
- radio_toolbar_large = gtk_radio_button_new_with_mnemonic (NULL, _("_Large Icons")); - gtk_widget_show (radio_toolbar_large); - gtk_table_attach (GTK_TABLE (table9), radio_toolbar_large, 1, 2, 1, 2, + radio_toolbar_text = gtk_radio_button_new_with_mnemonic (NULL, _("_Text Only")); + gtk_widget_show (radio_toolbar_text); + gtk_table_attach (GTK_TABLE (table19), radio_toolbar_text, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_large), radio_toolbar_small_group); - radio_toolbar_small_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_large)); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_text), radio_toolbar_style_default_group); + radio_toolbar_style_default_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_text));
- radio_toolbar_text = gtk_radio_button_new_with_mnemonic (NULL, _("_Text Only")); - gtk_widget_show (radio_toolbar_text); - gtk_table_attach (GTK_TABLE (table9), radio_toolbar_text, 3, 4, 0, 1, + label244 = gtk_label_new (_("<b>Icon Style</b>")); + gtk_widget_show (label244); + gtk_frame_set_label_widget (GTK_FRAME (frame_toolbar_style), label244); + gtk_label_set_use_markup (GTK_LABEL (label244), TRUE); + + frame_toolbar_icon = gtk_frame_new (NULL); + gtk_widget_show (frame_toolbar_icon); + gtk_box_pack_start (GTK_BOX (vbox42), frame_toolbar_icon, TRUE, TRUE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame_toolbar_icon), GTK_SHADOW_NONE); + + alignment51 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment51); + gtk_container_add (GTK_CONTAINER (frame_toolbar_icon), alignment51); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment51), 0, 0, 12, 0); + + table20 = gtk_table_new (2, 2, TRUE); + gtk_widget_show (table20); + gtk_container_add (GTK_CONTAINER (alignment51), table20); + gtk_table_set_row_spacings (GTK_TABLE (table20), 3); + gtk_table_set_col_spacings (GTK_TABLE (table20), 20); + + radio_toolbar_icon_default = gtk_radio_button_new_with_mnemonic (NULL, _("S_ystem Default")); + gtk_widget_show (radio_toolbar_icon_default); + gtk_table_attach (GTK_TABLE (table20), radio_toolbar_icon_default, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_text), radio_toolbar_imagetext_group); - radio_toolbar_imagetext_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_text)); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_icon_default), radio_toolbar_icon_default_group); + radio_toolbar_icon_default_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_icon_default));
- radio_toolbar_image = gtk_radio_button_new_with_mnemonic (NULL, _("_Images Only")); - gtk_widget_show (radio_toolbar_image); - gtk_table_attach (GTK_TABLE (table9), radio_toolbar_image, 2, 3, 0, 1, + radio_toolbar_small = gtk_radio_button_new_with_mnemonic (NULL, _("_Small Icons")); + gtk_widget_show (radio_toolbar_small); + gtk_table_attach (GTK_TABLE (table20), radio_toolbar_small, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_image), radio_toolbar_imagetext_group); - radio_toolbar_imagetext_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_image)); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_small), radio_toolbar_icon_default_group); + radio_toolbar_icon_default_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_small));
radio_toolbar_verysmall = gtk_radio_button_new_with_mnemonic (NULL, _("_Very Small Icons")); gtk_widget_show (radio_toolbar_verysmall); - gtk_table_attach (GTK_TABLE (table9), radio_toolbar_verysmall, 3, 4, 1, 2, + gtk_table_attach (GTK_TABLE (table20), radio_toolbar_verysmall, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_verysmall), radio_toolbar_small_group); - radio_toolbar_small_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_verysmall)); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_verysmall), radio_toolbar_icon_default_group); + radio_toolbar_icon_default_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_verysmall));
- label167 = gtk_label_new (_("<b>Appearance</b>")); - gtk_widget_show (label167); - gtk_frame_set_label_widget (GTK_FRAME (frame13), label167); - gtk_label_set_use_markup (GTK_LABEL (label167), TRUE); + radio_toolbar_large = gtk_radio_button_new_with_mnemonic (NULL, _("_Large Icons")); + gtk_widget_show (radio_toolbar_large); + gtk_table_attach (GTK_TABLE (table20), radio_toolbar_large, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_large), radio_toolbar_icon_default_group); + radio_toolbar_icon_default_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_large));
- hbox15 = gtk_hbox_new (TRUE, 0); - gtk_widget_show (hbox15); - gtk_box_pack_start (GTK_BOX (vbox15), hbox15, FALSE, FALSE, 0); + label245 = gtk_label_new (_("<b>Icon Size</b>")); + gtk_widget_show (label245); + gtk_frame_set_label_widget (GTK_FRAME (frame_toolbar_icon), label245); + gtk_label_set_use_markup (GTK_LABEL (label245), TRUE);
- button_customize_toolbar = gtk_button_new (); - gtk_widget_show (button_customize_toolbar); - gtk_box_pack_start (GTK_BOX (hbox15), button_customize_toolbar, FALSE, FALSE, 0); + label246 = gtk_label_new (_("<b>Toolbar</b>")); + gtk_widget_show (label246); + gtk_frame_set_label_widget (GTK_FRAME (frame28), label246); + gtk_label_set_use_markup (GTK_LABEL (label246), TRUE);
- alignment45 = gtk_alignment_new (0.5, 0.5, 0, 0); - gtk_widget_show (alignment45); - gtk_container_add (GTK_CONTAINER (button_customize_toolbar), alignment45); - - hbox16 = gtk_hbox_new (FALSE, 2); - gtk_widget_show (hbox16); - gtk_container_add (GTK_CONTAINER (alignment45), hbox16); - - image2877 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON); - gtk_widget_show (image2877); - gtk_box_pack_start (GTK_BOX (hbox16), image2877, FALSE, FALSE, 0); - - label236 = gtk_label_new_with_mnemonic (_("Customize Toolbar")); - gtk_widget_show (label236); - gtk_box_pack_start (GTK_BOX (hbox16), label236, FALSE, FALSE, 0); - label164 = gtk_label_new (_("Toolbar")); gtk_widget_show (label164); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 2), label164); @@ -4902,27 +4939,33 @@ GLADE_HOOKUP_OBJECT (prefs_dialog, frame28, "frame28"); GLADE_HOOKUP_OBJECT (prefs_dialog, alignment31, "alignment31"); GLADE_HOOKUP_OBJECT (prefs_dialog, vbox42, "vbox42"); + GLADE_HOOKUP_OBJECT (prefs_dialog, hbox18, "hbox18"); + GLADE_HOOKUP_OBJECT (prefs_dialog, vbox52, "vbox52"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_show, "check_toolbar_show"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_in_menu, "check_toolbar_in_menu"); - GLADE_HOOKUP_OBJECT (prefs_dialog, label196, "label196"); - GLADE_HOOKUP_OBJECT (prefs_dialog, frame13, "frame13"); - GLADE_HOOKUP_OBJECT (prefs_dialog, alignment16, "alignment16"); - GLADE_HOOKUP_OBJECT (prefs_dialog, table9, "table9"); - GLADE_HOOKUP_OBJECT (prefs_dialog, label169, "label169"); - GLADE_HOOKUP_OBJECT (prefs_dialog, label170, "label170"); - GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_imagetext, "radio_toolbar_imagetext"); - GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_small, "radio_toolbar_small"); - GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_large, "radio_toolbar_large"); - GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_text, "radio_toolbar_text"); - GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_image, "radio_toolbar_image"); - GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_verysmall, "radio_toolbar_verysmall"); - GLADE_HOOKUP_OBJECT (prefs_dialog, label167, "label167"); - GLADE_HOOKUP_OBJECT (prefs_dialog, hbox15, "hbox15"); + GLADE_HOOKUP_OBJECT (prefs_dialog, vbox53, "vbox53"); GLADE_HOOKUP_OBJECT (prefs_dialog, button_customize_toolbar, "button_customize_toolbar"); GLADE_HOOKUP_OBJECT (prefs_dialog, alignment45, "alignment45"); GLADE_HOOKUP_OBJECT (prefs_dialog, hbox16, "hbox16"); GLADE_HOOKUP_OBJECT (prefs_dialog, image2877, "image2877"); GLADE_HOOKUP_OBJECT (prefs_dialog, label236, "label236"); + GLADE_HOOKUP_OBJECT (prefs_dialog, frame_toolbar_style, "frame_toolbar_style"); + GLADE_HOOKUP_OBJECT (prefs_dialog, alignment50, "alignment50"); + GLADE_HOOKUP_OBJECT (prefs_dialog, table19, "table19"); + GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_style_default, "radio_toolbar_style_default"); + GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_imagetext, "radio_toolbar_imagetext"); + GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_image, "radio_toolbar_image"); + GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_text, "radio_toolbar_text"); + GLADE_HOOKUP_OBJECT (prefs_dialog, label244, "label244"); + GLADE_HOOKUP_OBJECT (prefs_dialog, frame_toolbar_icon, "frame_toolbar_icon"); + GLADE_HOOKUP_OBJECT (prefs_dialog, alignment51, "alignment51"); + GLADE_HOOKUP_OBJECT (prefs_dialog, table20, "table20"); + GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_icon_default, "radio_toolbar_icon_default"); + GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_small, "radio_toolbar_small"); + GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_verysmall, "radio_toolbar_verysmall"); + GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_large, "radio_toolbar_large"); + GLADE_HOOKUP_OBJECT (prefs_dialog, label245, "label245"); + GLADE_HOOKUP_OBJECT (prefs_dialog, label246, "label246"); GLADE_HOOKUP_OBJECT (prefs_dialog, label164, "label164"); GLADE_HOOKUP_OBJECT (prefs_dialog, notebook4, "notebook4"); GLADE_HOOKUP_OBJECT (prefs_dialog, vbox5, "vbox5");
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/keyfile.c 2010-04-11 21:56:08 UTC (rev 4817) @@ -406,6 +406,8 @@ /* toolbar */ g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show", toolbar_prefs.visible); g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_append_to_menu", toolbar_prefs.append_to_menu); + g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_use_gtk_default_style", toolbar_prefs.use_gtk_default_style); + g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_use_gtk_default_icon", toolbar_prefs.use_gtk_default_icon); g_key_file_set_integer(config, PACKAGE, "pref_toolbar_icon_style", toolbar_prefs.icon_style); g_key_file_set_integer(config, PACKAGE, "pref_toolbar_icon_size", toolbar_prefs.icon_size);
@@ -616,14 +618,6 @@ }
-#define GEANY_GET_SETTING(propertyname, value, default_value) \ - if (g_object_class_find_property( \ - G_OBJECT_GET_CLASS(G_OBJECT(gtk_settings_get_default())), propertyname)) \ - g_object_get(G_OBJECT(gtk_settings_get_default()), propertyname, &value, \ - NULL); \ - else \ - value = default_value; - static void load_dialog_prefs(GKeyFile *config) { gchar *tmp_string, *tmp_string2; @@ -729,12 +723,13 @@ toolbar_prefs.visible = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show", TRUE); toolbar_prefs.append_to_menu = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_append_to_menu", FALSE); { - GtkIconSize tb_iconsize; - GtkToolbarStyle tb_style; - GEANY_GET_SETTING("gtk-toolbar-style", tb_style, GTK_TOOLBAR_ICONS); - GEANY_GET_SETTING("gtk-toolbar-icon-size", tb_iconsize, GTK_ICON_SIZE_LARGE_TOOLBAR); - toolbar_prefs.icon_style = utils_get_setting_integer(config, PACKAGE, "pref_toolbar_icon_style", tb_style); - toolbar_prefs.icon_size = utils_get_setting_integer(config, PACKAGE, "pref_toolbar_icon_size", tb_iconsize); + toolbar_prefs.use_gtk_default_style = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_use_gtk_default_style", TRUE); + if (! toolbar_prefs.use_gtk_default_style) + toolbar_prefs.icon_style = utils_get_setting_integer(config, PACKAGE, "pref_toolbar_icon_style", GTK_TOOLBAR_ICONS); + + toolbar_prefs.use_gtk_default_icon = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_use_gtk_default_icon", TRUE); + if (! toolbar_prefs.use_gtk_default_icon) + toolbar_prefs.icon_size = utils_get_setting_integer(config, PACKAGE, "pref_toolbar_icon_size", GTK_ICON_SIZE_LARGE_TOOLBAR); }
/* VTE */
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/plugindata.h 2010-04-11 21:56:08 UTC (rev 4817) @@ -430,6 +430,7 @@ GCallback callback); void (*ui_widget_modify_font_from_string) (GtkWidget *widget, const gchar *str); gboolean (*ui_is_keyval_enter_or_return) (guint keyval); + gint (*ui_get_gtk_settings_integer) (const gchar *property_name, gint default_value); } UIUtilsFuncs;
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/plugins.c 2010-04-11 21:56:08 UTC (rev 4817) @@ -229,7 +229,8 @@ &ui_entry_add_clear_icon, &ui_menu_add_document_items, &ui_widget_modify_font_from_string, - &ui_is_keyval_enter_or_return + &ui_is_keyval_enter_or_return, + &ui_get_gtk_settings_integer };
static DialogFuncs dialog_funcs = {
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/prefs.c 2010-04-11 21:56:08 UTC (rev 4817) @@ -456,6 +456,8 @@ case 1: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_text"); break; default: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_imagetext"); break; } + if (toolbar_prefs.use_gtk_default_style) + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_style_default"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
switch (toolbar_prefs.icon_size) @@ -466,6 +468,8 @@ widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_small"); break; default: widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_verysmall"); break; } + if (toolbar_prefs.use_gtk_default_icon) + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_icon_default"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
/* disable elements if toolbar is hidden */ @@ -851,30 +855,39 @@ widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_in_menu"); toolbar_prefs.append_to_menu = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_imagetext"); - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) - toolbar_prefs.icon_style = 2; - else + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_style_default"); + toolbar_prefs.use_gtk_default_style = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); + if (! toolbar_prefs.use_gtk_default_style) { - widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_image"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_imagetext"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) - toolbar_prefs.icon_style = 0; + toolbar_prefs.icon_style = 2; else - /* now only the text only radio remains, so set text only */ - toolbar_prefs.icon_style = 1; + { + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_image"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) + toolbar_prefs.icon_style = 0; + else + /* now only the text only radio remains, so set text only */ + toolbar_prefs.icon_style = 1; + } }
- - widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_large"); - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) - toolbar_prefs.icon_size = GTK_ICON_SIZE_LARGE_TOOLBAR; - else - { - widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_small"); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_icon_default"); + toolbar_prefs.use_gtk_default_icon = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); + if (! toolbar_prefs.use_gtk_default_icon) + { toolbar_prefs.icon_size = GTK_ICON_SIZE_LARGE_TOOLBAR; + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_large"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) - toolbar_prefs.icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR; + toolbar_prefs.icon_size = GTK_ICON_SIZE_LARGE_TOOLBAR; else - toolbar_prefs.icon_size = GTK_ICON_SIZE_MENU; + { + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "radio_toolbar_small"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) + toolbar_prefs.icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR; + else + toolbar_prefs.icon_size = GTK_ICON_SIZE_MENU; + } }
/* Files settings */ @@ -1409,8 +1422,13 @@ { gboolean sens = gtk_toggle_button_get_active(togglebutton);
- gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "frame13"), sens); gtk_widget_set_sensitive( + ui_lookup_widget(ui_widgets.prefs_dialog, "frame_toolbar_style"), sens); + gtk_widget_set_sensitive( + ui_lookup_widget(ui_widgets.prefs_dialog, "frame_toolbar_icon"), sens); + gtk_widget_set_sensitive( + ui_lookup_widget(ui_widgets.prefs_dialog, "button_customize_toolbar"), sens); + gtk_widget_set_sensitive( ui_lookup_widget(ui_widgets.prefs_dialog, "check_toolbar_in_menu"), sens); }
Modified: trunk/src/toolbar.c =================================================================== --- trunk/src/toolbar.c 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/toolbar.c 2010-04-11 21:56:08 UTC (rev 4817) @@ -505,43 +505,62 @@ }
-void toolbar_apply_settings(void) +/* sets the icon style of the toolbar */ +void toolbar_set_icon_style(void) { - /* sets the icon style of the toolbar */ - switch (toolbar_prefs.icon_style) + gint icon_style; + + icon_style = toolbar_prefs.icon_style; + + if (toolbar_prefs.use_gtk_default_style) + icon_style = ui_get_gtk_settings_integer("gtk-toolbar-style", toolbar_prefs.icon_style); + + gtk_toolbar_set_style(GTK_TOOLBAR(main_widgets.toolbar), icon_style); + + switch (icon_style) { default: case GTK_TOOLBAR_BOTH: { - /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "images_and_text1")), TRUE);*/ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(ui_widgets.toolbar_menu, "images_and_text2")), TRUE); break; } case GTK_TOOLBAR_ICONS: { - /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "images_only1")), TRUE);*/ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(ui_widgets.toolbar_menu, "images_only2")), TRUE); break; } case GTK_TOOLBAR_TEXT: { - /*gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "text_only1")), TRUE);*/ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(ui_widgets.toolbar_menu, "text_only2")), TRUE); break; } } - gtk_toolbar_set_style(GTK_TOOLBAR(main_widgets.toolbar), toolbar_prefs.icon_style); + g_message("%d style %d (%d)", toolbar_prefs.use_gtk_default_style, icon_style, toolbar_prefs.icon_style); +}
- /* sets the icon size of the toolbar, use user preferences (.gtkrc) if not set */ - if (toolbar_prefs.icon_size == GTK_ICON_SIZE_SMALL_TOOLBAR || - toolbar_prefs.icon_size == GTK_ICON_SIZE_LARGE_TOOLBAR || - toolbar_prefs.icon_size == GTK_ICON_SIZE_MENU) - { - gtk_toolbar_set_icon_size(GTK_TOOLBAR(main_widgets.toolbar), toolbar_prefs.icon_size); - } + +/* sets the icon size of the toolbar */ +void toolbar_set_icon_size(void) +{ + gint icon_size; + + icon_size = toolbar_prefs.icon_size; + + if (toolbar_prefs.use_gtk_default_icon) + icon_size = ui_get_gtk_settings_integer("gtk-toolbar-icon-size", toolbar_prefs.icon_size); + + gtk_toolbar_set_icon_size(GTK_TOOLBAR(main_widgets.toolbar), icon_size); }
+void toolbar_apply_settings(void) +{ + toolbar_set_icon_style(); + toolbar_set_icon_size(); +} + + #define TB_EDITOR_SEPARATOR _("Separator") #define TB_EDITOR_SEPARATOR_LABEL _("--- Separator ---") typedef struct
Modified: trunk/src/toolbar.h =================================================================== --- trunk/src/toolbar.h 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/toolbar.h 2010-04-11 21:56:08 UTC (rev 4817) @@ -30,6 +30,8 @@ gboolean visible; GtkIconSize icon_size; GtkToolbarStyle icon_style; /**< Icon style. */ + gboolean use_gtk_default_style; + gboolean use_gtk_default_icon; gboolean append_to_menu; } GeanyToolbarPrefs; @@ -49,6 +51,10 @@
void toolbar_apply_settings(void);
+void toolbar_set_icon_style(void); + +void toolbar_set_icon_size(void); + void toolbar_show_hide(void);
void toolbar_item_ref(GtkToolItem *item);
Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/ui_utils.c 2010-04-11 21:56:08 UTC (rev 4817) @@ -2245,3 +2245,23 @@ { return (keyval == GDK_Return || keyval == GDK_ISO_Enter|| keyval == GDK_KP_Enter); } + + +/** Reads an integer from the GTK default settings registry + * (see http://library.gnome.org/devel/gtk/stable/GtkSettings.html). + * @param property_name The property to read. + * @param default_value The default value in case the value could not be read. + * @return The value for the property if it exists, otherwise the @a default_value. + * @since 0.19 */ +gint ui_get_gtk_settings_integer(const gchar *property_name, gint default_value) +{ + if (g_object_class_find_property(G_OBJECT_GET_CLASS(G_OBJECT( + gtk_settings_get_default())), property_name)) + { + gint value; + g_object_get(G_OBJECT(gtk_settings_get_default()), property_name, &value, NULL); + return value; + } + else + return default_value; +}
Modified: trunk/src/ui_utils.h =================================================================== --- trunk/src/ui_utils.h 2010-04-11 13:45:26 UTC (rev 4816) +++ trunk/src/ui_utils.h 2010-04-11 21:56:08 UTC (rev 4817) @@ -306,4 +306,6 @@
gboolean ui_is_keyval_enter_or_return(guint keyval);
+gint ui_get_gtk_settings_integer(const gchar *property_name, gint default_value); + #endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.