Improved toolbar popup menu.
Added new preferences tab for toolbar settings, several toolbar buttons can be hidden. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@548 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
1ae05d6a35
commit
100987ee91
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2006-07-11 Enrico Tröger <enrico.troeger@uvena.de>
|
||||
|
||||
* src/dialogs.c: Moved dialogs_show_prefs_dialog() to src/prefs.c.
|
||||
* geany.glade, src/interface.c, src/vte.c, src/prefs.c, src/dialogs.c,
|
||||
src/geany.h, src/main.c, src/callbacks.c, src/keybindings.c,
|
||||
src/keyfile.c, src/utils.c:
|
||||
Improved toolbar popup menu.
|
||||
Added new preferences tab for toolbar settings, several toolbar
|
||||
buttons can be hidden.
|
||||
|
||||
|
||||
2006-07-11 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||
|
||||
* src/main.c: Prefix command-line opened files with the current
|
||||
|
655
geany.glade
655
geany.glade
@ -31,6 +31,7 @@
|
||||
<child>
|
||||
<widget class="GtkMenuBar" id="menubar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Undo the last modification</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="menuitem1">
|
||||
@ -1153,6 +1154,51 @@
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="toolbutton_undo">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Undo the last modification</property>
|
||||
<property name="stock_id">gtk-undo</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_undo1_activate" last_modification_time="Mon, 10 Jul 2006 19:52:02 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="toolbutton_redo">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Redo the last modification</property>
|
||||
<property name="stock_id">gtk-redo</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_redo1_activate" last_modification_time="Mon, 10 Jul 2006 19:52:14 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorToolItem" id="separatortoolitem9">
|
||||
<property name="visible">True</property>
|
||||
<property name="draw">True</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="toolbutton13">
|
||||
<property name="visible">True</property>
|
||||
@ -1900,19 +1946,22 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="large_icons1">
|
||||
<widget class="GtkRadioMenuItem" id="large_icons1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Large icons</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<signal name="activate" handler="on_toolbar_large_icons1_activate" last_modification_time="Sat, 22 Oct 2005 11:52:26 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="small_icons1">
|
||||
<widget class="GtkRadioMenuItem" id="small_icons1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Small icons</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="group">large_icons1</property>
|
||||
<signal name="activate" handler="on_toolbar_small_icons1_activate" last_modification_time="Sat, 22 Oct 2005 11:52:26 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
@ -1931,7 +1980,7 @@
|
||||
<signal name="activate" handler="on_hide_toolbar1_activate" last_modification_time="Sat, 30 Apr 2005 20:23:03 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image415">
|
||||
<widget class="GtkImage" id="image800">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-cancel</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -2347,7 +2396,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="show_tabs">True</property>
|
||||
<property name="show_border">True</property>
|
||||
<property name="tab_pos">GTK_POS_TOP</property>
|
||||
<property name="tab_pos">GTK_POS_LEFT</property>
|
||||
<property name="scrollable">False</property>
|
||||
<property name="enable_popup">False</property>
|
||||
|
||||
@ -2742,100 +2791,7 @@
|
||||
<property name="spacing">10</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame3">
|
||||
<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="GtkAlignment" id="alignment4">
|
||||
<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="vbox7">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="check_toolbar_search">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Display the search field and button in the toolbar</property>
|
||||
<property name="label" translatable="yes">Show search field</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</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="GtkCheckButton" id="check_toolbar_goto">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Display the line number field and button in the toolbar</property>
|
||||
<property name="label" translatable="yes">Show goto line field</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</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="GtkLabel" id="label98">
|
||||
<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">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
@ -3647,6 +3603,509 @@ Bottom
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox15">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">10</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame12">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0.5</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment15">
|
||||
<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="GtkCheckButton" id="check_toolbar_show">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Show Toolbar</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label166">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></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="GtkFrame" id="frame11">
|
||||
<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="GtkAlignment" id="alignment14">
|
||||
<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="vbox16">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="check_toolbar_compile">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Display the Compile and Run buttons in the toolbar</property>
|
||||
<property name="label" translatable="yes">Show Compile and Run</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</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="GtkCheckButton" id="check_toolbar_colour">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Display the Colour Chooser button in the toolbar</property>
|
||||
<property name="label" translatable="yes">Show Colour Chooser button</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</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="GtkCheckButton" id="check_toolbar_zoom">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Display the Zoom In and Zoom Out buttons in the toolbar</property>
|
||||
<property name="label" translatable="yes">Show Zoom In and Zoom Out</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</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="GtkCheckButton" id="check_toolbar_undo">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Display the Redo and Undo buttons in the toolbar</property>
|
||||
<property name="label" translatable="yes">Show Redo and Undo buttons</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</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="GtkCheckButton" id="check_toolbar_search">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Display the search field and button in the toolbar</property>
|
||||
<property name="label" translatable="yes">Show Search field</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</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="GtkCheckButton" id="check_toolbar_goto">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Display the line number field and button in the toolbar</property>
|
||||
<property name="label" translatable="yes">Show Goto line field</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">False</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="GtkLabel" id="label165">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Items</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="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="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="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">5</property>
|
||||
<property name="column_spacing">5</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="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="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_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>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
|
||||
<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_large</property>
|
||||
</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>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<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="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>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<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>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
<property name="tab_fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label164">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Toolbar</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.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">tab</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox5">
|
||||
<property name="visible">True</property>
|
||||
|
@ -68,6 +68,10 @@ static gboolean closing_all = FALSE;
|
||||
// represents the state at switching a notebook page, to update check menu items in document menu
|
||||
static gboolean switch_notebook_page = FALSE;
|
||||
|
||||
// flag to indicate the explicit change of a toggle button of the toolbar menu and so the
|
||||
// toggled callback should ignore the change since it is not triggered by the user
|
||||
static gboolean ignore_toolbar_toggle = FALSE;
|
||||
|
||||
// represents the state at switching a notebook page(in the left treeviews widget), to not emit
|
||||
// the selection-changed signal from tv.tree_openfiles
|
||||
//static gboolean switch_tv_notebook_page = FALSE;
|
||||
@ -522,6 +526,8 @@ void
|
||||
on_images_and_text2_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (ignore_toolbar_toggle) return;
|
||||
|
||||
gtk_toolbar_set_style(GTK_TOOLBAR(app->toolbar), GTK_TOOLBAR_BOTH);
|
||||
app->toolbar_icon_style = GTK_TOOLBAR_BOTH;
|
||||
}
|
||||
@ -531,6 +537,8 @@ void
|
||||
on_images_only2_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (ignore_toolbar_toggle) return;
|
||||
|
||||
gtk_toolbar_set_style(GTK_TOOLBAR(app->toolbar), GTK_TOOLBAR_ICONS);
|
||||
app->toolbar_icon_style = GTK_TOOLBAR_ICONS;
|
||||
}
|
||||
@ -540,6 +548,8 @@ void
|
||||
on_text_only2_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (ignore_toolbar_toggle) return;
|
||||
|
||||
gtk_toolbar_set_style(GTK_TOOLBAR(app->toolbar), GTK_TOOLBAR_TEXT);
|
||||
app->toolbar_icon_style = GTK_TOOLBAR_TEXT;
|
||||
}
|
||||
@ -624,6 +634,8 @@ void
|
||||
on_toolbar_large_icons1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (ignore_toolbar_toggle) return;
|
||||
|
||||
app->toolbar_icon_size = GTK_ICON_SIZE_LARGE_TOOLBAR;
|
||||
utils_update_toolbar_icons(GTK_ICON_SIZE_LARGE_TOOLBAR);
|
||||
}
|
||||
@ -633,6 +645,8 @@ void
|
||||
on_toolbar_small_icons1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (ignore_toolbar_toggle) return;
|
||||
|
||||
app->toolbar_icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR;
|
||||
utils_update_toolbar_icons(GTK_ICON_SIZE_SMALL_TOOLBAR);
|
||||
}
|
||||
@ -1106,6 +1120,28 @@ toolbar_popup_menu (GtkWidget *widget,
|
||||
{
|
||||
if (event->button == 3)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
ignore_toolbar_toggle = TRUE;
|
||||
|
||||
switch (app->toolbar_icon_style)
|
||||
{
|
||||
case 0: widget = lookup_widget(app->toolbar_menu, "images_only2"); break;
|
||||
case 1: widget = lookup_widget(app->toolbar_menu, "text_only2"); break;
|
||||
default: widget = lookup_widget(app->toolbar_menu, "images_and_text2"); break;
|
||||
}
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), TRUE);
|
||||
|
||||
switch (app->toolbar_icon_size)
|
||||
{
|
||||
case GTK_ICON_SIZE_LARGE_TOOLBAR:
|
||||
widget = lookup_widget(app->toolbar_menu, "large_icons1"); break;
|
||||
default: widget = lookup_widget(app->toolbar_menu, "small_icons1"); break;
|
||||
}
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), TRUE);
|
||||
|
||||
ignore_toolbar_toggle = FALSE;
|
||||
|
||||
gtk_menu_popup(GTK_MENU(app->toolbar_menu), NULL, NULL, NULL, NULL, event->button, event->time);
|
||||
|
||||
return TRUE;
|
||||
@ -1199,15 +1235,8 @@ void
|
||||
on_show_toolbar1_toggled (GtkCheckMenuItem *checkmenuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (app->toolbar_visible)
|
||||
{
|
||||
gtk_widget_hide(GTK_WIDGET(app->toolbar));
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_show(GTK_WIDGET(app->toolbar));
|
||||
}
|
||||
app->toolbar_visible = (app->toolbar_visible) ? FALSE : TRUE;;
|
||||
utils_widget_show_hide(GTK_WIDGET(app->toolbar), app->toolbar_visible);
|
||||
}
|
||||
|
||||
|
||||
@ -2509,3 +2538,4 @@ on_menu_select_all1_activate (GtkMenuItem *menuitem,
|
||||
sci_select_all(doc_list[idx].sci);
|
||||
}
|
||||
|
||||
|
||||
|
@ -590,3 +590,4 @@ on_print1_activate (GtkMenuItem *menuitem,
|
||||
void
|
||||
on_menu_select_all1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
|
199
src/dialogs.c
199
src/dialogs.c
@ -42,11 +42,10 @@
|
||||
#include "win32.h"
|
||||
#include "sciwrappers.h"
|
||||
#include "support.h"
|
||||
#include "interface.h"
|
||||
//#include "interface.h"
|
||||
#include "utils.h"
|
||||
#include "prefs.h"
|
||||
#include "keybindings.h"
|
||||
#include "encodings.h"
|
||||
|
||||
|
||||
|
||||
@ -1661,202 +1660,6 @@ void dialogs_show_file_properties(gint idx)
|
||||
}
|
||||
|
||||
|
||||
void dialogs_show_prefs_dialog(void)
|
||||
{
|
||||
if (app->prefs_dialog == NULL)
|
||||
{
|
||||
#ifdef HAVE_VTE
|
||||
GtkWidget *notebook, *vbox, *label, *alignment, *table;
|
||||
GtkWidget *font_term, *color_fore, *color_back, *spin_scrollback, *entry_emulation;
|
||||
GtkWidget *check_scroll_key, *check_scroll_out, *check_follow_path;
|
||||
GtkTooltips *tooltips;
|
||||
GtkObject *spin_scrollback_adj;
|
||||
#endif
|
||||
GtkWidget *combo;
|
||||
guint i;
|
||||
gchar *encoding_string;
|
||||
|
||||
app->prefs_dialog = create_prefs_dialog();
|
||||
gtk_window_set_transient_for(GTK_WINDOW(app->prefs_dialog), GTK_WINDOW(app->window));
|
||||
|
||||
// init the default file encoding combo box
|
||||
combo = lookup_widget(app->prefs_dialog, "combo_encoding");
|
||||
gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(combo), 3);
|
||||
for (i = 0; i < GEANY_ENCODINGS_MAX; i++)
|
||||
{
|
||||
encoding_string = encodings_to_string(&encodings[i]);
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), encoding_string);
|
||||
g_free(encoding_string);
|
||||
}
|
||||
|
||||
#ifdef HAVE_VTE
|
||||
if (app->have_vte)
|
||||
{
|
||||
tooltips = GTK_TOOLTIPS(lookup_widget(app->prefs_dialog, "tooltips"));
|
||||
notebook = lookup_widget(app->prefs_dialog, "notebook2");
|
||||
vbox = gtk_vbox_new(FALSE, 0);
|
||||
gtk_container_add(GTK_CONTAINER(notebook), vbox);
|
||||
|
||||
label = gtk_label_new(_("These are settings for the virtual terminal emulator widget (VTE). They only apply, if the VTE library could be loaded."));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
|
||||
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_FILL);
|
||||
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.14, 0.19);
|
||||
gtk_misc_set_padding(GTK_MISC(label), 0, 8);
|
||||
|
||||
alignment = gtk_alignment_new(0.5, 0.5, 1, 1);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0);
|
||||
gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 6);
|
||||
|
||||
table = gtk_table_new(8, 2, FALSE);
|
||||
gtk_container_add(GTK_CONTAINER(alignment), table);
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 3);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 25);
|
||||
|
||||
label = gtk_label_new(_("Terminal font"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
font_term = gtk_font_button_new();
|
||||
gtk_table_attach(GTK_TABLE(table), font_term, 1, 2, 0, 1,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, font_term, _("Sets the font for the terminal widget."), NULL);
|
||||
|
||||
label = gtk_label_new(_("Foreground color"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
label = gtk_label_new(_("Background color"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
color_fore = gtk_color_button_new();
|
||||
gtk_table_attach(GTK_TABLE(table), color_fore, 1, 2, 1, 2,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, color_fore, _("Sets the foreground color of the text in the terminal widget."), NULL);
|
||||
gtk_color_button_set_title(GTK_COLOR_BUTTON(color_fore), _("Color Chooser"));
|
||||
|
||||
color_back = gtk_color_button_new();
|
||||
gtk_table_attach(GTK_TABLE(table), color_back, 1, 2, 2, 3,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, color_back, _("Sets the background color of the text in the terminal widget."), NULL);
|
||||
gtk_color_button_set_title(GTK_COLOR_BUTTON(color_back), _("Color Chooser"));
|
||||
|
||||
label = gtk_label_new(_("Scrollback lines"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
spin_scrollback_adj = gtk_adjustment_new(500, 0, 5000, 1, 10, 10);
|
||||
spin_scrollback = gtk_spin_button_new(GTK_ADJUSTMENT(spin_scrollback_adj), 1, 0);
|
||||
gtk_table_attach(GTK_TABLE(table), spin_scrollback, 1, 2, 3, 4,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, spin_scrollback, _("Specifies the history in lines, which you can scroll back in the terminal widget."), NULL);
|
||||
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_scrollback), TRUE);
|
||||
gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_scrollback), TRUE);
|
||||
|
||||
label = gtk_label_new(_("Terminal emulation"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
entry_emulation = gtk_entry_new();
|
||||
gtk_table_attach(GTK_TABLE(table), entry_emulation, 1, 2, 4, 5,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entry_emulation, _("Controls how the terminal emulator should behave. xterm is a good start."), NULL);
|
||||
|
||||
check_scroll_key = gtk_check_button_new_with_mnemonic(_("Scroll on keystroke"));
|
||||
gtk_table_attach(GTK_TABLE(table), check_scroll_key, 1, 2, 5, 6,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, check_scroll_key, _("Whether to scroll to the bottom if a key was pressed."), NULL);
|
||||
gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_key), FALSE);
|
||||
|
||||
check_scroll_out = gtk_check_button_new_with_mnemonic(_("Scroll on output"));
|
||||
gtk_table_attach(GTK_TABLE(table), check_scroll_out, 1, 2, 6, 7,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, check_scroll_out, _("Whether to scroll to the bottom if an output was generated."), NULL);
|
||||
gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_out), FALSE);
|
||||
|
||||
check_follow_path = gtk_check_button_new_with_mnemonic(_("Follow the path of the current file"));
|
||||
gtk_table_attach(GTK_TABLE(table), check_follow_path, 1, 2, 7, 8,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, check_follow_path, _("Whether to execute \"cd $path\" when you switch between opened files."), NULL);
|
||||
gtk_button_set_focus_on_click(GTK_BUTTON(check_follow_path), FALSE);
|
||||
|
||||
label = gtk_label_new(_("Terminal"));
|
||||
gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(
|
||||
GTK_NOTEBOOK(notebook), 6), label);
|
||||
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "font_term",
|
||||
gtk_widget_ref(font_term), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "color_fore",
|
||||
gtk_widget_ref(color_fore), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "color_back",
|
||||
gtk_widget_ref(color_back), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "spin_scrollback",
|
||||
gtk_widget_ref(spin_scrollback), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "entry_emulation",
|
||||
gtk_widget_ref(entry_emulation), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_scroll_key",
|
||||
gtk_widget_ref(check_scroll_key), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_scroll_out",
|
||||
gtk_widget_ref(check_scroll_out), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_follow_path",
|
||||
gtk_widget_ref(check_follow_path), (GDestroyNotify) gtk_widget_unref);
|
||||
|
||||
gtk_widget_show_all(vbox);
|
||||
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "font_term"),
|
||||
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(4));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "color_fore"),
|
||||
"color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(2));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "color_back"),
|
||||
"color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(3));
|
||||
}
|
||||
#endif
|
||||
g_signal_connect((gpointer) app->prefs_dialog, "response", G_CALLBACK(on_prefs_button_clicked), NULL);
|
||||
g_signal_connect((gpointer) app->prefs_dialog, "delete_event", G_CALLBACK(on_prefs_delete_event), NULL);
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "tagbar_font"),
|
||||
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(1));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "msgwin_font"),
|
||||
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(2));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "editor_font"),
|
||||
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(3));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "long_line_color"),
|
||||
"color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(1));
|
||||
// file chooser buttons in the tools tab
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "button_make"),
|
||||
"clicked", G_CALLBACK(on_pref_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_com_make"));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "button_term"),
|
||||
"clicked", G_CALLBACK(on_pref_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_com_term"));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "button_browser"),
|
||||
"clicked", G_CALLBACK(on_pref_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_browser"));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "button_print"),
|
||||
"clicked", G_CALLBACK(on_pref_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_print"));
|
||||
|
||||
}
|
||||
|
||||
prefs_init_dialog();
|
||||
gtk_widget_show(app->prefs_dialog);
|
||||
}
|
||||
|
||||
|
||||
gboolean dialogs_show_question(const gchar *text, ...)
|
||||
{
|
||||
#ifndef GEANY_WIN32
|
||||
|
@ -75,8 +75,6 @@ gboolean dialogs_show_mkcfgdir_error(gint error_nr);
|
||||
|
||||
void dialogs_show_file_properties(gint idx);
|
||||
|
||||
void dialogs_show_prefs_dialog(void);
|
||||
|
||||
gboolean dialogs_show_question(const gchar *text, ...);
|
||||
|
||||
void dialogs_show_keyboard_shortcuts(void);
|
||||
|
12
src/geany.h
12
src/geany.h
@ -163,8 +163,12 @@ typedef struct MyApp
|
||||
gboolean pref_main_load_session;
|
||||
gboolean pref_main_save_winpos;
|
||||
gboolean pref_main_confirm_exit;
|
||||
gboolean pref_main_show_search;
|
||||
gboolean pref_main_show_goto;
|
||||
gboolean pref_toolbar_show_search;
|
||||
gboolean pref_toolbar_show_goto;
|
||||
gboolean pref_toolbar_show_undo;
|
||||
gboolean pref_toolbar_show_compile;
|
||||
gboolean pref_toolbar_show_zoom;
|
||||
gboolean pref_toolbar_show_colour;
|
||||
gint tab_pos_editor;
|
||||
gint tab_pos_msgwin;
|
||||
gint tab_pos_sidebar;
|
||||
@ -215,8 +219,8 @@ typedef struct MyApp
|
||||
GtkWidget *popup_goto_items[3];
|
||||
GtkWidget *popup_items[4];
|
||||
GtkWidget *menu_copy_items[4];
|
||||
GtkWidget *redo_items[2];
|
||||
GtkWidget *undo_items[2];
|
||||
GtkWidget *redo_items[3];
|
||||
GtkWidget *undo_items[3];
|
||||
GtkWidget *save_buttons[2];
|
||||
GtkWidget *sensitive_buttons[33];
|
||||
GtkWidget *open_colorsel;
|
||||
|
320
src/interface.c
320
src/interface.c
@ -161,6 +161,9 @@ create_window1 (void)
|
||||
GtkWidget *toolbutton23;
|
||||
GtkWidget *toolbutton15;
|
||||
GtkWidget *separatortoolitem2;
|
||||
GtkWidget *toolbutton_undo;
|
||||
GtkWidget *toolbutton_redo;
|
||||
GtkWidget *separatortoolitem9;
|
||||
GtkWidget *tmp_image;
|
||||
GtkWidget *toolbutton13;
|
||||
GtkWidget *toolbutton26;
|
||||
@ -223,6 +226,7 @@ create_window1 (void)
|
||||
menubar1 = gtk_menu_bar_new ();
|
||||
gtk_widget_show (menubar1);
|
||||
gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0);
|
||||
gtk_tooltips_set_tip (tooltips, menubar1, _("Undo the last modification"), NULL);
|
||||
|
||||
menuitem1 = gtk_menu_item_new_with_mnemonic (_("_File"));
|
||||
gtk_widget_show (menuitem1);
|
||||
@ -770,6 +774,20 @@ create_window1 (void)
|
||||
gtk_widget_show (separatortoolitem2);
|
||||
gtk_container_add (GTK_CONTAINER (toolbar1), separatortoolitem2);
|
||||
|
||||
toolbutton_undo = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-undo");
|
||||
gtk_widget_show (toolbutton_undo);
|
||||
gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton_undo);
|
||||
gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton_undo), tooltips, _("Undo the last modification"), NULL);
|
||||
|
||||
toolbutton_redo = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-redo");
|
||||
gtk_widget_show (toolbutton_redo);
|
||||
gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton_redo);
|
||||
gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton_redo), tooltips, _("Redo the last modification"), NULL);
|
||||
|
||||
separatortoolitem9 = (GtkWidget*) gtk_separator_tool_item_new ();
|
||||
gtk_widget_show (separatortoolitem9);
|
||||
gtk_container_add (GTK_CONTAINER (toolbar1), separatortoolitem9);
|
||||
|
||||
tmp_image = gtk_image_new_from_stock ("gtk-convert", tmp_toolbar_icon_size);
|
||||
gtk_widget_show (tmp_image);
|
||||
toolbutton13 = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Compile"));
|
||||
@ -1171,6 +1189,12 @@ create_window1 (void)
|
||||
g_signal_connect ((gpointer) toolbutton15, "clicked",
|
||||
G_CALLBACK (on_toolbutton15_clicked),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) toolbutton_undo, "clicked",
|
||||
G_CALLBACK (on_undo1_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) toolbutton_redo, "clicked",
|
||||
G_CALLBACK (on_redo1_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) toolbutton13, "clicked",
|
||||
G_CALLBACK (on_compile_button_clicked),
|
||||
NULL);
|
||||
@ -1349,6 +1373,9 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, toolbutton23, "toolbutton23");
|
||||
GLADE_HOOKUP_OBJECT (window1, toolbutton15, "toolbutton15");
|
||||
GLADE_HOOKUP_OBJECT (window1, separatortoolitem2, "separatortoolitem2");
|
||||
GLADE_HOOKUP_OBJECT (window1, toolbutton_undo, "toolbutton_undo");
|
||||
GLADE_HOOKUP_OBJECT (window1, toolbutton_redo, "toolbutton_redo");
|
||||
GLADE_HOOKUP_OBJECT (window1, separatortoolitem9, "separatortoolitem9");
|
||||
GLADE_HOOKUP_OBJECT (window1, toolbutton13, "toolbutton13");
|
||||
GLADE_HOOKUP_OBJECT (window1, toolbutton26, "toolbutton26");
|
||||
GLADE_HOOKUP_OBJECT (window1, separatortoolitem6, "separatortoolitem6");
|
||||
@ -1409,11 +1436,12 @@ create_toolbar_popup_menu1 (void)
|
||||
GtkWidget *images_only2;
|
||||
GtkWidget *text_only2;
|
||||
GtkWidget *separator1;
|
||||
GSList *large_icons1_group = NULL;
|
||||
GtkWidget *large_icons1;
|
||||
GtkWidget *small_icons1;
|
||||
GtkWidget *separator20;
|
||||
GtkWidget *hide_toolbar1;
|
||||
GtkWidget *image415;
|
||||
GtkWidget *image800;
|
||||
|
||||
toolbar_popup_menu1 = gtk_menu_new ();
|
||||
|
||||
@ -1440,11 +1468,13 @@ create_toolbar_popup_menu1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (toolbar_popup_menu1), separator1);
|
||||
gtk_widget_set_sensitive (separator1, FALSE);
|
||||
|
||||
large_icons1 = gtk_menu_item_new_with_mnemonic (_("Large icons"));
|
||||
large_icons1 = gtk_radio_menu_item_new_with_mnemonic (large_icons1_group, _("Large icons"));
|
||||
large_icons1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (large_icons1));
|
||||
gtk_widget_show (large_icons1);
|
||||
gtk_container_add (GTK_CONTAINER (toolbar_popup_menu1), large_icons1);
|
||||
|
||||
small_icons1 = gtk_menu_item_new_with_mnemonic (_("Small icons"));
|
||||
small_icons1 = gtk_radio_menu_item_new_with_mnemonic (large_icons1_group, _("Small icons"));
|
||||
large_icons1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (small_icons1));
|
||||
gtk_widget_show (small_icons1);
|
||||
gtk_container_add (GTK_CONTAINER (toolbar_popup_menu1), small_icons1);
|
||||
|
||||
@ -1457,9 +1487,9 @@ create_toolbar_popup_menu1 (void)
|
||||
gtk_widget_show (hide_toolbar1);
|
||||
gtk_container_add (GTK_CONTAINER (toolbar_popup_menu1), hide_toolbar1);
|
||||
|
||||
image415 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image415);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (hide_toolbar1), image415);
|
||||
image800 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image800);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (hide_toolbar1), image800);
|
||||
|
||||
g_signal_connect ((gpointer) images_and_text2, "activate",
|
||||
G_CALLBACK (on_images_and_text2_activate),
|
||||
@ -1490,7 +1520,7 @@ create_toolbar_popup_menu1 (void)
|
||||
GLADE_HOOKUP_OBJECT (toolbar_popup_menu1, small_icons1, "small_icons1");
|
||||
GLADE_HOOKUP_OBJECT (toolbar_popup_menu1, separator20, "separator20");
|
||||
GLADE_HOOKUP_OBJECT (toolbar_popup_menu1, hide_toolbar1, "hide_toolbar1");
|
||||
GLADE_HOOKUP_OBJECT (toolbar_popup_menu1, image415, "image415");
|
||||
GLADE_HOOKUP_OBJECT (toolbar_popup_menu1, image800, "image800");
|
||||
|
||||
return toolbar_popup_menu1;
|
||||
}
|
||||
@ -1853,12 +1883,6 @@ create_prefs_dialog (void)
|
||||
GtkWidget *label162;
|
||||
GtkWidget *label94;
|
||||
GtkWidget *vbox14;
|
||||
GtkWidget *frame3;
|
||||
GtkWidget *alignment4;
|
||||
GtkWidget *vbox7;
|
||||
GtkWidget *check_toolbar_search;
|
||||
GtkWidget *check_toolbar_goto;
|
||||
GtkWidget *label98;
|
||||
GtkWidget *frame7;
|
||||
GtkWidget *alignment9;
|
||||
GtkWidget *vbox11;
|
||||
@ -1901,6 +1925,35 @@ create_prefs_dialog (void)
|
||||
GtkWidget *combo_tab_editor;
|
||||
GtkWidget *label158;
|
||||
GtkWidget *label157;
|
||||
GtkWidget *vbox15;
|
||||
GtkWidget *frame12;
|
||||
GtkWidget *alignment15;
|
||||
GtkWidget *check_toolbar_show;
|
||||
GtkWidget *label166;
|
||||
GtkWidget *frame11;
|
||||
GtkWidget *alignment14;
|
||||
GtkWidget *vbox16;
|
||||
GtkWidget *check_toolbar_compile;
|
||||
GtkWidget *check_toolbar_colour;
|
||||
GtkWidget *check_toolbar_zoom;
|
||||
GtkWidget *check_toolbar_undo;
|
||||
GtkWidget *check_toolbar_search;
|
||||
GtkWidget *check_toolbar_goto;
|
||||
GtkWidget *label165;
|
||||
GtkWidget *frame13;
|
||||
GtkWidget *alignment16;
|
||||
GtkWidget *table9;
|
||||
GtkWidget *radio_toolbar_imagetext;
|
||||
GSList *radio_toolbar_imagetext_group = NULL;
|
||||
GtkWidget *radio_toolbar_image;
|
||||
GtkWidget *radio_toolbar_text;
|
||||
GtkWidget *radio_toolbar_large;
|
||||
GSList *radio_toolbar_large_group = NULL;
|
||||
GtkWidget *radio_toolbar_small;
|
||||
GtkWidget *label169;
|
||||
GtkWidget *label170;
|
||||
GtkWidget *label167;
|
||||
GtkWidget *label164;
|
||||
GtkWidget *vbox5;
|
||||
GtkWidget *frame6;
|
||||
GtkWidget *alignment7;
|
||||
@ -1996,6 +2049,7 @@ create_prefs_dialog (void)
|
||||
gtk_widget_show (notebook2);
|
||||
gtk_box_pack_start (GTK_BOX (dialog_vbox3), notebook2, TRUE, TRUE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (notebook2, GTK_CAN_FOCUS);
|
||||
gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook2), GTK_POS_LEFT);
|
||||
|
||||
frame10 = gtk_frame_new (NULL);
|
||||
gtk_widget_show (frame10);
|
||||
@ -2109,39 +2163,6 @@ create_prefs_dialog (void)
|
||||
gtk_widget_show (vbox14);
|
||||
gtk_container_add (GTK_CONTAINER (notebook2), vbox14);
|
||||
|
||||
frame3 = gtk_frame_new (NULL);
|
||||
gtk_widget_show (frame3);
|
||||
gtk_box_pack_start (GTK_BOX (vbox14), frame3, TRUE, TRUE, 0);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_NONE);
|
||||
|
||||
alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||
gtk_widget_show (alignment4);
|
||||
gtk_container_add (GTK_CONTAINER (frame3), alignment4);
|
||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 12, 0);
|
||||
|
||||
vbox7 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (vbox7);
|
||||
gtk_container_add (GTK_CONTAINER (alignment4), vbox7);
|
||||
|
||||
check_toolbar_search = gtk_check_button_new_with_mnemonic (_("Show search field"));
|
||||
gtk_widget_show (check_toolbar_search);
|
||||
gtk_box_pack_start (GTK_BOX (vbox7), check_toolbar_search, FALSE, FALSE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_search, GTK_CAN_FOCUS);
|
||||
gtk_tooltips_set_tip (tooltips, check_toolbar_search, _("Display the search field and button in the toolbar"), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_search), FALSE);
|
||||
|
||||
check_toolbar_goto = gtk_check_button_new_with_mnemonic (_("Show goto line field"));
|
||||
gtk_widget_show (check_toolbar_goto);
|
||||
gtk_box_pack_start (GTK_BOX (vbox7), check_toolbar_goto, FALSE, FALSE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_goto, GTK_CAN_FOCUS);
|
||||
gtk_tooltips_set_tip (tooltips, check_toolbar_goto, _("Display the line number field and button in the toolbar"), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_goto), FALSE);
|
||||
|
||||
label98 = gtk_label_new (_("<b>Toolbar</b>"));
|
||||
gtk_widget_show (label98);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame3), label98);
|
||||
gtk_label_set_use_markup (GTK_LABEL (label98), TRUE);
|
||||
|
||||
frame7 = gtk_frame_new (NULL);
|
||||
gtk_widget_show (frame7);
|
||||
gtk_box_pack_start (GTK_BOX (vbox14), frame7, TRUE, TRUE, 0);
|
||||
@ -2400,6 +2421,172 @@ create_prefs_dialog (void)
|
||||
gtk_widget_show (label157);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 1), label157);
|
||||
|
||||
vbox15 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_widget_show (vbox15);
|
||||
gtk_container_add (GTK_CONTAINER (notebook2), vbox15);
|
||||
|
||||
frame12 = gtk_frame_new (NULL);
|
||||
gtk_widget_show (frame12);
|
||||
gtk_box_pack_start (GTK_BOX (vbox15), frame12, FALSE, FALSE, 0);
|
||||
gtk_frame_set_label_align (GTK_FRAME (frame12), 0.5, 0.5);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame12), GTK_SHADOW_NONE);
|
||||
|
||||
alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||
gtk_widget_show (alignment15);
|
||||
gtk_container_add (GTK_CONTAINER (frame12), alignment15);
|
||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment15), 0, 0, 12, 0);
|
||||
|
||||
check_toolbar_show = gtk_check_button_new_with_mnemonic (_("Show Toolbar"));
|
||||
gtk_widget_show (check_toolbar_show);
|
||||
gtk_container_add (GTK_CONTAINER (alignment15), check_toolbar_show);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_show, GTK_CAN_FOCUS);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_show), FALSE);
|
||||
|
||||
label166 = gtk_label_new ("");
|
||||
gtk_widget_show (label166);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame12), label166);
|
||||
gtk_label_set_use_markup (GTK_LABEL (label166), TRUE);
|
||||
|
||||
frame11 = gtk_frame_new (NULL);
|
||||
gtk_widget_show (frame11);
|
||||
gtk_box_pack_start (GTK_BOX (vbox15), frame11, FALSE, FALSE, 0);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame11), GTK_SHADOW_NONE);
|
||||
|
||||
alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||
gtk_widget_show (alignment14);
|
||||
gtk_container_add (GTK_CONTAINER (frame11), alignment14);
|
||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment14), 0, 0, 12, 0);
|
||||
|
||||
vbox16 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (vbox16);
|
||||
gtk_container_add (GTK_CONTAINER (alignment14), vbox16);
|
||||
|
||||
check_toolbar_compile = gtk_check_button_new_with_mnemonic (_("Show Compile and Run"));
|
||||
gtk_widget_show (check_toolbar_compile);
|
||||
gtk_box_pack_start (GTK_BOX (vbox16), check_toolbar_compile, FALSE, FALSE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_compile, GTK_CAN_FOCUS);
|
||||
gtk_tooltips_set_tip (tooltips, check_toolbar_compile, _("Display the Compile and Run buttons in the toolbar"), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_compile), FALSE);
|
||||
|
||||
check_toolbar_colour = gtk_check_button_new_with_mnemonic (_("Show Colour Chooser button"));
|
||||
gtk_widget_show (check_toolbar_colour);
|
||||
gtk_box_pack_start (GTK_BOX (vbox16), check_toolbar_colour, FALSE, FALSE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_colour, GTK_CAN_FOCUS);
|
||||
gtk_tooltips_set_tip (tooltips, check_toolbar_colour, _("Display the Colour Chooser button in the toolbar"), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_colour), FALSE);
|
||||
|
||||
check_toolbar_zoom = gtk_check_button_new_with_mnemonic (_("Show Zoom In and Zoom Out"));
|
||||
gtk_widget_show (check_toolbar_zoom);
|
||||
gtk_box_pack_start (GTK_BOX (vbox16), check_toolbar_zoom, FALSE, FALSE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_zoom, GTK_CAN_FOCUS);
|
||||
gtk_tooltips_set_tip (tooltips, check_toolbar_zoom, _("Display the Zoom In and Zoom Out buttons in the toolbar"), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_zoom), FALSE);
|
||||
|
||||
check_toolbar_undo = gtk_check_button_new_with_mnemonic (_("Show Redo and Undo buttons"));
|
||||
gtk_widget_show (check_toolbar_undo);
|
||||
gtk_box_pack_start (GTK_BOX (vbox16), check_toolbar_undo, FALSE, FALSE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_undo, GTK_CAN_FOCUS);
|
||||
gtk_tooltips_set_tip (tooltips, check_toolbar_undo, _("Display the Redo and Undo buttons in the toolbar"), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_undo), FALSE);
|
||||
|
||||
check_toolbar_search = gtk_check_button_new_with_mnemonic (_("Show Search field"));
|
||||
gtk_widget_show (check_toolbar_search);
|
||||
gtk_box_pack_start (GTK_BOX (vbox16), check_toolbar_search, FALSE, FALSE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_search, GTK_CAN_FOCUS);
|
||||
gtk_tooltips_set_tip (tooltips, check_toolbar_search, _("Display the search field and button in the toolbar"), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_search), FALSE);
|
||||
|
||||
check_toolbar_goto = gtk_check_button_new_with_mnemonic (_("Show Goto line field"));
|
||||
gtk_widget_show (check_toolbar_goto);
|
||||
gtk_box_pack_start (GTK_BOX (vbox16), check_toolbar_goto, FALSE, FALSE, 0);
|
||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_goto, GTK_CAN_FOCUS);
|
||||
gtk_tooltips_set_tip (tooltips, check_toolbar_goto, _("Display the line number field and button in the toolbar"), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_goto), FALSE);
|
||||
|
||||
label165 = gtk_label_new (_("<b>Items</b>"));
|
||||
gtk_widget_show (label165);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame11), label165);
|
||||
gtk_label_set_use_markup (GTK_LABEL (label165), TRUE);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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), 5);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table9), 5);
|
||||
|
||||
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,
|
||||
(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));
|
||||
|
||||
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,
|
||||
(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));
|
||||
|
||||
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,
|
||||
(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));
|
||||
|
||||
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,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_large), radio_toolbar_large_group);
|
||||
radio_toolbar_large_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_large));
|
||||
|
||||
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,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_toolbar_small), radio_toolbar_large_group);
|
||||
radio_toolbar_large_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_toolbar_small));
|
||||
|
||||
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);
|
||||
|
||||
label170 = gtk_label_new (_("Icon size"));
|
||||
gtk_widget_show (label170);
|
||||
gtk_table_attach (GTK_TABLE (table9), label170, 0, 1, 1, 2,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (label170), 0, 0.5);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
vbox5 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (vbox5);
|
||||
gtk_container_add (GTK_CONTAINER (notebook2), vbox5);
|
||||
@ -2571,7 +2758,7 @@ create_prefs_dialog (void)
|
||||
|
||||
label95 = gtk_label_new (_("Editor"));
|
||||
gtk_widget_show (label95);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 2), label95);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 3), label95);
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (vbox2);
|
||||
@ -2686,7 +2873,7 @@ create_prefs_dialog (void)
|
||||
|
||||
label96 = gtk_label_new (_("Tools"));
|
||||
gtk_widget_show (label96);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 3), label96);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 4), label96);
|
||||
|
||||
vbox9 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (vbox9);
|
||||
@ -2779,7 +2966,7 @@ create_prefs_dialog (void)
|
||||
|
||||
label119 = gtk_label_new (_("Templates"));
|
||||
gtk_widget_show (label119);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 4), label119);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 5), label119);
|
||||
|
||||
vbox13 = gtk_vbox_new (FALSE, 5);
|
||||
gtk_widget_show (vbox13);
|
||||
@ -2814,7 +3001,7 @@ create_prefs_dialog (void)
|
||||
|
||||
label151 = gtk_label_new (_("Keybindings"));
|
||||
gtk_widget_show (label151);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 5), label151);
|
||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 6), label151);
|
||||
|
||||
dialog_action_area3 = GTK_DIALOG (prefs_dialog)->action_area;
|
||||
gtk_widget_show (dialog_action_area3);
|
||||
@ -2855,12 +3042,6 @@ create_prefs_dialog (void)
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label162, "label162");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label94, "label94");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox14, "vbox14");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame3, "frame3");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment4, "alignment4");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox7, "vbox7");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_search, "check_toolbar_search");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_goto, "check_toolbar_goto");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label98, "label98");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame7, "frame7");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment9, "alignment9");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox11, "vbox11");
|
||||
@ -2901,6 +3082,33 @@ create_prefs_dialog (void)
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, combo_tab_editor, "combo_tab_editor");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label158, "label158");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label157, "label157");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox15, "vbox15");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame12, "frame12");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment15, "alignment15");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_show, "check_toolbar_show");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label166, "label166");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame11, "frame11");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment14, "alignment14");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox16, "vbox16");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_compile, "check_toolbar_compile");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_colour, "check_toolbar_colour");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_zoom, "check_toolbar_zoom");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_undo, "check_toolbar_undo");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_search, "check_toolbar_search");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_goto, "check_toolbar_goto");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label165, "label165");
|
||||
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, 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, radio_toolbar_large, "radio_toolbar_large");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, radio_toolbar_small, "radio_toolbar_small");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label169, "label169");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label170, "label170");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label167, "label167");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label164, "label164");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox5, "vbox5");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame6, "frame6");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment7, "alignment7");
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "document.h"
|
||||
#include "callbacks.h"
|
||||
#include "dialogs.h"
|
||||
#include "prefs.h"
|
||||
#include "msgwindow.h"
|
||||
#include "sci_cb.h"
|
||||
#include "sciwrappers.h"
|
||||
|
@ -66,9 +66,6 @@ void configuration_save(void)
|
||||
scribble_text = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
|
||||
|
||||
// store basic settings
|
||||
g_key_file_set_boolean(config, PACKAGE, "toolbar_visible", app->toolbar_visible);
|
||||
g_key_file_set_integer(config, PACKAGE, "toolbar_icon_style", app->toolbar_icon_style);
|
||||
g_key_file_set_integer(config, PACKAGE, "toolbar_icon_size", app->toolbar_icon_size);
|
||||
if (app->pref_main_save_winpos)
|
||||
{
|
||||
g_key_file_set_integer(config, PACKAGE, "treeview_position",
|
||||
@ -125,8 +122,15 @@ void configuration_save(void)
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_main_confirm_exit", app->pref_main_confirm_exit);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_main_load_session", app->pref_main_load_session);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_main_save_winpos", app->pref_main_save_winpos);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_main_show_search", app->pref_main_show_search);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_main_show_goto", app->pref_main_show_goto);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show", app->toolbar_visible);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_search", app->pref_toolbar_show_search);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_goto", app->pref_toolbar_show_goto);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_zoom", app->pref_toolbar_show_zoom);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_undo", app->pref_toolbar_show_undo);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_compile", app->pref_toolbar_show_compile);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_colour", app->pref_toolbar_show_colour);
|
||||
g_key_file_set_integer(config, PACKAGE, "pref_toolbar_icon_style", app->toolbar_icon_style);
|
||||
g_key_file_set_integer(config, PACKAGE, "pref_toolbar_icon_size", app->toolbar_icon_size);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_new_line", app->pref_editor_new_line);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_replace_tabs", app->pref_editor_replace_tabs);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_trail_space", app->pref_editor_trail_space);
|
||||
@ -218,15 +222,15 @@ gboolean configuration_load(void)
|
||||
|
||||
config_exists = g_key_file_load_from_file(config, configfile, G_KEY_FILE_KEEP_COMMENTS, NULL);
|
||||
|
||||
app->toolbar_visible = utils_get_setting_boolean(config, PACKAGE, "toolbar_visible", TRUE);
|
||||
app->toolbar_visible = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show", TRUE);
|
||||
{
|
||||
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);
|
||||
app->toolbar_icon_style = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_style", tb_style);
|
||||
app->toolbar_icon_size = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_size", tb_iconsize);
|
||||
app->toolbar_icon_style = utils_get_setting_integer(config, PACKAGE, "pref_toolbar_icon_style", tb_style);
|
||||
app->toolbar_icon_size = utils_get_setting_integer(config, PACKAGE, "pref_toolbar_icon_size", tb_iconsize);
|
||||
}
|
||||
app->beep_on_errors = utils_get_setting_boolean(config, PACKAGE, "beep_on_errors", TRUE);
|
||||
app->mru_length = utils_get_setting_integer(config, PACKAGE, "mru_length", GEANY_DEFAULT_MRU_LENGHTH);
|
||||
@ -287,8 +291,12 @@ gboolean configuration_load(void)
|
||||
app->pref_main_confirm_exit = utils_get_setting_boolean(config, PACKAGE, "pref_main_confirm_exit", TRUE);
|
||||
app->pref_main_load_session = utils_get_setting_boolean(config, PACKAGE, "pref_main_load_session", TRUE);
|
||||
app->pref_main_save_winpos = utils_get_setting_boolean(config, PACKAGE, "pref_main_save_winpos", TRUE);
|
||||
app->pref_main_show_search = utils_get_setting_boolean(config, PACKAGE, "pref_main_show_search", TRUE);
|
||||
app->pref_main_show_goto = utils_get_setting_boolean(config, PACKAGE, "pref_main_show_goto", TRUE);
|
||||
app->pref_toolbar_show_search = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_search", TRUE);
|
||||
app->pref_toolbar_show_goto = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_goto", TRUE);
|
||||
app->pref_toolbar_show_zoom = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_zoom", FALSE);
|
||||
app->pref_toolbar_show_compile = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_compile", TRUE);
|
||||
app->pref_toolbar_show_undo = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_undo", FALSE);
|
||||
app->pref_toolbar_show_colour = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_colour", TRUE);
|
||||
#ifdef HAVE_VTE
|
||||
app->load_vte = utils_get_setting_boolean(config, PACKAGE, "load_vte", TRUE);
|
||||
app->terminal_settings = utils_get_setting_string(config, PACKAGE, "terminal_settings", "");
|
||||
|
18
src/main.c
18
src/main.c
@ -176,20 +176,6 @@ static void apply_settings(void)
|
||||
gtk_window_set_default_size(GTK_WINDOW(app->window), app->geometry[2], app->geometry[3]);
|
||||
}
|
||||
|
||||
if (! app->pref_main_show_goto)
|
||||
{
|
||||
gtk_widget_hide(lookup_widget(app->window, "entry_goto_line"));
|
||||
gtk_widget_hide(lookup_widget(app->window, "toolbutton25"));
|
||||
gtk_widget_hide(lookup_widget(app->window, "separatortoolitem5"));
|
||||
}
|
||||
|
||||
if (! app->pref_main_show_search)
|
||||
{
|
||||
gtk_widget_hide(lookup_widget(app->window, "entry1"));
|
||||
gtk_widget_hide(lookup_widget(app->window, "toolbutton18"));
|
||||
gtk_widget_hide(lookup_widget(app->window, "separatortoolitem4"));
|
||||
}
|
||||
|
||||
g_object_set(G_OBJECT(lookup_widget(app->window, "menu_line_breaking1")), "active",
|
||||
GINT_TO_POINTER(app->pref_editor_line_breaking), NULL);
|
||||
g_object_set(G_OBJECT(lookup_widget(app->window, "menu_use_auto_indention1")), "active",
|
||||
@ -202,6 +188,8 @@ static void apply_settings(void)
|
||||
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(app->notebook), app->tab_pos_editor);
|
||||
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(msgwindow.notebook), app->tab_pos_msgwin);
|
||||
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(app->treeview_notebook), app->tab_pos_sidebar);
|
||||
|
||||
utils_update_toolbar_items();
|
||||
}
|
||||
|
||||
|
||||
@ -308,8 +296,10 @@ static void main_init(void)
|
||||
app->sensitive_buttons[32] = lookup_widget(app->window, "print1");
|
||||
app->redo_items[0] = lookup_widget(app->popup_menu, "redo1");
|
||||
app->redo_items[1] = lookup_widget(app->window, "menu_redo2");
|
||||
app->redo_items[2] = lookup_widget(app->window, "toolbutton_redo");
|
||||
app->undo_items[0] = lookup_widget(app->popup_menu, "undo1");
|
||||
app->undo_items[1] = lookup_widget(app->window, "menu_undo2");
|
||||
app->undo_items[2] = lookup_widget(app->window, "toolbutton_undo");
|
||||
msgwindow.tree_status = lookup_widget(app->window, "treeview3");
|
||||
msgwindow.tree_msg = lookup_widget(app->window, "treeview4");
|
||||
msgwindow.tree_compiler = lookup_widget(app->window, "treeview5");
|
||||
|
316
src/prefs.c
316
src/prefs.c
@ -35,6 +35,9 @@
|
||||
#include "document.h"
|
||||
#include "keyfile.h"
|
||||
#include "keybindings.h"
|
||||
#include "interface.h"
|
||||
#include "encodings.h"
|
||||
#include "callbacks.h"
|
||||
|
||||
#ifdef HAVE_VTE
|
||||
# include "vte.h"
|
||||
@ -93,12 +96,6 @@ void prefs_init_dialog(void)
|
||||
|
||||
|
||||
// Interface settings
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_search");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_main_show_search);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_goto");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_main_show_goto);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_list_symbol");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->sidebar_symbol_visible);
|
||||
|
||||
@ -144,6 +141,50 @@ void prefs_init_dialog(void)
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(widget), app->tab_pos_sidebar);
|
||||
|
||||
|
||||
// Toolbar settings
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_show");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->toolbar_visible);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_search");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_toolbar_show_search);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_goto");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_toolbar_show_goto);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_compile");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_toolbar_show_compile);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_zoom");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_toolbar_show_zoom);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_undo");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_toolbar_show_undo);
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_colour");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_toolbar_show_colour);
|
||||
|
||||
|
||||
switch (app->toolbar_icon_style)
|
||||
{
|
||||
case 0: widget = lookup_widget(app->prefs_dialog, "radio_toolbar_image"); break;
|
||||
case 1: widget = lookup_widget(app->prefs_dialog, "radio_toolbar_text"); break;
|
||||
default: widget = lookup_widget(app->prefs_dialog, "radio_toolbar_imagetext"); break;
|
||||
}
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
|
||||
|
||||
|
||||
switch (app->toolbar_icon_size)
|
||||
{
|
||||
case GTK_ICON_SIZE_LARGE_TOOLBAR:
|
||||
widget = lookup_widget(app->prefs_dialog, "radio_toolbar_large"); break;
|
||||
default: widget = lookup_widget(app->prefs_dialog, "radio_toolbar_small"); break;
|
||||
}
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
|
||||
// disable elements if toolbar is hidden
|
||||
on_pref_toolbar_show_toggled(GTK_TOGGLE_BUTTON(
|
||||
lookup_widget(app->prefs_dialog, "check_toolbar_show")), NULL);
|
||||
|
||||
|
||||
// Editor settings
|
||||
widget = lookup_widget(app->prefs_dialog, "spin_tab_width");
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), app->pref_editor_tab_width);
|
||||
@ -341,12 +382,6 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
||||
|
||||
|
||||
// Interface settings
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_search");
|
||||
app->pref_main_show_search = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_goto");
|
||||
app->pref_main_show_goto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_list_symbol");
|
||||
app->sidebar_symbol_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
@ -376,6 +411,48 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
||||
app->tab_pos_sidebar = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
|
||||
|
||||
|
||||
// Toolbar settings
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_show");
|
||||
app->toolbar_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_search");
|
||||
app->pref_toolbar_show_search = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_goto");
|
||||
app->pref_toolbar_show_goto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_zoom");
|
||||
app->pref_toolbar_show_zoom = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_undo");
|
||||
app->pref_toolbar_show_undo = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_compile");
|
||||
app->pref_toolbar_show_compile = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_colour");
|
||||
app->pref_toolbar_show_colour = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "radio_toolbar_imagetext");
|
||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) app->toolbar_icon_style = 2;
|
||||
else
|
||||
{
|
||||
widget = lookup_widget(app->prefs_dialog, "radio_toolbar_image");
|
||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
|
||||
app->toolbar_icon_style = 0;
|
||||
else
|
||||
// now only the text only radio remains, so set text only
|
||||
app->toolbar_icon_style = 1;
|
||||
}
|
||||
|
||||
|
||||
widget = lookup_widget(app->prefs_dialog, "radio_toolbar_large");
|
||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
|
||||
app->toolbar_icon_size = GTK_ICON_SIZE_LARGE_TOOLBAR;
|
||||
else
|
||||
app->toolbar_icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR;
|
||||
|
||||
|
||||
// Editor settings
|
||||
widget = lookup_widget(app->prefs_dialog, "spin_tab_width");
|
||||
app->pref_editor_tab_width = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
|
||||
@ -502,12 +579,9 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
||||
#endif
|
||||
|
||||
// apply the changes made
|
||||
utils_widget_show_hide(lookup_widget(app->window, "entry1"), app->pref_main_show_search);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton18"), app->pref_main_show_search);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem4"), app->pref_main_show_search);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "entry_goto_line"), app->pref_main_show_goto);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton25"), app->pref_main_show_goto);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem5"), app->pref_main_show_goto);
|
||||
utils_update_toolbar_items();
|
||||
utils_update_toolbar_icons(app->toolbar_icon_size);
|
||||
gtk_toolbar_set_style(GTK_TOOLBAR(app->toolbar), app->toolbar_icon_style);
|
||||
utils_treeviews_showhide();
|
||||
|
||||
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(app->notebook), app->tab_pos_editor);
|
||||
@ -799,3 +873,209 @@ static gboolean find_duplicate(guint idx, guint key, GdkModifierType mods, const
|
||||
}
|
||||
|
||||
|
||||
void on_pref_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||
{
|
||||
gboolean sens = gtk_toggle_button_get_active(togglebutton);
|
||||
|
||||
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "frame11"), sens);
|
||||
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "frame13"), sens);
|
||||
}
|
||||
|
||||
|
||||
void dialogs_show_prefs_dialog(void)
|
||||
{
|
||||
if (app->prefs_dialog == NULL)
|
||||
{
|
||||
#ifdef HAVE_VTE
|
||||
GtkWidget *notebook, *vbox, *label, *alignment, *table;
|
||||
GtkWidget *font_term, *color_fore, *color_back, *spin_scrollback, *entry_emulation;
|
||||
GtkWidget *check_scroll_key, *check_scroll_out, *check_follow_path;
|
||||
GtkTooltips *tooltips;
|
||||
GtkObject *spin_scrollback_adj;
|
||||
#endif
|
||||
GtkWidget *combo;
|
||||
guint i;
|
||||
gchar *encoding_string;
|
||||
|
||||
app->prefs_dialog = create_prefs_dialog();
|
||||
gtk_window_set_transient_for(GTK_WINDOW(app->prefs_dialog), GTK_WINDOW(app->window));
|
||||
|
||||
// init the default file encoding combo box
|
||||
combo = lookup_widget(app->prefs_dialog, "combo_encoding");
|
||||
gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(combo), 3);
|
||||
for (i = 0; i < GEANY_ENCODINGS_MAX; i++)
|
||||
{
|
||||
encoding_string = encodings_to_string(&encodings[i]);
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), encoding_string);
|
||||
g_free(encoding_string);
|
||||
}
|
||||
|
||||
#ifdef HAVE_VTE
|
||||
if (app->have_vte)
|
||||
{
|
||||
tooltips = GTK_TOOLTIPS(lookup_widget(app->prefs_dialog, "tooltips"));
|
||||
notebook = lookup_widget(app->prefs_dialog, "notebook2");
|
||||
vbox = gtk_vbox_new(FALSE, 0);
|
||||
gtk_container_add(GTK_CONTAINER(notebook), vbox);
|
||||
|
||||
label = gtk_label_new(_("These are settings for the virtual terminal emulator widget (VTE). They only apply, if the VTE library could be loaded."));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
|
||||
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_FILL);
|
||||
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.14, 0.19);
|
||||
gtk_misc_set_padding(GTK_MISC(label), 0, 8);
|
||||
|
||||
alignment = gtk_alignment_new(0.5, 0.5, 1, 1);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0);
|
||||
gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 6);
|
||||
|
||||
table = gtk_table_new(8, 2, FALSE);
|
||||
gtk_container_add(GTK_CONTAINER(alignment), table);
|
||||
gtk_table_set_row_spacings(GTK_TABLE(table), 3);
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), 25);
|
||||
|
||||
label = gtk_label_new(_("Terminal font"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
font_term = gtk_font_button_new();
|
||||
gtk_table_attach(GTK_TABLE(table), font_term, 1, 2, 0, 1,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, font_term, _("Sets the font for the terminal widget."), NULL);
|
||||
|
||||
label = gtk_label_new(_("Foreground color"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
label = gtk_label_new(_("Background color"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
color_fore = gtk_color_button_new();
|
||||
gtk_table_attach(GTK_TABLE(table), color_fore, 1, 2, 1, 2,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, color_fore, _("Sets the foreground color of the text in the terminal widget."), NULL);
|
||||
gtk_color_button_set_title(GTK_COLOR_BUTTON(color_fore), _("Color Chooser"));
|
||||
|
||||
color_back = gtk_color_button_new();
|
||||
gtk_table_attach(GTK_TABLE(table), color_back, 1, 2, 2, 3,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, color_back, _("Sets the background color of the text in the terminal widget."), NULL);
|
||||
gtk_color_button_set_title(GTK_COLOR_BUTTON(color_back), _("Color Chooser"));
|
||||
|
||||
label = gtk_label_new(_("Scrollback lines"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
spin_scrollback_adj = gtk_adjustment_new(500, 0, 5000, 1, 10, 10);
|
||||
spin_scrollback = gtk_spin_button_new(GTK_ADJUSTMENT(spin_scrollback_adj), 1, 0);
|
||||
gtk_table_attach(GTK_TABLE(table), spin_scrollback, 1, 2, 3, 4,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, spin_scrollback, _("Specifies the history in lines, which you can scroll back in the terminal widget."), NULL);
|
||||
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_scrollback), TRUE);
|
||||
gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_scrollback), TRUE);
|
||||
|
||||
label = gtk_label_new(_("Terminal emulation"));
|
||||
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
entry_emulation = gtk_entry_new();
|
||||
gtk_table_attach(GTK_TABLE(table), entry_emulation, 1, 2, 4, 5,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, entry_emulation, _("Controls how the terminal emulator should behave. xterm is a good start."), NULL);
|
||||
|
||||
check_scroll_key = gtk_check_button_new_with_mnemonic(_("Scroll on keystroke"));
|
||||
gtk_table_attach(GTK_TABLE(table), check_scroll_key, 1, 2, 5, 6,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, check_scroll_key, _("Whether to scroll to the bottom if a key was pressed."), NULL);
|
||||
gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_key), FALSE);
|
||||
|
||||
check_scroll_out = gtk_check_button_new_with_mnemonic(_("Scroll on output"));
|
||||
gtk_table_attach(GTK_TABLE(table), check_scroll_out, 1, 2, 6, 7,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, check_scroll_out, _("Whether to scroll to the bottom if an output was generated."), NULL);
|
||||
gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_out), FALSE);
|
||||
|
||||
check_follow_path = gtk_check_button_new_with_mnemonic(_("Follow the path of the current file"));
|
||||
gtk_table_attach(GTK_TABLE(table), check_follow_path, 1, 2, 7, 8,
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_tooltips_set_tip(tooltips, check_follow_path, _("Whether to execute \"cd $path\" when you switch between opened files."), NULL);
|
||||
gtk_button_set_focus_on_click(GTK_BUTTON(check_follow_path), FALSE);
|
||||
|
||||
label = gtk_label_new(_("Terminal"));
|
||||
gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(
|
||||
GTK_NOTEBOOK(notebook), 7), label);
|
||||
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "font_term",
|
||||
gtk_widget_ref(font_term), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "color_fore",
|
||||
gtk_widget_ref(color_fore), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "color_back",
|
||||
gtk_widget_ref(color_back), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "spin_scrollback",
|
||||
gtk_widget_ref(spin_scrollback), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "entry_emulation",
|
||||
gtk_widget_ref(entry_emulation), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_scroll_key",
|
||||
gtk_widget_ref(check_scroll_key), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_scroll_out",
|
||||
gtk_widget_ref(check_scroll_out), (GDestroyNotify) gtk_widget_unref);
|
||||
g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_follow_path",
|
||||
gtk_widget_ref(check_follow_path), (GDestroyNotify) gtk_widget_unref);
|
||||
|
||||
gtk_widget_show_all(vbox);
|
||||
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "font_term"),
|
||||
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(4));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "color_fore"),
|
||||
"color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(2));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "color_back"),
|
||||
"color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(3));
|
||||
}
|
||||
#endif
|
||||
g_signal_connect((gpointer) app->prefs_dialog, "response", G_CALLBACK(on_prefs_button_clicked), NULL);
|
||||
g_signal_connect((gpointer) app->prefs_dialog, "delete_event", G_CALLBACK(on_prefs_delete_event), NULL);
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "tagbar_font"),
|
||||
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(1));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "msgwin_font"),
|
||||
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(2));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "editor_font"),
|
||||
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(3));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "long_line_color"),
|
||||
"color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(1));
|
||||
// file chooser buttons in the tools tab
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "button_make"),
|
||||
"clicked", G_CALLBACK(on_pref_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_com_make"));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "button_term"),
|
||||
"clicked", G_CALLBACK(on_pref_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_com_term"));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "button_browser"),
|
||||
"clicked", G_CALLBACK(on_pref_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_browser"));
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "button_print"),
|
||||
"clicked", G_CALLBACK(on_pref_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_print"));
|
||||
|
||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "check_toolbar_show"),
|
||||
"toggled", G_CALLBACK(on_pref_toolbar_show_toggled), NULL);
|
||||
|
||||
}
|
||||
|
||||
prefs_init_dialog();
|
||||
gtk_widget_show(app->prefs_dialog);
|
||||
}
|
||||
|
@ -33,4 +33,8 @@ void on_prefs_font_choosed(GtkFontButton *widget, gpointer user_data);
|
||||
|
||||
void on_prefs_color_choosed(GtkColorButton *widget, gpointer user_data);
|
||||
|
||||
void on_pref_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
||||
|
||||
void dialogs_show_prefs_dialog(void);
|
||||
|
||||
#endif
|
||||
|
42
src/utils.c
42
src/utils.c
@ -171,9 +171,11 @@ void utils_update_popup_reundo_items(gint index)
|
||||
// index 0 is the popup menu, 1 is the menubar
|
||||
gtk_widget_set_sensitive(app->undo_items[0], enable_undo);
|
||||
gtk_widget_set_sensitive(app->undo_items[1], enable_undo);
|
||||
gtk_widget_set_sensitive(app->undo_items[2], enable_undo);
|
||||
|
||||
gtk_widget_set_sensitive(app->redo_items[0], enable_redo);
|
||||
gtk_widget_set_sensitive(app->redo_items[1], enable_redo);
|
||||
gtk_widget_set_sensitive(app->redo_items[2], enable_redo);
|
||||
}
|
||||
|
||||
|
||||
@ -2518,3 +2520,43 @@ TMTag *utils_find_tm_tag(const GPtrArray *tags, const gchar *tag_name)
|
||||
}
|
||||
|
||||
|
||||
void utils_update_toolbar_items(void)
|
||||
{
|
||||
// show toolbar
|
||||
GtkWidget *widget = lookup_widget(app->window, "menu_show_toolbar1");
|
||||
if (app->toolbar_visible && ! gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)))
|
||||
{
|
||||
app->toolbar_visible = ! app->toolbar_visible; // will be changed by the toggled callback
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), TRUE);
|
||||
}
|
||||
else if (! app->toolbar_visible && gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)))
|
||||
{
|
||||
app->toolbar_visible = ! app->toolbar_visible; // will be changed by the toggled callback
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), FALSE);
|
||||
}
|
||||
|
||||
// search
|
||||
utils_widget_show_hide(lookup_widget(app->window, "entry1"), app->pref_toolbar_show_search);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton18"), app->pref_toolbar_show_search);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem5"), app->pref_toolbar_show_search);
|
||||
// goto line
|
||||
utils_widget_show_hide(lookup_widget(app->window, "entry_goto_line"), app->pref_toolbar_show_goto);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton25"), app->pref_toolbar_show_goto);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem8"), app->pref_toolbar_show_goto);
|
||||
// compile
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton13"), app->pref_toolbar_show_compile);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton26"), app->pref_toolbar_show_compile);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem6"), app->pref_toolbar_show_compile);
|
||||
// colour
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton24"), app->pref_toolbar_show_colour);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem3"), app->pref_toolbar_show_colour);
|
||||
// zoom
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton20"), app->pref_toolbar_show_zoom);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton21"), app->pref_toolbar_show_zoom);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem4"), app->pref_toolbar_show_zoom);
|
||||
// undo
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton_undo"), app->pref_toolbar_show_undo);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "toolbutton_redo"), app->pref_toolbar_show_undo);
|
||||
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem9"), app->pref_toolbar_show_undo);
|
||||
}
|
||||
|
||||
|
@ -222,4 +222,6 @@ gchar *utils_get_current_time_string();
|
||||
|
||||
TMTag *utils_find_tm_tag(const GPtrArray *tags, const gchar *tag_name);
|
||||
|
||||
void utils_update_toolbar_items(void);
|
||||
|
||||
#endif
|
||||
|
@ -331,7 +331,7 @@ static void vte_popup_menu_clicked(GtkMenuItem *menuitem, gpointer user_data)
|
||||
case 2:
|
||||
{
|
||||
on_preferences1_activate(menuitem, NULL);
|
||||
gtk_notebook_set_current_page(GTK_NOTEBOOK(lookup_widget(app->prefs_dialog, "notebook2")), 6);
|
||||
gtk_notebook_set_current_page(GTK_NOTEBOOK(lookup_widget(app->prefs_dialog, "notebook2")), 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user