many changes, improving symbol list view, adding color settings for VTE
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@43 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
fd374e91a5
commit
bd79cecd60
642
geany.glade
642
geany.glade
@ -219,6 +219,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkImageMenuItem" id="menu_quit1">
|
<widget class="GtkImageMenuItem" id="menu_quit1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">Quit Geany</property>
|
||||||
<property name="label">gtk-quit</property>
|
<property name="label">gtk-quit</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
<signal name="activate" handler="on_quit1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
|
<signal name="activate" handler="on_quit1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
|
||||||
@ -617,17 +618,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckMenuItem" id="menu_show_symbol_window1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="tooltip" translatable="yes">Toggle the window with symbols on and off</property>
|
|
||||||
<property name="label" translatable="yes">Show symbol window</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="active">True</property>
|
|
||||||
<signal name="toggled" handler="on_show_symbol_window1_toggled" last_modification_time="Tue, 10 May 2005 18:34:23 GMT"/>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckMenuItem" id="menu_show_toolbar1">
|
<widget class="GtkCheckMenuItem" id="menu_show_toolbar1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -1242,65 +1232,7 @@
|
|||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkSeparatorToolItem" id="separatortoolitem5">
|
<widget class="GtkToolItem" id="toolitem14">
|
||||||
<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="GtkToolItem" id="toolitem9">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="visible_horizontal">True</property>
|
|
||||||
<property name="visible_vertical">True</property>
|
|
||||||
<property name="is_important">False</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCombo" id="combo1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="value_in_list">False</property>
|
|
||||||
<property name="allow_empty">True</property>
|
|
||||||
<property name="case_sensitive">False</property>
|
|
||||||
<property name="enable_arrow_keys">True</property>
|
|
||||||
<property name="enable_arrows_always">False</property>
|
|
||||||
|
|
||||||
<child internal-child="entry">
|
|
||||||
<widget class="GtkEntry" id="combo-entry1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">False</property>
|
|
||||||
<property name="visibility">True</property>
|
|
||||||
<property name="max_length">0</property>
|
|
||||||
<property name="text" translatable="yes"></property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="invisible_char">*</property>
|
|
||||||
<property name="activates_default">False</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child internal-child="list">
|
|
||||||
<widget class="GtkList" id="combo-list1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="homogeneous">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkToolItem" id="toolitem13">
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="visible_horizontal">True</property>
|
<property name="visible_horizontal">True</property>
|
||||||
<property name="visible_vertical">True</property>
|
<property name="visible_vertical">True</property>
|
||||||
@ -1349,6 +1281,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkToolButton" id="toolbutton19">
|
<widget class="GtkToolButton" id="toolbutton19">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">Quit Geany</property>
|
||||||
<property name="stock_id">gtk-quit</property>
|
<property name="stock_id">gtk-quit</property>
|
||||||
<property name="visible_horizontal">True</property>
|
<property name="visible_horizontal">True</property>
|
||||||
<property name="visible_vertical">True</property>
|
<property name="visible_vertical">True</property>
|
||||||
@ -2602,10 +2535,6 @@
|
|||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
@ -2709,25 +2638,6 @@
|
|||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCheckButton" id="check_toolbar_tags">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="tooltip" translatable="yes">Display the symbol list in the toolbar</property>
|
|
||||||
<property name="label" translatable="yes">Show symbol list</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
|
||||||
<property name="focus_on_click">True</property>
|
|
||||||
<property name="active">False</property>
|
|
||||||
<property name="inconsistent">False</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
@ -2788,6 +2698,130 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkFrame" id="frame7">
|
||||||
|
<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="alignment9">
|
||||||
|
<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="vbox11">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckButton" id="check_list_symbol">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">Toggle the symbol list on and off</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Show symbol list</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_list_openfiles">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">Toggle the symbol list on and off</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Show open files list</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="label146">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes"><b>Left window</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="GtkLabel" id="label105">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label"></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">2</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkFrame" id="frame4">
|
<widget class="GtkFrame" id="frame4">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -2805,7 +2839,7 @@
|
|||||||
<property name="top_padding">0</property>
|
<property name="top_padding">0</property>
|
||||||
<property name="bottom_padding">0</property>
|
<property name="bottom_padding">0</property>
|
||||||
<property name="left_padding">12</property>
|
<property name="left_padding">12</property>
|
||||||
<property name="right_padding">0</property>
|
<property name="right_padding">6</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkTable" id="table2">
|
<widget class="GtkTable" id="table2">
|
||||||
@ -2942,33 +2976,8 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">False</property>
|
<property name="fill">True</property>
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label105">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label"></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">2</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
@ -3259,7 +3268,7 @@
|
|||||||
<property name="top_padding">0</property>
|
<property name="top_padding">0</property>
|
||||||
<property name="bottom_padding">0</property>
|
<property name="bottom_padding">0</property>
|
||||||
<property name="left_padding">12</property>
|
<property name="left_padding">12</property>
|
||||||
<property name="right_padding">0</property>
|
<property name="right_padding">6</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkTable" id="table3">
|
<widget class="GtkTable" id="table3">
|
||||||
@ -4540,6 +4549,395 @@ you need to restart Geany to take effect.</property>
|
|||||||
<property name="type">tab</property>
|
<property name="type">tab</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox10">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label139">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">These are settings for the virtual terminal emulator widget (VTE). They only apply, if the VTE library could be loaded.</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_FILL</property>
|
||||||
|
<property name="wrap">True</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.140000000596</property>
|
||||||
|
<property name="yalign">0.189999997616</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">8</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkAlignment" id="alignment8">
|
||||||
|
<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">6</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTable" id="table7">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="n_rows">7</property>
|
||||||
|
<property name="n_columns">2</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="row_spacing">3</property>
|
||||||
|
<property name="column_spacing">25</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label140">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Terminal font</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="GtkFontButton" id="font_term">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="tooltip" translatable="yes">Sets the font for the terminal widget.</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="show_style">True</property>
|
||||||
|
<property name="show_size">True</property>
|
||||||
|
<property name="use_font">False</property>
|
||||||
|
<property name="use_size">False</property>
|
||||||
|
<property name="focus_on_click">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="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label142">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Foreground color</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="right_attach">1</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label143">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Background color</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">2</property>
|
||||||
|
<property name="bottom_attach">3</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkColorButton" id="color_fore">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="tooltip" translatable="yes">Sets the foreground color of the text in the terminal widget.</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="use_alpha">False</property>
|
||||||
|
<property name="title" translatable="yes">Color Chooser</property>
|
||||||
|
<property name="focus_on_click">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="GtkColorButton" id="color_back">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="tooltip" translatable="yes">Sets the background color of the text in the terminal widget.</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="use_alpha">False</property>
|
||||||
|
<property name="title" translatable="yes">Color Chooser</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="bottom_attach">3</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label144">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Scrollback lines</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">3</property>
|
||||||
|
<property name="bottom_attach">4</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkSpinButton" id="spin_scrollback">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="tooltip" translatable="yes">Specifies the history in lines, which you can scroll back in the terminal widget.</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="climb_rate">1</property>
|
||||||
|
<property name="digits">0</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||||
|
<property name="snap_to_ticks">False</property>
|
||||||
|
<property name="wrap">True</property>
|
||||||
|
<property name="adjustment">500 0 5000 1 10 10</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
<property name="bottom_attach">4</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label145">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Terminal emulation</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">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="entry_emulation">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="tooltip" translatable="yes">Controls how the terminal emulator should behave. xterm is a good start.</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckButton" id="check_scroll_key">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="tooltip" translatable="yes">Whether to scroll to the bottom if a key was pressed.</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Scroll on keystroke</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="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">5</property>
|
||||||
|
<property name="bottom_attach">6</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckButton" id="check_scroll_out">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="tooltip" translatable="yes">Whether to scroll to the bottom if an output was generated.</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Scroll on output</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="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">6</property>
|
||||||
|
<property name="bottom_attach">7</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="tab_expand">False</property>
|
||||||
|
<property name="tab_fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label137">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Terminal</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>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
@ -79,6 +79,7 @@ static gint search_flags_re;
|
|||||||
static gboolean search_backwards_re;
|
static gboolean search_backwards_re;
|
||||||
|
|
||||||
// extending HOME and END default behaviour, to jump back to previous cursor position if pressed again
|
// extending HOME and END default behaviour, to jump back to previous cursor position if pressed again
|
||||||
|
static gint current_line = 0;
|
||||||
static gint cursor_pos_end = -1;
|
static gint cursor_pos_end = -1;
|
||||||
static gint cursor_pos_home = 0;
|
static gint cursor_pos_home = 0;
|
||||||
// state of the home key, 0 means column with first non-blank char, 1 means column 0,
|
// state of the home key, 0 means column with first non-blank char, 1 means column 0,
|
||||||
@ -114,6 +115,7 @@ gint destroyapp(GtkWidget *widget, gpointer gdata)
|
|||||||
g_free(app->editor_font);
|
g_free(app->editor_font);
|
||||||
g_free(app->tagbar_font);
|
g_free(app->tagbar_font);
|
||||||
g_free(app->msgwin_font);
|
g_free(app->msgwin_font);
|
||||||
|
g_free(app->long_line_color);
|
||||||
g_free(app->pref_template_developer);
|
g_free(app->pref_template_developer);
|
||||||
g_free(app->pref_template_company);
|
g_free(app->pref_template_company);
|
||||||
g_free(app->pref_template_mail);
|
g_free(app->pref_template_mail);
|
||||||
@ -202,7 +204,7 @@ on_exit_clicked (GtkWidget *widget, gpointer gdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// signal handler (for SIGINT and SIGTERM)
|
// signal handler (for SIGTERM)
|
||||||
RETSIGTYPE signal_cb(gint sig)
|
RETSIGTYPE signal_cb(gint sig)
|
||||||
{
|
{
|
||||||
on_exit_clicked(NULL, NULL);
|
on_exit_clicked(NULL, NULL);
|
||||||
@ -936,16 +938,12 @@ on_color_ok_button_clicked (GtkButton *button,
|
|||||||
{
|
{
|
||||||
GdkColor color;
|
GdkColor color;
|
||||||
gint idx = document_get_cur_idx();
|
gint idx = document_get_cur_idx();
|
||||||
gchar *hex = g_malloc0(12);
|
gchar *hex;
|
||||||
|
|
||||||
gtk_color_selection_get_current_color(
|
gtk_color_selection_get_current_color(
|
||||||
GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(app->open_colorsel)->colorsel), &color);
|
GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(app->open_colorsel)->colorsel), &color);
|
||||||
|
|
||||||
g_snprintf(hex, 11, "#%02X%02X%02X",
|
hex = utils_get_hex_from_color(&color);
|
||||||
(guint) (utils_scale_round(color.red / 256, 255)),
|
|
||||||
(guint) (utils_scale_round(color.green / 256, 255)),
|
|
||||||
(guint) (utils_scale_round(color.blue / 256, 255)));
|
|
||||||
|
|
||||||
sci_add_text(doc_list[idx].sci, hex);
|
sci_add_text(doc_list[idx].sci, hex);
|
||||||
g_free(hex);
|
g_free(hex);
|
||||||
gtk_widget_hide(app->open_colorsel);
|
gtk_widget_hide(app->open_colorsel);
|
||||||
@ -1150,15 +1148,17 @@ on_editor_key_press_event (GtkWidget *widget,
|
|||||||
gtk_widget_grab_focus(lookup_widget(app->window, "textview_scribble"));
|
gtk_widget_grab_focus(lookup_widget(app->window, "textview_scribble"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* following code is unusable unless I get a signal for a line changed, don't want to do this with
|
||||||
|
* updateUI()
|
||||||
case GDK_End:
|
case GDK_End:
|
||||||
{ // extending HOME and END default behaviour, for details look at the start of this function
|
{ // extending HOME and END default behaviour, for details look at the start of this function
|
||||||
geany_debug("pos_end: %d", cursor_pos_end);
|
if (cursor_pos_end == -1 || current_line != sci_get_current_line(doc_list[idx].sci, -1))
|
||||||
if (cursor_pos_end == -1)
|
|
||||||
{
|
{
|
||||||
cursor_pos_end = sci_get_current_position(doc_list[idx].sci);
|
cursor_pos_end = sci_get_current_position(doc_list[idx].sci);
|
||||||
sci_cmd(doc_list[idx].sci, SCI_LINEEND);
|
sci_cmd(doc_list[idx].sci, SCI_LINEEND);
|
||||||
|
current_line = sci_get_current_line(doc_list[idx].sci, -1);
|
||||||
}
|
}
|
||||||
else
|
else if (current_line == sci_get_current_line(doc_list[idx].sci, -1))
|
||||||
{
|
{
|
||||||
sci_set_current_position(doc_list[idx].sci, cursor_pos_end);
|
sci_set_current_position(doc_list[idx].sci, cursor_pos_end);
|
||||||
cursor_pos_end = -1;
|
cursor_pos_end = -1;
|
||||||
@ -1167,25 +1167,27 @@ on_editor_key_press_event (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
case GDK_Home:
|
case GDK_Home:
|
||||||
{
|
{
|
||||||
if (cursor_pos_home_state == 0)
|
if (cursor_pos_home_state == 0 || current_line != sci_get_current_line(doc_list[idx].sci, -1))
|
||||||
{
|
{
|
||||||
cursor_pos_home = sci_get_current_position(doc_list[idx].sci);
|
cursor_pos_home = sci_get_current_position(doc_list[idx].sci);
|
||||||
sci_cmd(doc_list[idx].sci, SCI_VCHOME);
|
sci_cmd(doc_list[idx].sci, SCI_VCHOME);
|
||||||
cursor_pos_home_state = 1;
|
cursor_pos_home_state = 1;
|
||||||
|
current_line = sci_get_current_line(doc_list[idx].sci, -1);
|
||||||
}
|
}
|
||||||
else if (cursor_pos_home_state == 1)
|
else if (cursor_pos_home_state == 1 && current_line == sci_get_current_line(doc_list[idx].sci, -1))
|
||||||
{
|
{
|
||||||
sci_cmd(doc_list[idx].sci, SCI_HOME);
|
sci_cmd(doc_list[idx].sci, SCI_HOME);
|
||||||
cursor_pos_home_state = 2;
|
cursor_pos_home_state = 2;
|
||||||
|
cursor_pos_home_state = 0;
|
||||||
}
|
}
|
||||||
else
|
else// if (current_line == sci_get_current_line(doc_list[idx].sci, -1))
|
||||||
{
|
{
|
||||||
sci_set_current_position(doc_list[idx].sci, cursor_pos_home);
|
sci_set_current_position(doc_list[idx].sci, cursor_pos_home);
|
||||||
cursor_pos_home_state = 0;
|
cursor_pos_home_state = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
*/ }
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1282,21 +1284,6 @@ toolbar_popup_menu (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_toolbar_tag_clicked (GtkEntry *entry,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
const gchar *string;
|
|
||||||
|
|
||||||
string = gtk_entry_get_text(entry);
|
|
||||||
if (string && strlen (string) > 0)
|
|
||||||
{
|
|
||||||
gint idx = document_get_cur_idx();
|
|
||||||
utils_goto_line(idx, utils_get_local_tag(idx, string));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_taglist_tree_selection_changed (GtkTreeSelection *selection,
|
on_taglist_tree_selection_changed (GtkTreeSelection *selection,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
@ -1312,10 +1299,10 @@ on_taglist_tree_selection_changed (GtkTreeSelection *selection,
|
|||||||
{
|
{
|
||||||
gint idx = document_get_cur_idx();
|
gint idx = document_get_cur_idx();
|
||||||
utils_goto_line(idx, utils_get_local_tag(idx, string));
|
utils_goto_line(idx, utils_get_local_tag(idx, string));
|
||||||
}
|
|
||||||
g_free(string);
|
g_free(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1403,31 +1390,6 @@ on_fullscreen1_toggled (GtkCheckMenuItem *checkmenuitem,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_show_symbol_window1_toggled (GtkCheckMenuItem *checkmenuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
if (user_data && GPOINTER_TO_INT(user_data))
|
|
||||||
{
|
|
||||||
// if user_data == 1, it is called from the symbol_window popup menu, and trigger the activate event,
|
|
||||||
// which triggers the toggled event ;-)
|
|
||||||
g_signal_emit_by_name((gpointer) lookup_widget(app->window, "menu_show_symbol_window1"), "activate", NULL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (app->treeview_nb_visible)
|
|
||||||
{
|
|
||||||
gtk_widget_hide(GTK_WIDGET(app->treeview_notebook));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gtk_widget_show(GTK_WIDGET(app->treeview_notebook));
|
|
||||||
//utils_update_visible_tag_lists(document_get_cur_idx());
|
|
||||||
}
|
|
||||||
app->treeview_nb_visible = (app->treeview_nb_visible) ? FALSE : TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_show_messages_window1_toggled (GtkCheckMenuItem *checkmenuitem,
|
on_show_messages_window1_toggled (GtkCheckMenuItem *checkmenuitem,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
@ -1677,9 +1639,7 @@ on_tree_view_button_press_event (GtkWidget *widget,
|
|||||||
|
|
||||||
if (event->button == 3)
|
if (event->button == 3)
|
||||||
{ // popupmenu to hide or clear the active treeview
|
{ // popupmenu to hide or clear the active treeview
|
||||||
if (user_data && GPOINTER_TO_INT(user_data) == 2)
|
if (user_data && GPOINTER_TO_INT(user_data) == 3)
|
||||||
gtk_menu_popup(GTK_MENU(app->tagbar_menu), NULL, NULL, NULL, NULL, event->button, event->time);
|
|
||||||
else if (user_data && GPOINTER_TO_INT(user_data) == 3)
|
|
||||||
gtk_menu_popup(GTK_MENU(msgwindow.popup_status_menu), NULL, NULL, NULL, NULL, event->button, event->time);
|
gtk_menu_popup(GTK_MENU(msgwindow.popup_status_menu), NULL, NULL, NULL, NULL, event->button, event->time);
|
||||||
else if (user_data && GPOINTER_TO_INT(user_data) == 4)
|
else if (user_data && GPOINTER_TO_INT(user_data) == 4)
|
||||||
gtk_menu_popup(GTK_MENU(msgwindow.popup_msg_menu), NULL, NULL, NULL, NULL, event->button, event->time);
|
gtk_menu_popup(GTK_MENU(msgwindow.popup_msg_menu), NULL, NULL, NULL, NULL, event->button, event->time);
|
||||||
|
@ -292,10 +292,6 @@ void
|
|||||||
on_entry1_changed (GtkEditable *editable,
|
on_entry1_changed (GtkEditable *editable,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
void
|
|
||||||
on_toolbar_tag_clicked (GtkEntry *entry,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_openfiles_tree_selection_changed (GtkTreeSelection *selection,
|
on_openfiles_tree_selection_changed (GtkTreeSelection *selection,
|
||||||
@ -338,10 +334,6 @@ void
|
|||||||
on_fullscreen1_toggled (GtkCheckMenuItem *checkmenuitem,
|
on_fullscreen1_toggled (GtkCheckMenuItem *checkmenuitem,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
void
|
|
||||||
on_show_symbol_window1_toggled (GtkCheckMenuItem *checkmenuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_markers_margin1_toggled (GtkCheckMenuItem *checkmenuitem,
|
on_markers_margin1_toggled (GtkCheckMenuItem *checkmenuitem,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -382,28 +383,6 @@ gboolean dialogs_show_confirm_exit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GtkWidget *dialogs_create_tagbar_popup_menu(void)
|
|
||||||
{
|
|
||||||
GtkWidget *treeview_popup_menu;
|
|
||||||
GtkWidget *hide;
|
|
||||||
GtkWidget *image;
|
|
||||||
|
|
||||||
treeview_popup_menu = gtk_menu_new();
|
|
||||||
|
|
||||||
hide = gtk_image_menu_item_new_with_mnemonic(_("Hide"));
|
|
||||||
gtk_widget_show(hide);
|
|
||||||
gtk_container_add(GTK_CONTAINER (treeview_popup_menu), hide);
|
|
||||||
|
|
||||||
image = gtk_image_new_from_stock("gtk-cancel", GTK_ICON_SIZE_MENU);
|
|
||||||
gtk_widget_show(image);
|
|
||||||
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(hide), image);
|
|
||||||
|
|
||||||
g_signal_connect((gpointer) hide, "activate", G_CALLBACK(on_show_symbol_window1_toggled), GINT_TO_POINTER(1));
|
|
||||||
|
|
||||||
return treeview_popup_menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void dialogs_show_word_count(void)
|
void dialogs_show_word_count(void)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog, *label;
|
GtkWidget *dialog, *label;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -55,8 +56,6 @@ void dialogs_show_open_font(void);
|
|||||||
|
|
||||||
void dialogs_show_about(void);
|
void dialogs_show_about(void);
|
||||||
|
|
||||||
GtkWidget *dialogs_create_tagbar_popup_menu(void);
|
|
||||||
|
|
||||||
void dialogs_show_word_count(void);
|
void dialogs_show_word_count(void);
|
||||||
|
|
||||||
void dialogs_show_color(void);
|
void dialogs_show_color(void);
|
||||||
|
20
src/geany.h
20
src/geany.h
@ -101,14 +101,13 @@ document doc_list[GEANY_MAX_OPEN_FILES];
|
|||||||
typedef struct MyApp
|
typedef struct MyApp
|
||||||
{
|
{
|
||||||
gint toolbar_icon_style;
|
gint toolbar_icon_style;
|
||||||
gint long_line_column;
|
|
||||||
gint long_line_color;
|
|
||||||
gint geometry[4];
|
gint geometry[4];
|
||||||
gboolean debug_mode;
|
gboolean debug_mode;
|
||||||
gboolean have_vte;
|
gboolean have_vte;
|
||||||
gboolean ignore_global_tags;
|
gboolean ignore_global_tags;
|
||||||
gboolean toolbar_visible;
|
gboolean toolbar_visible;
|
||||||
gboolean treeview_nb_visible;
|
gboolean treeview_symbol_visible;
|
||||||
|
gboolean treeview_openfiles_visible;
|
||||||
gboolean msgwindow_visible;
|
gboolean msgwindow_visible;
|
||||||
gboolean show_white_space;
|
gboolean show_white_space;
|
||||||
gboolean use_auto_indention;
|
gboolean use_auto_indention;
|
||||||
@ -128,7 +127,8 @@ typedef struct MyApp
|
|||||||
gboolean pref_main_save_winpos;
|
gboolean pref_main_save_winpos;
|
||||||
gboolean pref_main_confirm_exit;
|
gboolean pref_main_confirm_exit;
|
||||||
gboolean pref_main_show_search;
|
gboolean pref_main_show_search;
|
||||||
gboolean pref_main_show_tags;
|
gint long_line_column;
|
||||||
|
gchar *long_line_color;
|
||||||
gchar *pref_template_developer;
|
gchar *pref_template_developer;
|
||||||
gchar *pref_template_company;
|
gchar *pref_template_company;
|
||||||
gchar *pref_template_mail;
|
gchar *pref_template_mail;
|
||||||
@ -159,7 +159,6 @@ typedef struct MyApp
|
|||||||
GtkWidget *toolbar;
|
GtkWidget *toolbar;
|
||||||
GtkWidget *compile_button;
|
GtkWidget *compile_button;
|
||||||
GtkWidget *compile_button_image;
|
GtkWidget *compile_button_image;
|
||||||
GtkWidget *tag_combo;
|
|
||||||
GtkWidget *tagbar;
|
GtkWidget *tagbar;
|
||||||
GtkWidget *treeview_notebook;
|
GtkWidget *treeview_notebook;
|
||||||
GtkWidget *notebook;
|
GtkWidget *notebook;
|
||||||
@ -167,7 +166,6 @@ typedef struct MyApp
|
|||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *popup_menu;
|
GtkWidget *popup_menu;
|
||||||
GtkWidget *toolbar_menu;
|
GtkWidget *toolbar_menu;
|
||||||
GtkWidget *tagbar_menu;
|
|
||||||
GtkWidget *new_file_menu;
|
GtkWidget *new_file_menu;
|
||||||
GtkWidget *menu_insert_include_item[2];
|
GtkWidget *menu_insert_include_item[2];
|
||||||
GtkWidget *popup_goto_items[3];
|
GtkWidget *popup_goto_items[3];
|
||||||
@ -177,7 +175,6 @@ typedef struct MyApp
|
|||||||
GtkWidget *undo_items[2];
|
GtkWidget *undo_items[2];
|
||||||
GtkWidget *save_buttons[2];
|
GtkWidget *save_buttons[2];
|
||||||
GtkWidget *sensitive_buttons[16];
|
GtkWidget *sensitive_buttons[16];
|
||||||
|
|
||||||
GtkWidget *open_colorsel;
|
GtkWidget *open_colorsel;
|
||||||
GtkWidget *open_fontsel;
|
GtkWidget *open_fontsel;
|
||||||
GtkWidget *open_filesel;
|
GtkWidget *open_filesel;
|
||||||
@ -196,6 +193,15 @@ gint this_year;
|
|||||||
gint this_month;
|
gint this_month;
|
||||||
gint this_day;
|
gint this_day;
|
||||||
|
|
||||||
|
|
||||||
|
// small struct to track tag name and type together
|
||||||
|
typedef struct GeanySymbol
|
||||||
|
{
|
||||||
|
gchar *str;
|
||||||
|
gint type;
|
||||||
|
} GeanySymbol;
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
GEANY_IMAGE_SMALL_CROSS,
|
GEANY_IMAGE_SMALL_CROSS,
|
||||||
|
282
src/interface.c
282
src/interface.c
@ -102,7 +102,6 @@ create_window1 (void)
|
|||||||
GtkWidget *menu_separator4;
|
GtkWidget *menu_separator4;
|
||||||
GtkWidget *menu_fullscreen1;
|
GtkWidget *menu_fullscreen1;
|
||||||
GtkWidget *menu_show_messages_window1;
|
GtkWidget *menu_show_messages_window1;
|
||||||
GtkWidget *menu_show_symbol_window1;
|
|
||||||
GtkWidget *menu_show_toolbar1;
|
GtkWidget *menu_show_toolbar1;
|
||||||
GtkWidget *menu_markers_margin1;
|
GtkWidget *menu_markers_margin1;
|
||||||
GtkWidget *menu_toolbar2;
|
GtkWidget *menu_toolbar2;
|
||||||
@ -163,11 +162,7 @@ create_window1 (void)
|
|||||||
GtkWidget *toolitem11;
|
GtkWidget *toolitem11;
|
||||||
GtkWidget *entry1;
|
GtkWidget *entry1;
|
||||||
GtkWidget *toolbutton18;
|
GtkWidget *toolbutton18;
|
||||||
GtkWidget *separatortoolitem5;
|
GtkWidget *toolitem14;
|
||||||
GtkWidget *toolitem9;
|
|
||||||
GtkWidget *combo1;
|
|
||||||
GtkWidget *combo_entry1;
|
|
||||||
GtkWidget *toolitem13;
|
|
||||||
GtkWidget *alignment1;
|
GtkWidget *alignment1;
|
||||||
GtkWidget *label1;
|
GtkWidget *label1;
|
||||||
GtkWidget *toolbutton19;
|
GtkWidget *toolbutton19;
|
||||||
@ -320,6 +315,7 @@ create_window1 (void)
|
|||||||
menu_quit1 = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
|
menu_quit1 = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
|
||||||
gtk_widget_show (menu_quit1);
|
gtk_widget_show (menu_quit1);
|
||||||
gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_quit1);
|
gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_quit1);
|
||||||
|
gtk_tooltips_set_tip (tooltips, menu_quit1, _("Quit Geany"), NULL);
|
||||||
|
|
||||||
edit1 = gtk_menu_item_new_with_mnemonic (_("_Edit"));
|
edit1 = gtk_menu_item_new_with_mnemonic (_("_Edit"));
|
||||||
gtk_widget_show (edit1);
|
gtk_widget_show (edit1);
|
||||||
@ -517,12 +513,6 @@ create_window1 (void)
|
|||||||
gtk_tooltips_set_tip (tooltips, menu_show_messages_window1, _("Toggle the window with status and compiler messages on and off"), NULL);
|
gtk_tooltips_set_tip (tooltips, menu_show_messages_window1, _("Toggle the window with status and compiler messages on and off"), NULL);
|
||||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_show_messages_window1), TRUE);
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_show_messages_window1), TRUE);
|
||||||
|
|
||||||
menu_show_symbol_window1 = gtk_check_menu_item_new_with_mnemonic (_("Show symbol window"));
|
|
||||||
gtk_widget_show (menu_show_symbol_window1);
|
|
||||||
gtk_container_add (GTK_CONTAINER (menuitem3_menu), menu_show_symbol_window1);
|
|
||||||
gtk_tooltips_set_tip (tooltips, menu_show_symbol_window1, _("Toggle the window with symbols on and off"), NULL);
|
|
||||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_show_symbol_window1), TRUE);
|
|
||||||
|
|
||||||
menu_show_toolbar1 = gtk_check_menu_item_new_with_mnemonic (_("Show Toolbar"));
|
menu_show_toolbar1 = gtk_check_menu_item_new_with_mnemonic (_("Show Toolbar"));
|
||||||
gtk_widget_show (menu_show_toolbar1);
|
gtk_widget_show (menu_show_toolbar1);
|
||||||
gtk_container_add (GTK_CONTAINER (menuitem3_menu), menu_show_toolbar1);
|
gtk_container_add (GTK_CONTAINER (menuitem3_menu), menu_show_toolbar1);
|
||||||
@ -786,31 +776,13 @@ create_window1 (void)
|
|||||||
gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton18);
|
gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton18);
|
||||||
gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton18), tooltips, _("Find the entered text in the current file"), NULL);
|
gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton18), tooltips, _("Find the entered text in the current file"), NULL);
|
||||||
|
|
||||||
separatortoolitem5 = (GtkWidget*) gtk_separator_tool_item_new ();
|
toolitem14 = (GtkWidget*) gtk_tool_item_new ();
|
||||||
gtk_widget_show (separatortoolitem5);
|
gtk_widget_show (toolitem14);
|
||||||
gtk_container_add (GTK_CONTAINER (toolbar1), separatortoolitem5);
|
gtk_container_add (GTK_CONTAINER (toolbar1), toolitem14);
|
||||||
|
|
||||||
toolitem9 = (GtkWidget*) gtk_tool_item_new ();
|
|
||||||
gtk_widget_show (toolitem9);
|
|
||||||
gtk_container_add (GTK_CONTAINER (toolbar1), toolitem9);
|
|
||||||
|
|
||||||
combo1 = gtk_combo_new ();
|
|
||||||
g_object_set_data (G_OBJECT (GTK_COMBO (combo1)->popwin),
|
|
||||||
"GladeParentKey", combo1);
|
|
||||||
gtk_widget_show (combo1);
|
|
||||||
gtk_container_add (GTK_CONTAINER (toolitem9), combo1);
|
|
||||||
|
|
||||||
combo_entry1 = GTK_COMBO (combo1)->entry;
|
|
||||||
gtk_widget_show (combo_entry1);
|
|
||||||
gtk_editable_set_editable (GTK_EDITABLE (combo_entry1), FALSE);
|
|
||||||
|
|
||||||
toolitem13 = (GtkWidget*) gtk_tool_item_new ();
|
|
||||||
gtk_widget_show (toolitem13);
|
|
||||||
gtk_container_add (GTK_CONTAINER (toolbar1), toolitem13);
|
|
||||||
|
|
||||||
alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
gtk_widget_show (alignment1);
|
gtk_widget_show (alignment1);
|
||||||
gtk_container_add (GTK_CONTAINER (toolitem13), alignment1);
|
gtk_container_add (GTK_CONTAINER (toolitem14), alignment1);
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 10, 10);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 10, 10);
|
||||||
|
|
||||||
label1 = gtk_label_new ("");
|
label1 = gtk_label_new ("");
|
||||||
@ -820,6 +792,7 @@ create_window1 (void)
|
|||||||
toolbutton19 = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-quit");
|
toolbutton19 = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-quit");
|
||||||
gtk_widget_show (toolbutton19);
|
gtk_widget_show (toolbutton19);
|
||||||
gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton19);
|
gtk_container_add (GTK_CONTAINER (toolbar1), toolbutton19);
|
||||||
|
gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbutton19), tooltips, _("Quit Geany"), NULL);
|
||||||
|
|
||||||
vpaned1 = gtk_vpaned_new ();
|
vpaned1 = gtk_vpaned_new ();
|
||||||
gtk_widget_show (vpaned1);
|
gtk_widget_show (vpaned1);
|
||||||
@ -1040,9 +1013,6 @@ create_window1 (void)
|
|||||||
g_signal_connect ((gpointer) menu_show_messages_window1, "toggled",
|
g_signal_connect ((gpointer) menu_show_messages_window1, "toggled",
|
||||||
G_CALLBACK (on_show_messages_window1_toggled),
|
G_CALLBACK (on_show_messages_window1_toggled),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect ((gpointer) menu_show_symbol_window1, "toggled",
|
|
||||||
G_CALLBACK (on_show_symbol_window1_toggled),
|
|
||||||
NULL);
|
|
||||||
g_signal_connect ((gpointer) menu_show_toolbar1, "toggled",
|
g_signal_connect ((gpointer) menu_show_toolbar1, "toggled",
|
||||||
G_CALLBACK (on_show_toolbar1_toggled),
|
G_CALLBACK (on_show_toolbar1_toggled),
|
||||||
NULL);
|
NULL);
|
||||||
@ -1244,7 +1214,6 @@ create_window1 (void)
|
|||||||
GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4");
|
GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4");
|
||||||
GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1");
|
GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1");
|
||||||
GLADE_HOOKUP_OBJECT (window1, menu_show_messages_window1, "menu_show_messages_window1");
|
GLADE_HOOKUP_OBJECT (window1, menu_show_messages_window1, "menu_show_messages_window1");
|
||||||
GLADE_HOOKUP_OBJECT (window1, menu_show_symbol_window1, "menu_show_symbol_window1");
|
|
||||||
GLADE_HOOKUP_OBJECT (window1, menu_show_toolbar1, "menu_show_toolbar1");
|
GLADE_HOOKUP_OBJECT (window1, menu_show_toolbar1, "menu_show_toolbar1");
|
||||||
GLADE_HOOKUP_OBJECT (window1, menu_markers_margin1, "menu_markers_margin1");
|
GLADE_HOOKUP_OBJECT (window1, menu_markers_margin1, "menu_markers_margin1");
|
||||||
GLADE_HOOKUP_OBJECT (window1, menu_toolbar2, "menu_toolbar2");
|
GLADE_HOOKUP_OBJECT (window1, menu_toolbar2, "menu_toolbar2");
|
||||||
@ -1302,11 +1271,7 @@ create_window1 (void)
|
|||||||
GLADE_HOOKUP_OBJECT (window1, toolitem11, "toolitem11");
|
GLADE_HOOKUP_OBJECT (window1, toolitem11, "toolitem11");
|
||||||
GLADE_HOOKUP_OBJECT (window1, entry1, "entry1");
|
GLADE_HOOKUP_OBJECT (window1, entry1, "entry1");
|
||||||
GLADE_HOOKUP_OBJECT (window1, toolbutton18, "toolbutton18");
|
GLADE_HOOKUP_OBJECT (window1, toolbutton18, "toolbutton18");
|
||||||
GLADE_HOOKUP_OBJECT (window1, separatortoolitem5, "separatortoolitem5");
|
GLADE_HOOKUP_OBJECT (window1, toolitem14, "toolitem14");
|
||||||
GLADE_HOOKUP_OBJECT (window1, toolitem9, "toolitem9");
|
|
||||||
GLADE_HOOKUP_OBJECT (window1, combo1, "combo1");
|
|
||||||
GLADE_HOOKUP_OBJECT (window1, combo_entry1, "combo_entry1");
|
|
||||||
GLADE_HOOKUP_OBJECT (window1, toolitem13, "toolitem13");
|
|
||||||
GLADE_HOOKUP_OBJECT (window1, alignment1, "alignment1");
|
GLADE_HOOKUP_OBJECT (window1, alignment1, "alignment1");
|
||||||
GLADE_HOOKUP_OBJECT (window1, label1, "label1");
|
GLADE_HOOKUP_OBJECT (window1, label1, "label1");
|
||||||
GLADE_HOOKUP_OBJECT (window1, toolbutton19, "toolbutton19");
|
GLADE_HOOKUP_OBJECT (window1, toolbutton19, "toolbutton19");
|
||||||
@ -1941,9 +1906,15 @@ create_prefs_dialog (void)
|
|||||||
GtkWidget *alignment4;
|
GtkWidget *alignment4;
|
||||||
GtkWidget *vbox7;
|
GtkWidget *vbox7;
|
||||||
GtkWidget *check_toolbar_search;
|
GtkWidget *check_toolbar_search;
|
||||||
GtkWidget *check_toolbar_tags;
|
|
||||||
GtkWidget *label98;
|
GtkWidget *label98;
|
||||||
GtkWidget *label104;
|
GtkWidget *label104;
|
||||||
|
GtkWidget *frame7;
|
||||||
|
GtkWidget *alignment9;
|
||||||
|
GtkWidget *vbox11;
|
||||||
|
GtkWidget *check_list_symbol;
|
||||||
|
GtkWidget *check_list_openfiles;
|
||||||
|
GtkWidget *label146;
|
||||||
|
GtkWidget *label105;
|
||||||
GtkWidget *frame4;
|
GtkWidget *frame4;
|
||||||
GtkWidget *alignment5;
|
GtkWidget *alignment5;
|
||||||
GtkWidget *table2;
|
GtkWidget *table2;
|
||||||
@ -1952,7 +1923,6 @@ create_prefs_dialog (void)
|
|||||||
GtkWidget *msgwin_font;
|
GtkWidget *msgwin_font;
|
||||||
GtkWidget *tagbar_font;
|
GtkWidget *tagbar_font;
|
||||||
GtkWidget *label99;
|
GtkWidget *label99;
|
||||||
GtkWidget *label105;
|
|
||||||
GtkWidget *label94;
|
GtkWidget *label94;
|
||||||
GtkWidget *vbox5;
|
GtkWidget *vbox5;
|
||||||
GtkWidget *frame6;
|
GtkWidget *frame6;
|
||||||
@ -2032,6 +2002,24 @@ create_prefs_dialog (void)
|
|||||||
GtkWidget *entry_template_developer;
|
GtkWidget *entry_template_developer;
|
||||||
GtkWidget *label132;
|
GtkWidget *label132;
|
||||||
GtkWidget *label119;
|
GtkWidget *label119;
|
||||||
|
GtkWidget *vbox10;
|
||||||
|
GtkWidget *label139;
|
||||||
|
GtkWidget *alignment8;
|
||||||
|
GtkWidget *table7;
|
||||||
|
GtkWidget *label140;
|
||||||
|
GtkWidget *font_term;
|
||||||
|
GtkWidget *label142;
|
||||||
|
GtkWidget *label143;
|
||||||
|
GtkWidget *color_fore;
|
||||||
|
GtkWidget *color_back;
|
||||||
|
GtkWidget *label144;
|
||||||
|
GtkObject *spin_scrollback_adj;
|
||||||
|
GtkWidget *spin_scrollback;
|
||||||
|
GtkWidget *label145;
|
||||||
|
GtkWidget *entry_emulation;
|
||||||
|
GtkWidget *check_scroll_key;
|
||||||
|
GtkWidget *check_scroll_out;
|
||||||
|
GtkWidget *label137;
|
||||||
GtkWidget *dialog_action_area3;
|
GtkWidget *dialog_action_area3;
|
||||||
GtkWidget *cancelbutton1;
|
GtkWidget *cancelbutton1;
|
||||||
GtkWidget *okbutton1;
|
GtkWidget *okbutton1;
|
||||||
@ -2130,12 +2118,6 @@ create_prefs_dialog (void)
|
|||||||
gtk_tooltips_set_tip (tooltips, check_toolbar_search, _("Display the search field and button in the toolbar"), NULL);
|
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);
|
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_search), FALSE);
|
||||||
|
|
||||||
check_toolbar_tags = gtk_check_button_new_with_mnemonic (_("Show symbol list"));
|
|
||||||
gtk_widget_show (check_toolbar_tags);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox7), check_toolbar_tags, FALSE, FALSE, 0);
|
|
||||||
GTK_WIDGET_UNSET_FLAGS (check_toolbar_tags, GTK_CAN_FOCUS);
|
|
||||||
gtk_tooltips_set_tip (tooltips, check_toolbar_tags, _("Display the symbol list in the toolbar"), NULL);
|
|
||||||
|
|
||||||
label98 = gtk_label_new (_("<b>Toolbar</b>"));
|
label98 = gtk_label_new (_("<b>Toolbar</b>"));
|
||||||
gtk_widget_show (label98);
|
gtk_widget_show (label98);
|
||||||
gtk_frame_set_label_widget (GTK_FRAME (frame3), label98);
|
gtk_frame_set_label_widget (GTK_FRAME (frame3), label98);
|
||||||
@ -2146,15 +2128,51 @@ create_prefs_dialog (void)
|
|||||||
gtk_box_pack_start (GTK_BOX (vbox3), label104, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox3), label104, FALSE, FALSE, 0);
|
||||||
gtk_misc_set_padding (GTK_MISC (label104), 0, 2);
|
gtk_misc_set_padding (GTK_MISC (label104), 0, 2);
|
||||||
|
|
||||||
|
frame7 = gtk_frame_new (NULL);
|
||||||
|
gtk_widget_show (frame7);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox3), frame7, FALSE, FALSE, 0);
|
||||||
|
gtk_frame_set_shadow_type (GTK_FRAME (frame7), GTK_SHADOW_NONE);
|
||||||
|
|
||||||
|
alignment9 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
|
gtk_widget_show (alignment9);
|
||||||
|
gtk_container_add (GTK_CONTAINER (frame7), alignment9);
|
||||||
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment9), 0, 0, 12, 0);
|
||||||
|
|
||||||
|
vbox11 = gtk_vbox_new (FALSE, 0);
|
||||||
|
gtk_widget_show (vbox11);
|
||||||
|
gtk_container_add (GTK_CONTAINER (alignment9), vbox11);
|
||||||
|
|
||||||
|
check_list_symbol = gtk_check_button_new_with_mnemonic (_("Show symbol list"));
|
||||||
|
gtk_widget_show (check_list_symbol);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox11), check_list_symbol, FALSE, FALSE, 0);
|
||||||
|
gtk_tooltips_set_tip (tooltips, check_list_symbol, _("Toggle the symbol list on and off"), NULL);
|
||||||
|
gtk_button_set_focus_on_click (GTK_BUTTON (check_list_symbol), FALSE);
|
||||||
|
|
||||||
|
check_list_openfiles = gtk_check_button_new_with_mnemonic (_("Show open files list"));
|
||||||
|
gtk_widget_show (check_list_openfiles);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox11), check_list_openfiles, FALSE, FALSE, 0);
|
||||||
|
gtk_tooltips_set_tip (tooltips, check_list_openfiles, _("Toggle the symbol list on and off"), NULL);
|
||||||
|
gtk_button_set_focus_on_click (GTK_BUTTON (check_list_openfiles), FALSE);
|
||||||
|
|
||||||
|
label146 = gtk_label_new (_("<b>Left window</b>"));
|
||||||
|
gtk_widget_show (label146);
|
||||||
|
gtk_frame_set_label_widget (GTK_FRAME (frame7), label146);
|
||||||
|
gtk_label_set_use_markup (GTK_LABEL (label146), TRUE);
|
||||||
|
|
||||||
|
label105 = gtk_label_new ("");
|
||||||
|
gtk_widget_show (label105);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox3), label105, FALSE, FALSE, 0);
|
||||||
|
gtk_misc_set_padding (GTK_MISC (label105), 0, 2);
|
||||||
|
|
||||||
frame4 = gtk_frame_new (NULL);
|
frame4 = gtk_frame_new (NULL);
|
||||||
gtk_widget_show (frame4);
|
gtk_widget_show (frame4);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox3), frame4, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox3), frame4, TRUE, TRUE, 0);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame4), GTK_SHADOW_NONE);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame4), GTK_SHADOW_NONE);
|
||||||
|
|
||||||
alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
gtk_widget_show (alignment5);
|
gtk_widget_show (alignment5);
|
||||||
gtk_container_add (GTK_CONTAINER (frame4), alignment5);
|
gtk_container_add (GTK_CONTAINER (frame4), alignment5);
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 6);
|
||||||
|
|
||||||
table2 = gtk_table_new (2, 2, FALSE);
|
table2 = gtk_table_new (2, 2, FALSE);
|
||||||
gtk_widget_show (table2);
|
gtk_widget_show (table2);
|
||||||
@ -2197,11 +2215,6 @@ create_prefs_dialog (void)
|
|||||||
gtk_frame_set_label_widget (GTK_FRAME (frame4), label99);
|
gtk_frame_set_label_widget (GTK_FRAME (frame4), label99);
|
||||||
gtk_label_set_use_markup (GTK_LABEL (label99), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (label99), TRUE);
|
||||||
|
|
||||||
label105 = gtk_label_new ("");
|
|
||||||
gtk_widget_show (label105);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox3), label105, FALSE, FALSE, 0);
|
|
||||||
gtk_misc_set_padding (GTK_MISC (label105), 0, 2);
|
|
||||||
|
|
||||||
label94 = gtk_label_new (_("General"));
|
label94 = gtk_label_new (_("General"));
|
||||||
gtk_widget_show (label94);
|
gtk_widget_show (label94);
|
||||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), label94);
|
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), label94);
|
||||||
@ -2294,7 +2307,7 @@ create_prefs_dialog (void)
|
|||||||
alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
gtk_widget_show (alignment6);
|
gtk_widget_show (alignment6);
|
||||||
gtk_container_add (GTK_CONTAINER (frame5), alignment6);
|
gtk_container_add (GTK_CONTAINER (frame5), alignment6);
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 0, 0, 12, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 0, 0, 12, 6);
|
||||||
|
|
||||||
table3 = gtk_table_new (3, 2, FALSE);
|
table3 = gtk_table_new (3, 2, FALSE);
|
||||||
gtk_widget_show (table3);
|
gtk_widget_show (table3);
|
||||||
@ -2661,6 +2674,131 @@ create_prefs_dialog (void)
|
|||||||
gtk_widget_show (label119);
|
gtk_widget_show (label119);
|
||||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 3), label119);
|
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 3), label119);
|
||||||
|
|
||||||
|
vbox10 = gtk_vbox_new (FALSE, 0);
|
||||||
|
gtk_widget_show (vbox10);
|
||||||
|
gtk_container_add (GTK_CONTAINER (notebook2), vbox10);
|
||||||
|
|
||||||
|
label139 = gtk_label_new (_("These are settings for the virtual terminal emulator widget (VTE). They only apply, if the VTE library could be loaded."));
|
||||||
|
gtk_widget_show (label139);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox10), label139, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label139), GTK_JUSTIFY_FILL);
|
||||||
|
gtk_label_set_line_wrap (GTK_LABEL (label139), TRUE);
|
||||||
|
gtk_misc_set_alignment (GTK_MISC (label139), 0.14, 0.19);
|
||||||
|
gtk_misc_set_padding (GTK_MISC (label139), 0, 8);
|
||||||
|
|
||||||
|
alignment8 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
|
gtk_widget_show (alignment8);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox10), alignment8, FALSE, FALSE, 0);
|
||||||
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment8), 0, 0, 12, 6);
|
||||||
|
|
||||||
|
table7 = gtk_table_new (7, 2, FALSE);
|
||||||
|
gtk_widget_show (table7);
|
||||||
|
gtk_container_add (GTK_CONTAINER (alignment8), table7);
|
||||||
|
gtk_table_set_row_spacings (GTK_TABLE (table7), 3);
|
||||||
|
gtk_table_set_col_spacings (GTK_TABLE (table7), 25);
|
||||||
|
|
||||||
|
label140 = gtk_label_new (_("Terminal font"));
|
||||||
|
gtk_widget_show (label140);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), label140, 0, 1, 0, 1,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_misc_set_alignment (GTK_MISC (label140), 0, 0.5);
|
||||||
|
|
||||||
|
font_term = gtk_font_button_new ();
|
||||||
|
gtk_widget_show (font_term);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), font_term, 1, 2, 0, 1,
|
||||||
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_widget_set_sensitive (font_term, FALSE);
|
||||||
|
gtk_tooltips_set_tip (tooltips, font_term, _("Sets the font for the terminal widget."), NULL);
|
||||||
|
|
||||||
|
label142 = gtk_label_new (_("Foreground color"));
|
||||||
|
gtk_widget_show (label142);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), label142, 0, 1, 1, 2,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_misc_set_alignment (GTK_MISC (label142), 0, 0.5);
|
||||||
|
|
||||||
|
label143 = gtk_label_new (_("Background color"));
|
||||||
|
gtk_widget_show (label143);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), label143, 0, 1, 2, 3,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_misc_set_alignment (GTK_MISC (label143), 0, 0.5);
|
||||||
|
|
||||||
|
color_fore = gtk_color_button_new ();
|
||||||
|
gtk_widget_show (color_fore);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), color_fore, 1, 2, 1, 2,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_widget_set_sensitive (color_fore, FALSE);
|
||||||
|
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_widget_show (color_back);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), color_back, 1, 2, 2, 3,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_widget_set_sensitive (color_back, FALSE);
|
||||||
|
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"));
|
||||||
|
|
||||||
|
label144 = gtk_label_new (_("Scrollback lines"));
|
||||||
|
gtk_widget_show (label144);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), label144, 0, 1, 3, 4,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_misc_set_alignment (GTK_MISC (label144), 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_widget_show (spin_scrollback);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), spin_scrollback, 1, 2, 3, 4,
|
||||||
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_widget_set_sensitive (spin_scrollback, FALSE);
|
||||||
|
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);
|
||||||
|
|
||||||
|
label145 = gtk_label_new (_("Terminal emulation"));
|
||||||
|
gtk_widget_show (label145);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), label145, 0, 1, 4, 5,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_misc_set_alignment (GTK_MISC (label145), 0, 0.5);
|
||||||
|
|
||||||
|
entry_emulation = gtk_entry_new ();
|
||||||
|
gtk_widget_show (entry_emulation);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), entry_emulation, 1, 2, 4, 5,
|
||||||
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_widget_set_sensitive (entry_emulation, FALSE);
|
||||||
|
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_widget_show (check_scroll_key);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), check_scroll_key, 1, 2, 5, 6,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_widget_set_sensitive (check_scroll_key, FALSE);
|
||||||
|
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_widget_show (check_scroll_out);
|
||||||
|
gtk_table_attach (GTK_TABLE (table7), check_scroll_out, 1, 2, 6, 7,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
gtk_widget_set_sensitive (check_scroll_out, FALSE);
|
||||||
|
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);
|
||||||
|
|
||||||
|
label137 = gtk_label_new (_("Terminal"));
|
||||||
|
gtk_widget_show (label137);
|
||||||
|
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 4), label137);
|
||||||
|
|
||||||
dialog_action_area3 = GTK_DIALOG (prefs_dialog)->action_area;
|
dialog_action_area3 = GTK_DIALOG (prefs_dialog)->action_area;
|
||||||
gtk_widget_show (dialog_action_area3);
|
gtk_widget_show (dialog_action_area3);
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END);
|
||||||
@ -2693,9 +2831,15 @@ create_prefs_dialog (void)
|
|||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment4, "alignment4");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment4, "alignment4");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox7, "vbox7");
|
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_search, "check_toolbar_search");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_tags, "check_toolbar_tags");
|
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label98, "label98");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label98, "label98");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label104, "label104");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label104, "label104");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, frame7, "frame7");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment9, "alignment9");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox11, "vbox11");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, check_list_symbol, "check_list_symbol");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, check_list_openfiles, "check_list_openfiles");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label146, "label146");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label105, "label105");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame4, "frame4");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, frame4, "frame4");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment5, "alignment5");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment5, "alignment5");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, table2, "table2");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, table2, "table2");
|
||||||
@ -2704,7 +2848,6 @@ create_prefs_dialog (void)
|
|||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, msgwin_font, "msgwin_font");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, msgwin_font, "msgwin_font");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, tagbar_font, "tagbar_font");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, tagbar_font, "tagbar_font");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label99, "label99");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label99, "label99");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label105, "label105");
|
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label94, "label94");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label94, "label94");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox5, "vbox5");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox5, "vbox5");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame6, "frame6");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, frame6, "frame6");
|
||||||
@ -2782,6 +2925,23 @@ create_prefs_dialog (void)
|
|||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, entry_template_developer, "entry_template_developer");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, entry_template_developer, "entry_template_developer");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label132, "label132");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label132, "label132");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label119, "label119");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label119, "label119");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox10, "vbox10");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label139, "label139");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment8, "alignment8");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, table7, "table7");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label140, "label140");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, font_term, "font_term");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label142, "label142");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label143, "label143");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, color_fore, "color_fore");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, color_back, "color_back");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label144, "label144");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, spin_scrollback, "spin_scrollback");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label145, "label145");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, entry_emulation, "entry_emulation");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, check_scroll_key, "check_scroll_key");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, check_scroll_out, "check_scroll_out");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label137, "label137");
|
||||||
GLADE_HOOKUP_OBJECT_NO_REF (prefs_dialog, dialog_action_area3, "dialog_action_area3");
|
GLADE_HOOKUP_OBJECT_NO_REF (prefs_dialog, dialog_action_area3, "dialog_action_area3");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, cancelbutton1, "cancelbutton1");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, cancelbutton1, "cancelbutton1");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, okbutton1, "okbutton1");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, okbutton1, "okbutton1");
|
||||||
|
@ -75,8 +75,9 @@ void configuration_save(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_key_file_set_integer(config, PACKAGE, "long_line_column", app->long_line_column);
|
g_key_file_set_integer(config, PACKAGE, "long_line_column", app->long_line_column);
|
||||||
g_key_file_set_integer(config, PACKAGE, "long_line_color", app->long_line_color);
|
g_key_file_set_string(config, PACKAGE, "long_line_color", app->long_line_color);
|
||||||
g_key_file_set_boolean(config, PACKAGE, "treeview_nb_visible", app->treeview_nb_visible);
|
g_key_file_set_boolean(config, PACKAGE, "treeview_symbol_visible", app->treeview_symbol_visible);
|
||||||
|
g_key_file_set_boolean(config, PACKAGE, "treeview_openfiles_visible", app->treeview_openfiles_visible);
|
||||||
g_key_file_set_boolean(config, PACKAGE, "msgwindow_visible", app->msgwindow_visible);
|
g_key_file_set_boolean(config, PACKAGE, "msgwindow_visible", app->msgwindow_visible);
|
||||||
g_key_file_set_boolean(config, PACKAGE, "use_auto_indention", app->use_auto_indention);
|
g_key_file_set_boolean(config, PACKAGE, "use_auto_indention", app->use_auto_indention);
|
||||||
g_key_file_set_boolean(config, PACKAGE, "show_indent_guide", app->show_indent_guide);
|
g_key_file_set_boolean(config, PACKAGE, "show_indent_guide", app->show_indent_guide);
|
||||||
@ -99,7 +100,6 @@ void configuration_save(void)
|
|||||||
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_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_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_search", app->pref_main_show_search);
|
||||||
g_key_file_set_boolean(config, PACKAGE, "pref_main_show_tags", app->pref_main_show_tags);
|
|
||||||
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_new_line", app->pref_editor_new_line);
|
||||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_trail_space", app->pref_editor_trail_space);
|
g_key_file_set_boolean(config, PACKAGE, "pref_editor_trail_space", app->pref_editor_trail_space);
|
||||||
g_key_file_set_string(config, PACKAGE, "pref_template_developer", app->pref_template_developer);
|
g_key_file_set_string(config, PACKAGE, "pref_template_developer", app->pref_template_developer);
|
||||||
@ -180,9 +180,10 @@ gboolean configuration_load(void)
|
|||||||
app->toolbar_visible = utils_get_setting_boolean(config, PACKAGE, "toolbar_visible", TRUE);
|
app->toolbar_visible = utils_get_setting_boolean(config, PACKAGE, "toolbar_visible", TRUE);
|
||||||
app->toolbar_icon_style = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_style", GTK_TOOLBAR_ICONS);
|
app->toolbar_icon_style = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_style", GTK_TOOLBAR_ICONS);
|
||||||
app->toolbar_icon_size = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_size", 2);
|
app->toolbar_icon_size = utils_get_setting_integer(config, PACKAGE, "toolbar_icon_size", 2);
|
||||||
app->long_line_color = utils_get_setting_integer(config, PACKAGE, "long_line_color", 0xC2EBC2);
|
app->long_line_color = utils_get_setting_string(config, PACKAGE, "long_line_color", "#C2EBC2");
|
||||||
app->long_line_column = utils_get_setting_integer(config, PACKAGE, "long_line_column", 72);
|
app->long_line_column = utils_get_setting_integer(config, PACKAGE, "long_line_column", 72);
|
||||||
app->treeview_nb_visible = utils_get_setting_boolean(config, PACKAGE, "treeview_nb_visible", TRUE);
|
app->treeview_symbol_visible = utils_get_setting_boolean(config, PACKAGE, "treeview_symbol_visible", TRUE);
|
||||||
|
app->treeview_openfiles_visible = utils_get_setting_boolean(config, PACKAGE, "treeview_openfiles_visible", TRUE);
|
||||||
app->msgwindow_visible = utils_get_setting_boolean(config, PACKAGE, "msgwindow_visible", TRUE);
|
app->msgwindow_visible = utils_get_setting_boolean(config, PACKAGE, "msgwindow_visible", TRUE);
|
||||||
app->use_auto_indention = utils_get_setting_boolean(config, PACKAGE, "use_auto_indention", TRUE);
|
app->use_auto_indention = utils_get_setting_boolean(config, PACKAGE, "use_auto_indention", TRUE);
|
||||||
app->show_indent_guide = utils_get_setting_boolean(config, PACKAGE, "show_indent_guide", FALSE);
|
app->show_indent_guide = utils_get_setting_boolean(config, PACKAGE, "show_indent_guide", FALSE);
|
||||||
@ -197,7 +198,6 @@ gboolean configuration_load(void)
|
|||||||
app->editor_font = utils_get_setting_string(config, PACKAGE, "editor_font", "Courier New 9");
|
app->editor_font = utils_get_setting_string(config, PACKAGE, "editor_font", "Courier New 9");
|
||||||
app->tagbar_font = utils_get_setting_string(config, PACKAGE, "tagbar_font", "Cursor 8");
|
app->tagbar_font = utils_get_setting_string(config, PACKAGE, "tagbar_font", "Cursor 8");
|
||||||
app->msgwin_font = utils_get_setting_string(config, PACKAGE, "msgwin_font", "Cursor 8");
|
app->msgwin_font = utils_get_setting_string(config, PACKAGE, "msgwin_font", "Cursor 8");
|
||||||
app->terminal_settings = utils_get_setting_string(config, PACKAGE, "terminal_settings", "");
|
|
||||||
scribble_text = utils_get_setting_string(config, PACKAGE, "scribble_text",
|
scribble_text = utils_get_setting_string(config, PACKAGE, "scribble_text",
|
||||||
_("Type here what you want, use it as a notice/scratch board"));
|
_("Type here what you want, use it as a notice/scratch board"));
|
||||||
|
|
||||||
@ -216,7 +216,8 @@ gboolean configuration_load(void)
|
|||||||
app->geometry[3] = geo[3];
|
app->geometry[3] = geo[3];
|
||||||
}
|
}
|
||||||
hpan_position = utils_get_setting_integer(config, PACKAGE, "treeview_position", -1);
|
hpan_position = utils_get_setting_integer(config, PACKAGE, "treeview_position", -1);
|
||||||
vpan_position = utils_get_setting_integer(config, PACKAGE, "msgwindow_position", geo[3] - GEANY_MSGWIN_HEIGHT);
|
vpan_position = utils_get_setting_integer(config, PACKAGE, "msgwindow_position",
|
||||||
|
(geo) ? (geo[3] - GEANY_MSGWIN_HEIGHT) : -1);
|
||||||
|
|
||||||
|
|
||||||
app->pref_editor_tab_width = utils_get_setting_integer(config, PACKAGE, "pref_editor_tab_width", 4);
|
app->pref_editor_tab_width = utils_get_setting_integer(config, PACKAGE, "pref_editor_tab_width", 4);
|
||||||
@ -224,9 +225,9 @@ gboolean configuration_load(void)
|
|||||||
app->pref_main_load_session = utils_get_setting_boolean(config, PACKAGE, "pref_main_load_session", 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_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_search = utils_get_setting_boolean(config, PACKAGE, "pref_main_show_search", TRUE);
|
||||||
app->pref_main_show_tags = utils_get_setting_boolean(config, PACKAGE, "pref_main_show_tags", TRUE);
|
|
||||||
app->pref_template_developer = utils_get_setting_string(config, PACKAGE, "pref_template_developer", g_get_real_name());
|
app->pref_template_developer = utils_get_setting_string(config, PACKAGE, "pref_template_developer", g_get_real_name());
|
||||||
app->pref_template_company = utils_get_setting_string(config, PACKAGE, "pref_template_company", "");
|
app->pref_template_company = utils_get_setting_string(config, PACKAGE, "pref_template_company", "");
|
||||||
|
app->terminal_settings = utils_get_setting_string(config, PACKAGE, "terminal_settings", "Monospace 10;;;500;xterm;true;true");
|
||||||
|
|
||||||
tmp_string = utils_get_initials(app->pref_template_developer);
|
tmp_string = utils_get_initials(app->pref_template_developer);
|
||||||
app->pref_template_initial = utils_get_setting_string(config, PACKAGE, "pref_template_initial", tmp_string);
|
app->pref_template_initial = utils_get_setting_string(config, PACKAGE, "pref_template_initial", tmp_string);
|
||||||
|
17
src/main.c
17
src/main.c
@ -90,11 +90,11 @@ void apply_settings(void)
|
|||||||
gtk_widget_hide(app->toolbar);
|
gtk_widget_hide(app->toolbar);
|
||||||
app->toolbar_visible = FALSE;
|
app->toolbar_visible = FALSE;
|
||||||
}
|
}
|
||||||
if (! app->treeview_nb_visible)
|
if (! app->treeview_symbol_visible)
|
||||||
{
|
{
|
||||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_show_symbol_window1")), FALSE);
|
//gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_show_symbol_window1")), FALSE);
|
||||||
gtk_widget_hide(app->treeview_notebook);
|
gtk_widget_hide(app->treeview_notebook);
|
||||||
app->treeview_nb_visible = FALSE;
|
app->treeview_symbol_visible = FALSE;
|
||||||
}
|
}
|
||||||
if (! app->msgwindow_visible)
|
if (! app->msgwindow_visible)
|
||||||
{
|
{
|
||||||
@ -196,11 +196,6 @@ void apply_settings(void)
|
|||||||
gtk_widget_hide(lookup_widget(app->window, "toolbutton18"));
|
gtk_widget_hide(lookup_widget(app->window, "toolbutton18"));
|
||||||
gtk_widget_hide(lookup_widget(app->window, "separatortoolitem4"));
|
gtk_widget_hide(lookup_widget(app->window, "separatortoolitem4"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! app->pref_main_show_tags)
|
|
||||||
{
|
|
||||||
gtk_widget_hide(lookup_widget(app->window, "combo1"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -291,10 +286,8 @@ gint main(gint argc, gchar **argv)
|
|||||||
app->notebook = lookup_widget(app->window, "notebook1");
|
app->notebook = lookup_widget(app->window, "notebook1");
|
||||||
msgwindow.notebook = lookup_widget(app->window, "notebook_info");
|
msgwindow.notebook = lookup_widget(app->window, "notebook_info");
|
||||||
app->statusbar = lookup_widget(app->window, "statusbar");
|
app->statusbar = lookup_widget(app->window, "statusbar");
|
||||||
app->tag_combo = lookup_widget(app->window, "combo1");
|
|
||||||
app->popup_menu = create_edit_menu1();
|
app->popup_menu = create_edit_menu1();
|
||||||
app->toolbar_menu = create_toolbar_popup_menu1();
|
app->toolbar_menu = create_toolbar_popup_menu1();
|
||||||
app->tagbar_menu = dialogs_create_tagbar_popup_menu();
|
|
||||||
app->compile_button = lookup_widget(app->window, "toolbutton13");
|
app->compile_button = lookup_widget(app->window, "toolbutton13");
|
||||||
app->popup_goto_items[0] = lookup_widget(app->popup_menu, "goto_tag_definition1");
|
app->popup_goto_items[0] = lookup_widget(app->popup_menu, "goto_tag_definition1");
|
||||||
app->popup_goto_items[1] = lookup_widget(app->popup_menu, "goto_tag_declaration1");
|
app->popup_goto_items[1] = lookup_widget(app->popup_menu, "goto_tag_declaration1");
|
||||||
@ -342,7 +335,6 @@ gint main(gint argc, gchar **argv)
|
|||||||
g_signal_connect(G_OBJECT(app->window), "configure-event", G_CALLBACK(on_window_configure_event), NULL);
|
g_signal_connect(G_OBJECT(app->window), "configure-event", G_CALLBACK(on_window_configure_event), NULL);
|
||||||
g_signal_connect(G_OBJECT(app->window), "key-press-event", G_CALLBACK(on_window_key_press_event), NULL);
|
g_signal_connect(G_OBJECT(app->window), "key-press-event", G_CALLBACK(on_window_key_press_event), NULL);
|
||||||
g_signal_connect(G_OBJECT(app->toolbar), "button-press-event", G_CALLBACK(toolbar_popup_menu), NULL);
|
g_signal_connect(G_OBJECT(app->toolbar), "button-press-event", G_CALLBACK(toolbar_popup_menu), NULL);
|
||||||
g_signal_connect(G_OBJECT(GTK_COMBO(app->tag_combo)->entry), "changed", G_CALLBACK(on_toolbar_tag_clicked), NULL);
|
|
||||||
|
|
||||||
treeviews_prepare_taglist();
|
treeviews_prepare_taglist();
|
||||||
treeviews_prepare_openfiles();
|
treeviews_prepare_openfiles();
|
||||||
@ -392,9 +384,6 @@ gint main(gint argc, gchar **argv)
|
|||||||
// this option is currently disabled, until the document menu item is reordered
|
// this option is currently disabled, until the document menu item is reordered
|
||||||
gtk_widget_hide(lookup_widget(app->window, "set_file_readonly1"));
|
gtk_widget_hide(lookup_widget(app->window, "set_file_readonly1"));
|
||||||
|
|
||||||
// hide the tag combobox if tag-support is disabled
|
|
||||||
if (ignore_global_tags) gtk_widget_hide(app->tag_combo);
|
|
||||||
|
|
||||||
// open a new file if no other file was opened
|
// open a new file if no other file was opened
|
||||||
if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) == 0)
|
if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) == 0)
|
||||||
document_new_file(filetypes[GEANY_FILETYPES_ALL]);
|
document_new_file(filetypes[GEANY_FILETYPES_ALL]);
|
||||||
|
164
src/prefs.c
164
src/prefs.c
@ -17,6 +17,7 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -27,16 +28,20 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "msgwindow.h"
|
#include "msgwindow.h"
|
||||||
#include "sciwrappers.h"
|
#include "sciwrappers.h"
|
||||||
|
#ifdef HAVE_VTE
|
||||||
|
# include "vte.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
gint old_tab_width;
|
gint old_tab_width;
|
||||||
gint old_long_line_column;
|
gint old_long_line_column;
|
||||||
gint old_long_line_color;
|
gchar *old_long_line_color;
|
||||||
|
|
||||||
|
|
||||||
void prefs_init_dialog(void)
|
void prefs_init_dialog(void)
|
||||||
{
|
{
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
|
GdkColor *color;
|
||||||
|
|
||||||
// General settings
|
// General settings
|
||||||
widget = lookup_widget(app->prefs_dialog, "check_load_session");
|
widget = lookup_widget(app->prefs_dialog, "check_load_session");
|
||||||
@ -54,8 +59,11 @@ void prefs_init_dialog(void)
|
|||||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_search");
|
widget = lookup_widget(app->prefs_dialog, "check_toolbar_search");
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_main_show_search);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_main_show_search);
|
||||||
|
|
||||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_tags");
|
widget = lookup_widget(app->prefs_dialog, "check_list_symbol");
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_main_show_tags);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->treeview_symbol_visible);
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "check_list_openfiles");
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->treeview_openfiles_visible);
|
||||||
|
|
||||||
widget = lookup_widget(app->prefs_dialog, "tagbar_font");
|
widget = lookup_widget(app->prefs_dialog, "tagbar_font");
|
||||||
gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), app->tagbar_font);
|
gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), app->tagbar_font);
|
||||||
@ -82,11 +90,13 @@ void prefs_init_dialog(void)
|
|||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), app->long_line_column);
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), app->long_line_column);
|
||||||
old_long_line_column = app->long_line_column;
|
old_long_line_column = app->long_line_column;
|
||||||
|
|
||||||
old_long_line_color = app->long_line_color;
|
old_long_line_color = g_strdup(app->long_line_color);
|
||||||
|
|
||||||
//widget = lookup_widget(app->prefs_dialog, "long_line_color");
|
|
||||||
//gtk_color_button_set_color(GTK_FONT_BUTTON(widget), app->long_line_col);
|
|
||||||
|
|
||||||
|
color = g_new(GdkColor, 1);
|
||||||
|
gdk_color_parse(app->long_line_color, color);
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "long_line_color");
|
||||||
|
gtk_color_button_set_color(GTK_COLOR_BUTTON(widget), color);
|
||||||
|
g_free(color);
|
||||||
|
|
||||||
// Tools Settings
|
// Tools Settings
|
||||||
if (app->build_c_cmd)
|
if (app->build_c_cmd)
|
||||||
@ -129,6 +139,41 @@ void prefs_init_dialog(void)
|
|||||||
|
|
||||||
widget = lookup_widget(app->prefs_dialog, "entry_template_version");
|
widget = lookup_widget(app->prefs_dialog, "entry_template_version");
|
||||||
gtk_entry_set_text(GTK_ENTRY(widget), app->pref_template_version);
|
gtk_entry_set_text(GTK_ENTRY(widget), app->pref_template_version);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_VTE
|
||||||
|
// VTE settings
|
||||||
|
extern struct vte_conf *vc;
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "font_term");
|
||||||
|
gtk_font_button_set_font_name(GTK_FONT_BUTTON(widget), vc->font);
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "color_fore");
|
||||||
|
gtk_color_button_set_color(GTK_COLOR_BUTTON(widget), vc->color_fore);
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "color_back");
|
||||||
|
gtk_color_button_set_color(GTK_COLOR_BUTTON(widget), vc->color_back);
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "spin_scrollback");
|
||||||
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), vc->scrollback_lines);
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "entry_emulation");
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(widget), vc->emulation);
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "check_scroll_key");
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->scroll_on_key);
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "check_scroll_out");
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->scroll_on_out);
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "font_term"), TRUE);
|
||||||
|
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "color_fore"), TRUE);
|
||||||
|
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "color_back"), TRUE);
|
||||||
|
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "spin_scrollback"), TRUE);
|
||||||
|
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "entry_emulation"), TRUE);
|
||||||
|
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "check_scroll_key"), TRUE);
|
||||||
|
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "check_scroll_out"), TRUE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -158,8 +203,11 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
|||||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_search");
|
widget = lookup_widget(app->prefs_dialog, "check_toolbar_search");
|
||||||
app->pref_main_show_search = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
app->pref_main_show_search = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||||
|
|
||||||
widget = lookup_widget(app->prefs_dialog, "check_toolbar_tags");
|
widget = lookup_widget(app->prefs_dialog, "check_list_symbol");
|
||||||
app->pref_main_show_tags = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
app->treeview_symbol_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "check_list_openfiles");
|
||||||
|
app->treeview_openfiles_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||||
|
|
||||||
|
|
||||||
// Editor settings
|
// Editor settings
|
||||||
@ -231,16 +279,57 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
|||||||
app->pref_template_version = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
|
app->pref_template_version = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_VTE
|
||||||
|
// VTE settings
|
||||||
|
extern struct vte_conf *vc;
|
||||||
|
gchar *hex_color_back, *hex_color_fore;
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "spin_scrollback");
|
||||||
|
vc->scrollback_lines = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "entry_emulation");
|
||||||
|
g_free(vc->emulation);
|
||||||
|
vc->emulation = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "check_scroll_key");
|
||||||
|
vc->scroll_on_key = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "check_scroll_out");
|
||||||
|
vc->scroll_on_out = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||||
|
|
||||||
|
g_free(app->terminal_settings);
|
||||||
|
hex_color_fore = utils_get_hex_from_color(vc->color_fore);
|
||||||
|
hex_color_back = utils_get_hex_from_color(vc->color_back);
|
||||||
|
app->terminal_settings = g_strdup_printf("%s;%s;%s;%d;%s;%s;%s", vc->font,
|
||||||
|
//(vc->color_fore->red | (vc->color_fore->green << 8) | (vc->color_fore->blue << 16)),
|
||||||
|
//(vc->color_back->red | (vc->color_back->green << 8) | (vc->color_back->blue << 16)),
|
||||||
|
hex_color_back, hex_color_fore,
|
||||||
|
vc->scrollback_lines, vc->emulation,
|
||||||
|
utils_btoa(vc->scroll_on_key), utils_btoa(vc->scroll_on_out));
|
||||||
|
|
||||||
|
vte_apply_user_settings();
|
||||||
|
g_free(hex_color_fore);
|
||||||
|
g_free(hex_color_back);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// apply the changes made
|
// 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, "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, "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, "separatortoolitem4"), app->pref_main_show_search);
|
||||||
|
|
||||||
utils_widget_show_hide(lookup_widget(app->window, "combo1"), app->pref_main_show_tags);
|
utils_widget_show_hide(gtk_notebook_get_nth_page(
|
||||||
|
GTK_NOTEBOOK(app->treeview_notebook), 0), app->treeview_symbol_visible);
|
||||||
|
utils_widget_show_hide(gtk_notebook_get_nth_page(
|
||||||
|
GTK_NOTEBOOK(app->treeview_notebook), 1), app->treeview_openfiles_visible);
|
||||||
|
// hide complete notebook if both pages are hidden
|
||||||
|
if ((! app->treeview_symbol_visible) && (! app->treeview_openfiles_visible))
|
||||||
|
gtk_widget_hide(app->treeview_notebook);
|
||||||
|
else
|
||||||
|
gtk_widget_show(app->treeview_notebook);
|
||||||
|
|
||||||
gtk_widget_modify_font(lookup_widget(app->window, "treeview2"),
|
gtk_widget_modify_font(lookup_widget(app->window, "treeview2"),
|
||||||
pango_font_description_from_string(app->tagbar_font));
|
pango_font_description_from_string(app->tagbar_font));
|
||||||
gtk_widget_modify_font(GTK_COMBO(app->tag_combo)->entry, pango_font_description_from_string(app->tagbar_font));
|
|
||||||
gtk_widget_modify_font(lookup_widget(app->window, "entry1"), pango_font_description_from_string(app->tagbar_font));
|
gtk_widget_modify_font(lookup_widget(app->window, "entry1"), pango_font_description_from_string(app->tagbar_font));
|
||||||
gtk_widget_modify_font(msgwindow.tree_compiler, pango_font_description_from_string(app->msgwin_font));
|
gtk_widget_modify_font(msgwindow.tree_compiler, pango_font_description_from_string(app->msgwin_font));
|
||||||
gtk_widget_modify_font(msgwindow.tree_msg, pango_font_description_from_string(app->msgwin_font));
|
gtk_widget_modify_font(msgwindow.tree_msg, pango_font_description_from_string(app->msgwin_font));
|
||||||
@ -248,15 +337,14 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
|||||||
|
|
||||||
utils_set_font();
|
utils_set_font();
|
||||||
|
|
||||||
// re-colorize all open documents, if tab width has changed
|
// re-colorize all open documents, if tab width or long line settings have changed
|
||||||
if ((app->pref_editor_tab_width != old_tab_width) ||
|
if ((app->pref_editor_tab_width != old_tab_width) ||
|
||||||
(app->long_line_color != old_long_line_color) ||
|
(! utils_strcmp(app->long_line_color, old_long_line_color)) ||
|
||||||
(app->long_line_column != old_long_line_column))
|
(app->long_line_column != old_long_line_column))
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
for (i = 0; i < GEANY_MAX_OPEN_FILES; i++)
|
for (i = 0; i < GEANY_MAX_OPEN_FILES; i++)
|
||||||
{
|
{
|
||||||
//geany_debug("%d", i);
|
|
||||||
if (doc_list[i].sci)
|
if (doc_list[i].sci)
|
||||||
{
|
{
|
||||||
sci_set_tab_width(doc_list[i].sci, app->pref_editor_tab_width);
|
sci_set_tab_width(doc_list[i].sci, app->pref_editor_tab_width);
|
||||||
@ -265,7 +353,8 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
|||||||
}
|
}
|
||||||
old_tab_width = app->pref_editor_tab_width;
|
old_tab_width = app->pref_editor_tab_width;
|
||||||
old_long_line_column = app->long_line_column;
|
old_long_line_column = app->long_line_column;
|
||||||
old_long_line_color = app->long_line_color;
|
g_free(old_long_line_color);
|
||||||
|
old_long_line_color = g_strdup(app->long_line_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -285,27 +374,64 @@ void on_prefs_color_choosed(GtkColorButton *widget, gpointer user_data)
|
|||||||
{
|
{
|
||||||
GdkColor color;
|
GdkColor color;
|
||||||
|
|
||||||
|
switch (GPOINTER_TO_INT(user_data))
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
gtk_color_button_get_color(widget, &color);
|
gtk_color_button_get_color(widget, &color);
|
||||||
app->long_line_color = (color.red / 256) | ((color.green / 256) << 8) | ((color.blue / 256) << 16);
|
app->long_line_color = utils_get_hex_from_color(&color);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
g_free(vc->color_fore);
|
||||||
|
vc->color_fore = g_new(GdkColor, 1);
|
||||||
|
gtk_color_button_get_color(widget, vc->color_fore);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
g_free(vc->color_back);
|
||||||
|
vc->color_back = g_new(GdkColor, 1);
|
||||||
|
gtk_color_button_get_color(widget, vc->color_back);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void on_prefs_font_choosed(GtkFontButton *widget, gpointer user_data)
|
void on_prefs_font_choosed(GtkFontButton *widget, gpointer user_data)
|
||||||
{
|
{
|
||||||
if (GPOINTER_TO_INT(user_data) == 1)
|
switch (GPOINTER_TO_INT(user_data))
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
{
|
{
|
||||||
g_free(app->tagbar_font);
|
g_free(app->tagbar_font);
|
||||||
app->tagbar_font = g_strdup(gtk_font_button_get_font_name(widget));
|
app->tagbar_font = g_strdup(gtk_font_button_get_font_name(widget));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (GPOINTER_TO_INT(user_data) == 2)
|
case 2:
|
||||||
{
|
{
|
||||||
g_free(app->msgwin_font);
|
g_free(app->msgwin_font);
|
||||||
app->msgwin_font = g_strdup(gtk_font_button_get_font_name(widget));
|
app->msgwin_font = g_strdup(gtk_font_button_get_font_name(widget));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (GPOINTER_TO_INT(user_data) == 3)
|
case 3:
|
||||||
{
|
{
|
||||||
g_free(app->editor_font);
|
g_free(app->editor_font);
|
||||||
app->editor_font = g_strdup(gtk_font_button_get_font_name(widget));
|
app->editor_font = g_strdup(gtk_font_button_get_font_name(widget));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
#ifdef HAVE_VTE
|
||||||
|
// VTE settings
|
||||||
|
extern struct vte_conf *vc;
|
||||||
|
g_free(vc->font);
|
||||||
|
vc->font = g_strdup(gtk_font_button_get_font_name(widget));
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "sciwrappers.h"
|
#include "sciwrappers.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
// stolen from cssed (http://cssed.sf.net), thanks
|
// stolen from cssed (http://cssed.sf.net), thanks
|
||||||
@ -47,13 +48,13 @@ sci_set_line_numbers(ScintillaObject * sci, gboolean set, gint extra_width)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sci_set_mark_long_lines(ScintillaObject * sci, gint column, gint color)
|
void sci_set_mark_long_lines(ScintillaObject * sci, gint column, const gchar *color)
|
||||||
{
|
{
|
||||||
if (column > 0)
|
if (column > 0)
|
||||||
{
|
{
|
||||||
SSM(sci, SCI_SETEDGEMODE, EDGE_LINE, 0);
|
SSM(sci, SCI_SETEDGEMODE, EDGE_LINE, 0);
|
||||||
SSM(sci, SCI_SETEDGECOLUMN, column - 1, 0);
|
SSM(sci, SCI_SETEDGECOLUMN, column - 1, 0);
|
||||||
SSM(sci, SCI_SETEDGECOLOUR, color, 0);
|
SSM(sci, SCI_SETEDGECOLOUR, utils_get_int_from_hexcolor(color), 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -615,7 +616,7 @@ gint sci_get_tab_width(ScintillaObject * sci)
|
|||||||
|
|
||||||
gchar sci_get_char_at(ScintillaObject *sci, gint pos)
|
gchar sci_get_char_at(ScintillaObject *sci, gint pos)
|
||||||
{
|
{
|
||||||
return SSM(sci, SCI_GETCHARAT, pos, 0);
|
return (gchar) SSM(sci, SCI_GETCHARAT, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
|
|
||||||
void sci_set_line_numbers (ScintillaObject* sci, gboolean set, gint extra_width);
|
void sci_set_line_numbers (ScintillaObject* sci, gboolean set, gint extra_width);
|
||||||
void sci_set_mark_long_lines (ScintillaObject* sci, gint column, gint color);
|
void sci_set_mark_long_lines (ScintillaObject* sci, gint column, const gchar *color);
|
||||||
void sci_set_text (ScintillaObject* sci, const gchar* text);
|
void sci_set_text (ScintillaObject* sci, const gchar* text);
|
||||||
void sci_add_text (ScintillaObject* sci, const gchar* text);
|
void sci_add_text (ScintillaObject* sci, const gchar* text);
|
||||||
void sci_add_text_buffer (ScintillaObject* sci, const gchar* text, gint len);
|
void sci_add_text_buffer (ScintillaObject* sci, const gchar* text, gint len);
|
||||||
|
@ -16,8 +16,11 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "geany.h"
|
#include "geany.h"
|
||||||
#include "support.h"
|
#include "support.h"
|
||||||
@ -33,19 +36,15 @@ void treeviews_prepare_taglist(void)
|
|||||||
GtkTreeSelection *select;
|
GtkTreeSelection *select;
|
||||||
tv.tree_taglist = lookup_widget(app->window, "treeview2");
|
tv.tree_taglist = lookup_widget(app->window, "treeview2");
|
||||||
|
|
||||||
//tv.store_taglist = gtk_list_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
tv.store_taglist = gtk_tree_store_new(1, G_TYPE_STRING);
|
||||||
tv.store_taglist = gtk_list_store_new(1, G_TYPE_STRING);
|
|
||||||
gtk_tree_view_set_model(GTK_TREE_VIEW(tv.tree_taglist), GTK_TREE_MODEL(tv.store_taglist));
|
|
||||||
|
|
||||||
renderer = gtk_cell_renderer_text_new();
|
renderer = gtk_cell_renderer_text_new();
|
||||||
//renderer_img = gtk_cell_renderer_pixbuf_new();
|
|
||||||
column = gtk_tree_view_column_new_with_attributes(_("Symbols"), renderer, "text", 0, NULL);
|
column = gtk_tree_view_column_new_with_attributes(_("Symbols"), renderer, "text", 0, NULL);
|
||||||
gtk_tree_view_append_column(GTK_TREE_VIEW(tv.tree_taglist), column);
|
gtk_tree_view_append_column(GTK_TREE_VIEW(tv.tree_taglist), column);
|
||||||
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tv.tree_taglist), FALSE);
|
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tv.tree_taglist), FALSE);
|
||||||
|
|
||||||
gtk_widget_modify_font(tv.tree_taglist, pango_font_description_from_string(app->tagbar_font));
|
gtk_widget_modify_font(tv.tree_taglist, pango_font_description_from_string(app->tagbar_font));
|
||||||
g_signal_connect(G_OBJECT(tv.tree_taglist), "button-press-event",
|
gtk_tree_view_set_model(GTK_TREE_VIEW(tv.tree_taglist), GTK_TREE_MODEL(tv.store_taglist));
|
||||||
G_CALLBACK(on_tree_view_button_press_event), GINT_TO_POINTER(2));
|
|
||||||
|
|
||||||
// selection handling
|
// selection handling
|
||||||
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv.tree_taglist));
|
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv.tree_taglist));
|
||||||
@ -54,6 +53,25 @@ void treeviews_prepare_taglist(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void treeviews_init_tag_list(void)
|
||||||
|
{
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &(tv.tag_function), NULL);
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &(tv.tag_function), 0, _("Function"), -1);
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &(tv.tag_macro), NULL);
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &(tv.tag_macro), 0, _("Macro"), -1);
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &(tv.tag_member), NULL);
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &(tv.tag_member), 0, _("Members"), -1);
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &(tv.tag_variable), NULL);
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &(tv.tag_variable), 0, _("Variables"), -1);
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &(tv.tag_namespace), NULL);
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &(tv.tag_namespace), 0, _("Namespace"), -1);
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &(tv.tag_struct), NULL);
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &(tv.tag_struct), 0, _("Struct / Typedef"), -1);
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &(tv.tag_other), NULL);
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &(tv.tag_other), 0, _("Other"), -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* does some preparing things to the open files list widget */
|
/* does some preparing things to the open files list widget */
|
||||||
void treeviews_prepare_openfiles(void)
|
void treeviews_prepare_openfiles(void)
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -26,11 +28,19 @@
|
|||||||
|
|
||||||
|
|
||||||
typedef struct treeviews {
|
typedef struct treeviews {
|
||||||
GtkListStore *store_taglist;
|
//GtkListStore *store_taglist;
|
||||||
|
GtkTreeStore *store_taglist;
|
||||||
GtkListStore *store_openfiles;
|
GtkListStore *store_openfiles;
|
||||||
GtkWidget *tree_taglist;
|
GtkWidget *tree_taglist;
|
||||||
GtkWidget *tree_openfiles;
|
GtkWidget *tree_openfiles;
|
||||||
GtkWidget *popup_openfiles;
|
GtkWidget *popup_openfiles;
|
||||||
|
GtkTreeIter tag_function;
|
||||||
|
GtkTreeIter tag_macro;
|
||||||
|
GtkTreeIter tag_member;
|
||||||
|
GtkTreeIter tag_variable;
|
||||||
|
GtkTreeIter tag_namespace;
|
||||||
|
GtkTreeIter tag_struct;
|
||||||
|
GtkTreeIter tag_other;
|
||||||
} treeviews;
|
} treeviews;
|
||||||
|
|
||||||
treeviews tv;
|
treeviews tv;
|
||||||
@ -39,6 +49,10 @@ treeviews tv;
|
|||||||
|
|
||||||
void treeviews_prepare_taglist(void);
|
void treeviews_prepare_taglist(void);
|
||||||
|
|
||||||
|
gint treeviews_sort_tag_list(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data);
|
||||||
|
|
||||||
|
void treeviews_init_tag_list(void);
|
||||||
|
|
||||||
void treeviews_prepare_openfiles(void);
|
void treeviews_prepare_openfiles(void);
|
||||||
|
|
||||||
GtkTreeIter treeviews_openfiles_add(gint idx, const gchar *string);
|
GtkTreeIter treeviews_openfiles_add(gint idx, const gchar *string);
|
||||||
|
237
src/utils.c
237
src/utils.c
@ -369,12 +369,16 @@ const GList *utils_get_tag_list(gint idx, guint tag_types)
|
|||||||
{
|
{
|
||||||
TMTag *tag;
|
TMTag *tag;
|
||||||
guint i;
|
guint i;
|
||||||
|
GeanySymbol *symbol;
|
||||||
|
|
||||||
if (tag_names)
|
if (tag_names)
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
for (tmp = tag_names; tmp; tmp = g_list_next(tmp))
|
for (tmp = tag_names; tmp; tmp = g_list_next(tmp))
|
||||||
|
{
|
||||||
|
g_free(((GeanySymbol*)tmp->data)->str);
|
||||||
g_free(tmp->data);
|
g_free(tmp->data);
|
||||||
|
}
|
||||||
g_list_free(tag_names);
|
g_list_free(tag_names);
|
||||||
tag_names = NULL;
|
tag_names = NULL;
|
||||||
}
|
}
|
||||||
@ -388,14 +392,22 @@ const GList *utils_get_tag_list(gint idx, guint tag_types)
|
|||||||
if (tag->type & tag_types)
|
if (tag->type & tag_types)
|
||||||
{
|
{
|
||||||
if ((tag->atts.entry.scope != NULL) && isalpha(tag->atts.entry.scope[0]))
|
if ((tag->atts.entry.scope != NULL) && isalpha(tag->atts.entry.scope[0]))
|
||||||
tag_names = g_list_prepend(tag_names, g_strdup_printf("%s::%s [%ld]"
|
{
|
||||||
, tag->atts.entry.scope, tag->name, tag->atts.entry.line));
|
symbol = g_new(GeanySymbol, 1);
|
||||||
|
symbol->str = g_strdup_printf("%s::%s [%ld]", tag->atts.entry.scope, tag->name, tag->atts.entry.line);
|
||||||
|
symbol->type = tag->type;
|
||||||
|
tag_names = g_list_prepend(tag_names, symbol);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
tag_names = g_list_prepend(tag_names, g_strdup_printf("%s [%ld]"
|
{
|
||||||
, tag->name, tag->atts.entry.line));
|
symbol = g_new(GeanySymbol, 1);
|
||||||
|
symbol->str = g_strdup_printf("%s [%ld]", tag->name, tag->atts.entry.line);
|
||||||
|
symbol->type = tag->type;
|
||||||
|
tag_names = g_list_prepend(tag_names, symbol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag_names = g_list_sort(tag_names, (GCompareFunc) strcmp);
|
}
|
||||||
|
tag_names = g_list_sort(tag_names, (GCompareFunc) utils_compare_symbol);
|
||||||
return tag_names;
|
return tag_names;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -649,39 +661,30 @@ void utils_update_visible_tag_lists(gint idx)
|
|||||||
const GList *tags;
|
const GList *tags;
|
||||||
|
|
||||||
// make all inactive, because there is no more tab left, or something strange occured
|
// make all inactive, because there is no more tab left, or something strange occured
|
||||||
if (idx == -1)
|
if (idx == -1 && app->treeview_symbol_visible)
|
||||||
{
|
|
||||||
if (app->treeview_nb_visible)
|
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gtk_list_store_clear(tv.store_taglist);
|
gtk_tree_store_clear(tv.store_taglist);
|
||||||
gtk_list_store_append(tv.store_taglist, &iter);
|
gtk_tree_store_append(tv.store_taglist, &iter, NULL);
|
||||||
gtk_list_store_set(tv.store_taglist, &iter, 0, _("No tags found"), -1);
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, _("No tags found"), -1);
|
||||||
gtk_widget_set_sensitive(app->tagbar, FALSE);
|
gtk_widget_set_sensitive(app->tagbar, FALSE);
|
||||||
}
|
|
||||||
//if (app->toolbar_visible && app->tooltagbar_visible)
|
|
||||||
if (app->toolbar_visible)
|
|
||||||
{
|
|
||||||
gtk_widget_set_sensitive(app->tag_combo, FALSE);
|
|
||||||
gtk_combo_set_popdown_strings(GTK_COMBO(app->tag_combo), NULL);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! doc_list[idx].file_type->has_tags)
|
if (! doc_list[idx].file_type->has_tags)
|
||||||
{
|
{
|
||||||
gtk_widget_set_sensitive(app->tagbar, FALSE);
|
gtk_widget_set_sensitive(app->tagbar, FALSE);
|
||||||
gtk_widget_set_sensitive(app->tag_combo, FALSE);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tags = utils_get_tag_list(idx, tm_tag_max_t);
|
|
||||||
|
|
||||||
// updating the tag list in the left tag window if visisble
|
// updating the tag list in the left tag window if visisble
|
||||||
if (app->treeview_nb_visible)
|
if (app->treeview_symbol_visible)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gtk_list_store_clear(tv.store_taglist);
|
|
||||||
|
tags = utils_get_tag_list(idx, tm_tag_max_t);
|
||||||
|
gtk_tree_store_clear(tv.store_taglist);
|
||||||
|
|
||||||
if (doc_list[idx].tm_file && tags)
|
if (doc_list[idx].tm_file && tags)
|
||||||
{
|
{
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
@ -690,39 +693,67 @@ void utils_update_visible_tag_lists(gint idx)
|
|||||||
model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv.tree_taglist));
|
model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv.tree_taglist));
|
||||||
g_object_ref(model); // Make sure the model stays with us after the tree view unrefs it
|
g_object_ref(model); // Make sure the model stays with us after the tree view unrefs it
|
||||||
gtk_tree_view_set_model(GTK_TREE_VIEW(tv.tree_taglist), NULL); // Detach model from view
|
gtk_tree_view_set_model(GTK_TREE_VIEW(tv.tree_taglist), NULL); // Detach model from view
|
||||||
|
treeviews_init_tag_list();
|
||||||
for (tmp = (GList*)tags; tmp; tmp = g_list_next(tmp))
|
for (tmp = (GList*)tags; tmp; tmp = g_list_next(tmp))
|
||||||
{
|
{
|
||||||
gtk_list_store_append(tv.store_taglist, &iter);
|
switch (((GeanySymbol*)tmp->data)->type)
|
||||||
gtk_list_store_set(tv.store_taglist, &iter, 0, tmp->data, -1);
|
{
|
||||||
|
case tm_tag_prototype_t:
|
||||||
|
case tm_tag_function_t:
|
||||||
|
{
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &iter, &(tv.tag_function));
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, ((GeanySymbol*)tmp->data)->str, -1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case tm_tag_macro_t:
|
||||||
|
case tm_tag_macro_with_arg_t:
|
||||||
|
{
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &iter, &(tv.tag_macro));
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, ((GeanySymbol*)tmp->data)->str, -1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case tm_tag_member_t:
|
||||||
|
{
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &iter, &(tv.tag_member));
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, ((GeanySymbol*)tmp->data)->str, -1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case tm_tag_typedef_t:
|
||||||
|
case tm_tag_struct_t:
|
||||||
|
{
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &iter, &(tv.tag_struct));
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, ((GeanySymbol*)tmp->data)->str, -1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case tm_tag_variable_t:
|
||||||
|
{
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &iter, &(tv.tag_variable));
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, ((GeanySymbol*)tmp->data)->str, -1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case tm_tag_namespace_t:
|
||||||
|
{
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &iter, &(tv.tag_namespace));
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, ((GeanySymbol*)tmp->data)->str, -1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
gtk_tree_store_append(tv.store_taglist, &iter, &(tv.tag_other));
|
||||||
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, ((GeanySymbol*)tmp->data)->str, -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
gtk_tree_view_set_model(GTK_TREE_VIEW(tv.tree_taglist), model); // Re-attach model to view
|
gtk_tree_view_set_model(GTK_TREE_VIEW(tv.tree_taglist), model); // Re-attach model to view
|
||||||
g_object_unref(model);
|
g_object_unref(model);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gtk_list_store_append(tv.store_taglist, &iter);
|
gtk_tree_store_append(tv.store_taglist, &iter, NULL);
|
||||||
gtk_list_store_set(tv.store_taglist, &iter, 0, _("No tags found"), -1);
|
gtk_tree_store_set(tv.store_taglist, &iter, 0, _("No tags found"), -1);
|
||||||
gtk_widget_set_sensitive(app->tagbar, FALSE);
|
gtk_widget_set_sensitive(app->tagbar, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// updating the combo box if visible
|
|
||||||
//if (app->toolbar_visible && app->tooltagbar_visible)
|
|
||||||
if (app->toolbar_visible)
|
|
||||||
{
|
|
||||||
gtk_widget_set_sensitive(app->tag_combo, (tags != NULL));
|
|
||||||
if (doc_list[idx].tm_file && tags)
|
|
||||||
{
|
|
||||||
g_signal_handlers_block_by_func (GTK_OBJECT (GTK_COMBO (app->tag_combo)->entry),
|
|
||||||
G_CALLBACK (on_toolbar_tag_clicked), NULL);
|
|
||||||
gtk_combo_set_popdown_strings(GTK_COMBO(app->tag_combo), (GList *)tags);
|
|
||||||
g_signal_handlers_unblock_by_func (GTK_OBJECT(GTK_COMBO(app->tag_combo)->entry),
|
|
||||||
G_CALLBACK (on_toolbar_tag_clicked), NULL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gtk_combo_set_popdown_strings(GTK_COMBO(app->tag_combo), NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1080,7 +1111,8 @@ gchar *utils_btoa(gboolean sbool)
|
|||||||
|
|
||||||
gboolean utils_atob(const gchar *str)
|
gboolean utils_atob(const gchar *str)
|
||||||
{
|
{
|
||||||
if (strcasecmp(str, "TRUE")) return FALSE;
|
if (str == NULL) return FALSE;
|
||||||
|
else if (strcasecmp(str, "TRUE")) return FALSE;
|
||||||
else return TRUE;
|
else return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1225,7 +1257,6 @@ void utils_strip_trailing_spaces(gint idx)
|
|||||||
gdouble utils_scale_round (gdouble val, gdouble factor)
|
gdouble utils_scale_round (gdouble val, gdouble factor)
|
||||||
{
|
{
|
||||||
//val = floor(val * factor + 0.5);
|
//val = floor(val * factor + 0.5);
|
||||||
/// check for floor
|
|
||||||
val = floor(val);
|
val = floor(val);
|
||||||
val = MAX(val, 0);
|
val = MAX(val, 0);
|
||||||
val = MIN(val, factor);
|
val = MIN(val, factor);
|
||||||
@ -1864,7 +1895,12 @@ void utils_replace_filename(gint idx)
|
|||||||
sci_set_current_position(doc_list[idx].sci, 0);
|
sci_set_current_position(doc_list[idx].sci, 0);
|
||||||
sci_set_search_anchor(doc_list[idx].sci);
|
sci_set_search_anchor(doc_list[idx].sci);
|
||||||
// stop if filebase was not found
|
// stop if filebase was not found
|
||||||
if (sci_search_next(doc_list[idx].sci, SCFIND_MATCHCASE, filebase) == -1) return;
|
if (sci_search_next(doc_list[idx].sci, SCFIND_MATCHCASE, filebase) == -1)
|
||||||
|
{
|
||||||
|
g_free(filebase);
|
||||||
|
g_free(filename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sci_replace_sel(doc_list[idx].sci, filename);
|
sci_replace_sel(doc_list[idx].sci, filename);
|
||||||
g_free(filebase);
|
g_free(filebase);
|
||||||
@ -1872,3 +1908,108 @@ void utils_replace_filename(gint idx)
|
|||||||
|
|
||||||
sci_set_current_position(doc_list[idx].sci, pos);
|
sci_set_current_position(doc_list[idx].sci, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
GdkColor *utils_get_color_from_bint(gint icolor)
|
||||||
|
{
|
||||||
|
GdkColor *gcolor = g_new(GdkColor, 1);
|
||||||
|
guint16 r, g, b;
|
||||||
|
|
||||||
|
r = icolor;
|
||||||
|
g = r >> 8;
|
||||||
|
b = g >> 8;
|
||||||
|
|
||||||
|
//gcolor->red = r & 255;
|
||||||
|
//gcolor->green = g & 255;
|
||||||
|
//gcolor->blue = b & 255;
|
||||||
|
//geany_debug("%d %d %d", gcolor->red, gcolor->green, gcolor->blue);
|
||||||
|
|
||||||
|
|
||||||
|
geany_debug("%d %d %d", r, g, b);
|
||||||
|
|
||||||
|
gcolor->red = (r << 8) + r;
|
||||||
|
gcolor->green = (g << 8) + g;
|
||||||
|
gcolor->blue = (b << 8) + b;
|
||||||
|
|
||||||
|
//gcolor->red = (r & 255) * 257;
|
||||||
|
//gcolor->green = (g & 255) * 257;
|
||||||
|
//gcolor->blue = (b & 255) * 257;
|
||||||
|
//geany_debug("%d %d %d %d", icolor, gcolor->red, gcolor->green, gcolor->blue);
|
||||||
|
|
||||||
|
return gcolor;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* wrapper function to let strcmp work with GeanySymbol struct */
|
||||||
|
gint utils_compare_symbol(const GeanySymbol *a, const GeanySymbol *b)
|
||||||
|
{
|
||||||
|
if (a == NULL || b == NULL) return 0;
|
||||||
|
|
||||||
|
return strcmp(a->str, b->str);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gchar *utils_get_hex_from_color(GdkColor *color)
|
||||||
|
{
|
||||||
|
gchar *hex = g_malloc0(9);
|
||||||
|
|
||||||
|
g_snprintf(hex, 8, "#%02X%02X%02X",
|
||||||
|
(guint) (utils_scale_round(color->red / 256, 255)),
|
||||||
|
(guint) (utils_scale_round(color->green / 256, 255)),
|
||||||
|
(guint) (utils_scale_round(color->blue / 256, 255)));
|
||||||
|
|
||||||
|
return hex;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* utils_is_hex() and utils_get_int_from_hexcolor() taken from pango-color.c to get red, green and
|
||||||
|
* blue values from a hex string like #C0C0C0 */
|
||||||
|
gboolean utils_is_hex(const gchar *spec, gint len, guint *c)
|
||||||
|
{
|
||||||
|
const gchar *end;
|
||||||
|
*c = 0;
|
||||||
|
for (end = spec + len; spec != end; spec++)
|
||||||
|
{
|
||||||
|
if (g_ascii_isxdigit(*spec)) *c = (*c << 4) | g_ascii_xdigit_value(*spec);
|
||||||
|
else return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gint utils_get_int_from_hexcolor(const gchar *hex)
|
||||||
|
{
|
||||||
|
#define DEFAULT_COLOR 12774338
|
||||||
|
if (hex[0] == '#')
|
||||||
|
{
|
||||||
|
size_t len;
|
||||||
|
guint r, g, b;
|
||||||
|
|
||||||
|
hex++;
|
||||||
|
len = strlen(hex);
|
||||||
|
if (len % 3 || len < 3 || len > 12) return DEFAULT_COLOR;
|
||||||
|
|
||||||
|
len /= 3;
|
||||||
|
|
||||||
|
if (! utils_is_hex(hex, len, &r) ||
|
||||||
|
! utils_is_hex(hex + len, len, &g) ||
|
||||||
|
! utils_is_hex(hex + len * 2, len, &b))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
gint bits = len * 4;
|
||||||
|
r <<= 8 - bits;
|
||||||
|
g <<= 8 - bits;
|
||||||
|
b <<= 8 - bits;
|
||||||
|
while (bits < 8)
|
||||||
|
{
|
||||||
|
r |= (r >> bits);
|
||||||
|
g |= (g >> bits);
|
||||||
|
b |= (b >> bits);
|
||||||
|
bits *= 2;
|
||||||
|
}
|
||||||
|
//geany_debug("%d %d %d", r, g, b);
|
||||||
|
return r | (g << 8) | (b << 16);
|
||||||
|
}
|
||||||
|
return DEFAULT_COLOR;
|
||||||
|
}
|
||||||
|
@ -193,4 +193,10 @@ void utils_switch_document(gint direction);
|
|||||||
|
|
||||||
void utils_replace_filename(gint idx);
|
void utils_replace_filename(gint idx);
|
||||||
|
|
||||||
|
gint utils_compare_symbol(const GeanySymbol *a, const GeanySymbol *b);
|
||||||
|
|
||||||
|
gchar *utils_get_hex_from_color(GdkColor *color);
|
||||||
|
|
||||||
|
gint utils_get_int_from_hexcolor(const gchar *hex);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
93
src/vte.c
93
src/vte.c
@ -33,6 +33,7 @@
|
|||||||
#include "vte.h"
|
#include "vte.h"
|
||||||
#include "msgwindow.h"
|
#include "msgwindow.h"
|
||||||
#include "support.h"
|
#include "support.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
extern gchar **environ;
|
extern gchar **environ;
|
||||||
@ -40,6 +41,7 @@ static pid_t pid;
|
|||||||
static GModule *module = NULL;
|
static GModule *module = NULL;
|
||||||
static struct vte_funcs *vf;
|
static struct vte_funcs *vf;
|
||||||
|
|
||||||
|
|
||||||
#define VTE_TERMINAL(obj) (GTK_CHECK_CAST((obj), VTE_TYPE_TERMINAL, VteTerminal))
|
#define VTE_TERMINAL(obj) (GTK_CHECK_CAST((obj), VTE_TYPE_TERMINAL, VteTerminal))
|
||||||
#define VTE_TYPE_TERMINAL (vf->vte_terminal_get_type())
|
#define VTE_TYPE_TERMINAL (vf->vte_terminal_get_type())
|
||||||
|
|
||||||
@ -93,17 +95,19 @@ void vte_init(void)
|
|||||||
if (module == NULL || app->have_vte == FALSE)
|
if (module == NULL || app->have_vte == FALSE)
|
||||||
{
|
{
|
||||||
app->have_vte = FALSE;
|
app->have_vte = FALSE;
|
||||||
geany_debug("Could not load libvte.so.4, terminal support disabled");
|
geany_debug("Could(or should) not load libvte.so.4, terminal support disabled");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
app->have_vte = TRUE;
|
app->have_vte = TRUE;
|
||||||
vf = g_new(struct vte_funcs, 1);
|
vf = g_new(struct vte_funcs, 1);
|
||||||
|
vc = g_new(struct vte_conf, 1);
|
||||||
vte_register_symbols(module);
|
vte_register_symbols(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
vte = vf->vte_terminal_new();
|
vte = vf->vte_terminal_new();
|
||||||
|
vc->vte = vte;
|
||||||
scrollbar = gtk_vscrollbar_new(GTK_ADJUSTMENT(VTE_TERMINAL(vte)->adjustment));
|
scrollbar = gtk_vscrollbar_new(GTK_ADJUSTMENT(VTE_TERMINAL(vte)->adjustment));
|
||||||
GTK_WIDGET_UNSET_FLAGS(scrollbar, GTK_CAN_FOCUS);
|
GTK_WIDGET_UNSET_FLAGS(scrollbar, GTK_CAN_FOCUS);
|
||||||
|
|
||||||
@ -114,16 +118,16 @@ void vte_init(void)
|
|||||||
gtk_box_pack_start(GTK_BOX(hbox), vte, TRUE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(hbox), vte, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox), scrollbar, FALSE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(hbox), scrollbar, FALSE, TRUE, 0);
|
||||||
|
|
||||||
vf->vte_terminal_set_mouse_autohide(VTE_TERMINAL(vte), TRUE);
|
vte_get_settings();
|
||||||
vf->vte_terminal_set_scrollback_lines(VTE_TERMINAL(vte), 20);
|
|
||||||
vf->vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(vte), TRUE);
|
|
||||||
vf->vte_terminal_set_scroll_on_output(VTE_TERMINAL(vte), TRUE);
|
|
||||||
vf->vte_terminal_set_word_chars(VTE_TERMINAL(vte), GEANY_WORDCHARS);
|
|
||||||
vf->vte_terminal_set_size(VTE_TERMINAL(vte), 50, 1);
|
vf->vte_terminal_set_size(VTE_TERMINAL(vte), 50, 1);
|
||||||
vf->vte_terminal_set_encoding(VTE_TERMINAL(vte), "UTF-8");
|
vf->vte_terminal_set_encoding(VTE_TERMINAL(vte), "UTF-8");
|
||||||
vf->vte_terminal_set_font_from_string(VTE_TERMINAL(vte), "Monospace 10");
|
vf->vte_terminal_set_mouse_autohide(VTE_TERMINAL(vte), TRUE);
|
||||||
|
vf->vte_terminal_set_word_chars(VTE_TERMINAL(vte), GEANY_WORDCHARS);
|
||||||
|
vte_apply_user_settings();
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(vte), "child-exited", G_CALLBACK(vte_start), NULL);
|
g_signal_connect(G_OBJECT(vte), "child-exited", G_CALLBACK(vte_start), NULL);
|
||||||
|
g_signal_connect(G_OBJECT(vte), "button-press-event", G_CALLBACK(vte_button_pressed), NULL);
|
||||||
g_signal_connect(G_OBJECT(vte), "event", G_CALLBACK(vte_keypress), NULL);
|
g_signal_connect(G_OBJECT(vte), "event", G_CALLBACK(vte_keypress), NULL);
|
||||||
|
|
||||||
vte_start(vte, NULL);
|
vte_start(vte, NULL);
|
||||||
@ -137,22 +141,25 @@ void vte_close(void)
|
|||||||
{
|
{
|
||||||
g_module_close(module);
|
g_module_close(module);
|
||||||
g_free(vf);
|
g_free(vf);
|
||||||
|
g_free(vc->font);
|
||||||
|
g_free(vc->emulation);
|
||||||
|
g_free(vc->color_back);
|
||||||
|
g_free(vc->color_fore);
|
||||||
|
g_free(vc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||||
{
|
{
|
||||||
/* Fixme: GDK_KEY_PRESS doesn't seem to be called for our keys */
|
/// FIXME: GDK_KEY_PRESS doesn't seem to be called for our keys
|
||||||
if (event->type != GDK_KEY_RELEASE)
|
if (event->type != GDK_KEY_RELEASE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* ctrl-c or ctrl-d */
|
|
||||||
if (event->keyval == GDK_c ||
|
if (event->keyval == GDK_c ||
|
||||||
event->keyval == GDK_d ||
|
event->keyval == GDK_d ||
|
||||||
event->keyval == GDK_C ||
|
event->keyval == GDK_C ||
|
||||||
event->keyval == GDK_D)
|
event->keyval == GDK_D)
|
||||||
{
|
{
|
||||||
/* Ctrl pressed */
|
|
||||||
if (event->state & GDK_CONTROL_MASK)
|
if (event->state & GDK_CONTROL_MASK)
|
||||||
{
|
{
|
||||||
kill(pid, SIGINT);
|
kill(pid, SIGINT);
|
||||||
@ -191,6 +198,29 @@ void vte_start(GtkWidget *widget, gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||||
|
{
|
||||||
|
if (event->button == 2)
|
||||||
|
{
|
||||||
|
/* this behaviour(pasting at mouse button 2) seems to be default, but don't know
|
||||||
|
* if it is always the same, so I implement it by myself to be sure and
|
||||||
|
* return TRUE to prevent the default behaviour */
|
||||||
|
vf->vte_terminal_paste_clipboard(VTE_TERMINAL(widget));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
else if (event->button == 3)
|
||||||
|
{
|
||||||
|
if (vf->vte_terminal_get_has_selection(VTE_TERMINAL(widget)))
|
||||||
|
{
|
||||||
|
vf->vte_terminal_copy_clipboard(VTE_TERMINAL(widget));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void vte_register_symbols(GModule *mod)
|
void vte_register_symbols(GModule *mod)
|
||||||
{
|
{
|
||||||
g_module_symbol(mod, "vte_terminal_new", (void*)&vf->vte_terminal_new);
|
g_module_symbol(mod, "vte_terminal_new", (void*)&vf->vte_terminal_new);
|
||||||
@ -207,6 +237,49 @@ void vte_register_symbols(GModule *mod)
|
|||||||
g_module_symbol(mod, "vte_terminal_set_font_from_string", (void*)&vf->vte_terminal_set_font_from_string);
|
g_module_symbol(mod, "vte_terminal_set_font_from_string", (void*)&vf->vte_terminal_set_font_from_string);
|
||||||
g_module_symbol(mod, "vte_terminal_set_scrollback_lines", (void*)&vf->vte_terminal_set_scrollback_lines);
|
g_module_symbol(mod, "vte_terminal_set_scrollback_lines", (void*)&vf->vte_terminal_set_scrollback_lines);
|
||||||
g_module_symbol(mod, "vte_terminal_get_has_selection", (void*)&vf->vte_terminal_get_has_selection);
|
g_module_symbol(mod, "vte_terminal_get_has_selection", (void*)&vf->vte_terminal_get_has_selection);
|
||||||
|
g_module_symbol(mod, "vte_terminal_copy_clipboard", (void*)&vf->vte_terminal_copy_clipboard);
|
||||||
|
g_module_symbol(mod, "vte_terminal_paste_clipboard", (void*)&vf->vte_terminal_paste_clipboard);
|
||||||
|
g_module_symbol(mod, "vte_terminal_set_emulation", (void*)&vf->vte_terminal_set_emulation);
|
||||||
|
g_module_symbol(mod, "vte_terminal_set_color_foreground", (void*)&vf->vte_terminal_set_color_foreground);
|
||||||
|
g_module_symbol(mod, "vte_terminal_set_color_background", (void*)&vf->vte_terminal_set_color_background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void vte_apply_user_settings(void)
|
||||||
|
{
|
||||||
|
vf->vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->vte), vc->scrollback_lines);
|
||||||
|
vf->vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(vc->vte), vc->scroll_on_key);
|
||||||
|
vf->vte_terminal_set_scroll_on_output(VTE_TERMINAL(vc->vte), vc->scroll_on_out);
|
||||||
|
vf->vte_terminal_set_emulation(VTE_TERMINAL(vc->vte), vc->emulation);
|
||||||
|
vf->vte_terminal_set_font_from_string(VTE_TERMINAL(vc->vte), vc->font);
|
||||||
|
|
||||||
|
vf->vte_terminal_reset(VTE_TERMINAL(vc->vte), TRUE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void vte_get_settings(void)
|
||||||
|
{
|
||||||
|
gchar **values = g_strsplit(app->terminal_settings, ";", 7);
|
||||||
|
|
||||||
|
if (g_strv_length(values) != 7) return;
|
||||||
|
vc->font = g_strdup(values[0]);
|
||||||
|
//vc->color_fore = utils_get_color_from_bint(strtod(values[1], NULL));
|
||||||
|
//vc->color_back = utils_get_color_from_bint(strtod(values[2], NULL));
|
||||||
|
vc->color_fore = g_new(GdkColor, 1);
|
||||||
|
vc->color_back = g_new(GdkColor, 1);
|
||||||
|
gdk_color_parse(values[1], vc->color_fore);
|
||||||
|
gdk_color_parse(values[2], vc->color_back);
|
||||||
|
|
||||||
|
vc->scrollback_lines = strtod(values[3], NULL);
|
||||||
|
if ((vc->scrollback_lines < 0) || (vc->scrollback_lines > 5000)) vc->scrollback_lines = 500;
|
||||||
|
|
||||||
|
vc->emulation = g_strdup(values[4]);
|
||||||
|
|
||||||
|
vc->scroll_on_key = utils_atob(values[5]);
|
||||||
|
vc->scroll_on_out = utils_atob(values[6]);
|
||||||
|
|
||||||
|
g_strfreev(values);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
27
src/vte.h
27
src/vte.h
@ -37,6 +37,11 @@ void vte_register_symbols(GModule *module);
|
|||||||
|
|
||||||
void vte_close(void);
|
void vte_close(void);
|
||||||
|
|
||||||
|
gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
|
||||||
|
|
||||||
|
void vte_apply_user_settings(void);
|
||||||
|
|
||||||
|
void vte_get_settings(void);
|
||||||
|
|
||||||
|
|
||||||
/* taken from original vte.h to make my life easier ;-) */
|
/* taken from original vte.h to make my life easier ;-) */
|
||||||
@ -51,12 +56,25 @@ struct _VteTerminal
|
|||||||
glong char_width, char_height;
|
glong char_width, char_height;
|
||||||
glong char_ascent, char_descent;
|
glong char_ascent, char_descent;
|
||||||
glong row_count, column_count;
|
glong row_count, column_count;
|
||||||
char *window_title;
|
gchar *window_title;
|
||||||
char *icon_title;
|
gchar *icon_title;
|
||||||
VteTerminalPrivate *pvt;
|
VteTerminalPrivate *pvt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct vte_conf
|
||||||
|
{
|
||||||
|
GtkWidget *vte; // small hack, to have always a reference to the widget
|
||||||
|
gboolean scroll_on_key;
|
||||||
|
gboolean scroll_on_out;
|
||||||
|
gint scrollback_lines;
|
||||||
|
gchar *emulation;
|
||||||
|
gchar *font;
|
||||||
|
GdkColor *color_fore;
|
||||||
|
GdkColor *color_back;
|
||||||
|
};
|
||||||
|
struct vte_conf *vc;
|
||||||
|
|
||||||
|
|
||||||
/* store function pointers in a struct to avoid a strange segfault if they are stored directly
|
/* store function pointers in a struct to avoid a strange segfault if they are stored directly
|
||||||
* if accessed directly, gdb says the segfault arrives at old_tab_width(prefs.c), don't ask me */
|
* if accessed directly, gdb says the segfault arrives at old_tab_width(prefs.c), don't ask me */
|
||||||
@ -78,6 +96,11 @@ struct vte_funcs
|
|||||||
void (*vte_terminal_set_font_from_string) (VteTerminal *terminal, const char *name);
|
void (*vte_terminal_set_font_from_string) (VteTerminal *terminal, const char *name);
|
||||||
void (*vte_terminal_set_scrollback_lines) (VteTerminal *terminal, glong lines);
|
void (*vte_terminal_set_scrollback_lines) (VteTerminal *terminal, glong lines);
|
||||||
gboolean (*vte_terminal_get_has_selection) (VteTerminal *terminal);
|
gboolean (*vte_terminal_get_has_selection) (VteTerminal *terminal);
|
||||||
|
void (*vte_terminal_copy_clipboard) (VteTerminal *terminal);
|
||||||
|
void (*vte_terminal_paste_clipboard) (VteTerminal *terminal);
|
||||||
|
void (*vte_terminal_set_emulation) (VteTerminal *terminal, const gchar *emulation);
|
||||||
|
void (*vte_terminal_set_color_foreground) (VteTerminal *terminal, const GdkColor *background);
|
||||||
|
void (*vte_terminal_set_color_background) (VteTerminal *terminal, const GdkColor *background);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user