Add basic Line Breaking option in the Document menu. Line breaking
only works when typing characters past the line breaking column number. Add 'Line breaking column' editor pref. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2562 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
a260b25515
commit
d131023fe7
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2008-05-09 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
||||
* src/interface.c, src/prefs.c, src/callbacks.c, src/callbacks.h,
|
||||
src/keyfile.c, src/document.c, src/document.h, src/editor.c,
|
||||
src/editor.h, src/ui_utils.c, geany.glade, TODO, doc/geany.txt,
|
||||
doc/geany.html:
|
||||
Add basic Line Breaking option in the Document menu. Line breaking
|
||||
only works when typing characters past the line breaking column
|
||||
number.
|
||||
Add 'Line breaking column' editor pref.
|
||||
|
||||
|
||||
2008-05-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
||||
* src/filetypes.c:
|
||||
|
1
TODO
1
TODO
@ -19,7 +19,6 @@ Note: features included in brackets have lower priority.
|
||||
o project indentation settings support
|
||||
o improve Compile toolbar button for Make (drop down radio list?)
|
||||
o (selectable menu of arguments to use for Make, from Make Custom)
|
||||
o (line breaking mode to limit words on a line for e.g. XML content)
|
||||
o (DBUS)
|
||||
o (indent wrapped lines - Scintilla issue)
|
||||
o (folder tree in the sidebar)
|
||||
|
@ -3,10 +3,10 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
|
||||
<title>Geany</title>
|
||||
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
|
||||
<meta name="date" content="2008-04-23" />
|
||||
<meta name="date" content="2008-05-06" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
@ -133,7 +133,7 @@ dt {
|
||||
<br />Nick Treleaven
|
||||
<br />Frank Lanitz</td></tr>
|
||||
<tr><th class="docinfo-name">Date:</th>
|
||||
<td>2008-04-23</td></tr>
|
||||
<td>2008-05-06</td></tr>
|
||||
<tr><th class="docinfo-name">Version:</th>
|
||||
<td>0.15</td></tr>
|
||||
</tbody>
|
||||
@ -1650,7 +1650,7 @@ is present.</dd>
|
||||
<div class="section">
|
||||
<h4><a class="toc-backref" href="#id80" id="long-line-marker" name="long-line-marker">Long line marker</a></h4>
|
||||
<p>The long line marker helps to indicate overly-long lines, or as a hint
|
||||
for when to break the line.</p>
|
||||
to the user for when to break the line.</p>
|
||||
<dl class="docutils">
|
||||
<dt>Type</dt>
|
||||
<dd><dl class="first last docutils">
|
||||
@ -1705,13 +1705,7 @@ the end of the line such as <tt class="docutils literal"><span class="pre">{</sp
|
||||
<h4><a class="toc-backref" href="#id83" id="features" name="features">Features</a></h4>
|
||||
<dl class="docutils">
|
||||
<dt>Line wrapping</dt>
|
||||
<dd><p class="first">Show long lines wrapped around to new display lines.</p>
|
||||
<div class="last note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">Currently, there is no setting to have Geany automatically insert
|
||||
newlines into your document while you type.</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dd>Show long lines wrapped around to new display lines.</dd>
|
||||
<dt>Enable "smart" home key</dt>
|
||||
<dd>Whether to move the cursor to the first non-whitespace character
|
||||
on the line when you hit the home key on your keyboard. Pressing it
|
||||
@ -1730,6 +1724,9 @@ them in the editor area.</dd>
|
||||
<dt>Newline strip trailing spaces</dt>
|
||||
<dd>Remove any white space at the end of the line when you hit the
|
||||
Enter/Return key.</dd>
|
||||
<dt>Line breaking column</dt>
|
||||
<dd>The editor column number to insert a newline at when Line Breaking
|
||||
is enabled for the current document.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section">
|
||||
@ -4062,7 +4059,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
|
||||
<div class="footer">
|
||||
<hr class="footer" />
|
||||
<a class="reference" href="geany.txt">View document source</a>.
|
||||
Generated on: 2008-05-06 12:42 UTC.
|
||||
Generated on: 2008-05-09 12:12 UTC.
|
||||
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
|
||||
|
||||
</div>
|
||||
|
@ -1436,7 +1436,7 @@ Long line marker
|
||||
````````````````
|
||||
|
||||
The long line marker helps to indicate overly-long lines, or as a hint
|
||||
for when to break the line.
|
||||
to the user for when to break the line.
|
||||
|
||||
Type
|
||||
Line
|
||||
@ -1492,10 +1492,6 @@ Features
|
||||
Line wrapping
|
||||
Show long lines wrapped around to new display lines.
|
||||
|
||||
.. note::
|
||||
Currently, there is no setting to have Geany automatically insert
|
||||
newlines into your document while you type.
|
||||
|
||||
Enable "smart" home key
|
||||
Whether to move the cursor to the first non-whitespace character
|
||||
on the line when you hit the home key on your keyboard. Pressing it
|
||||
@ -1520,6 +1516,10 @@ Newline strip trailing spaces
|
||||
Remove any white space at the end of the line when you hit the
|
||||
Enter/Return key.
|
||||
|
||||
Line breaking column
|
||||
The editor column number to insert a newline at when Line Breaking
|
||||
is enabled for the current document.
|
||||
|
||||
Completions
|
||||
```````````
|
||||
|
||||
|
103
geany.glade
103
geany.glade
@ -58,7 +58,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2333">
|
||||
<widget class="GtkImage" id="image2350">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-new</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -148,7 +148,7 @@
|
||||
<signal name="activate" handler="on_save_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2334">
|
||||
<widget class="GtkImage" id="image2351">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-save</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -169,7 +169,7 @@
|
||||
<signal name="activate" handler="on_toolbutton23_clicked" last_modification_time="Mon, 24 Jul 2006 19:26:04 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2335">
|
||||
<widget class="GtkImage" id="image2352">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-revert-to-saved</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -189,7 +189,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2336">
|
||||
<widget class="GtkImage" id="image2353">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-revert-to-saved</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -278,7 +278,7 @@
|
||||
<signal name="activate" handler="on_close_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2337">
|
||||
<widget class="GtkImage" id="image2354">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-close</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -477,7 +477,7 @@
|
||||
<signal name="activate" handler="on_menu_increase_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2338">
|
||||
<widget class="GtkImage" id="image2355">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-indent</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -498,7 +498,7 @@
|
||||
<signal name="activate" handler="on_menu_decrease_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2339">
|
||||
<widget class="GtkImage" id="image2356">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-unindent</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -554,7 +554,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2340">
|
||||
<widget class="GtkImage" id="image2357">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -639,7 +639,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2341">
|
||||
<widget class="GtkImage" id="image2358">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -671,7 +671,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2342">
|
||||
<widget class="GtkImage" id="image2359">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -768,7 +768,7 @@
|
||||
<signal name="activate" handler="on_replace1_activate" last_modification_time="Sun, 23 Oct 2005 13:22:36 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2343">
|
||||
<widget class="GtkImage" id="image2360">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-find-and-replace</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -834,7 +834,7 @@
|
||||
<signal name="activate" handler="on_go_to_line1_activate" last_modification_time="Tue, 23 May 2006 17:10:49 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2344">
|
||||
<widget class="GtkImage" id="image2361">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-jump-to</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -869,7 +869,7 @@
|
||||
<signal name="activate" handler="on_change_font1_activate" last_modification_time="Fri, 22 Apr 2005 18:58:45 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2345">
|
||||
<widget class="GtkImage" id="image2362">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-select-font</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1018,6 +1018,16 @@
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="line_breaking1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Line _Breaking</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<signal name="toggled" handler="on_line_breaking1_activate" last_modification_time="Thu, 08 May 2008 16:46:17 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="menu_use_auto_indentation1">
|
||||
<property name="visible">True</property>
|
||||
@ -1278,7 +1288,7 @@
|
||||
<signal name="activate" handler="on_project_new1_activate" last_modification_time="Thu, 18 Jan 2007 22:16:24 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2346">
|
||||
<widget class="GtkImage" id="image2363">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-new</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1299,7 +1309,7 @@
|
||||
<signal name="activate" handler="on_project_open1_activate" last_modification_time="Mon, 15 Jan 2007 17:34:17 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2347">
|
||||
<widget class="GtkImage" id="image2364">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-open</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1320,7 +1330,7 @@
|
||||
<signal name="activate" handler="on_project_close1_activate" last_modification_time="Mon, 15 Jan 2007 17:34:17 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2348">
|
||||
<widget class="GtkImage" id="image2365">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-close</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1379,7 +1389,7 @@
|
||||
<signal name="activate" handler="on_show_color_chooser1_activate" last_modification_time="Wed, 22 Jun 2005 18:10:21 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2349">
|
||||
<widget class="GtkImage" id="image2366">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-select-color</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1433,7 +1443,7 @@
|
||||
<signal name="activate" handler="on_help1_activate" last_modification_time="Sun, 24 Jul 2005 15:23:11 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2350">
|
||||
<widget class="GtkImage" id="image2367">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-help</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -6143,6 +6153,63 @@ Match braces</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox11">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">12</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label209">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Line breaking column:</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="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="spin_line_break">
|
||||
<property name="visible">True</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">False</property>
|
||||
<property name="adjustment">72 3 1000 1 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -2105,3 +2105,19 @@ on_escape_key_press_event (GtkWidget *widget,
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
on_line_breaking1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
document *doc;
|
||||
|
||||
if (app->ignore_callback)
|
||||
return;
|
||||
|
||||
doc = document_get_current();
|
||||
g_return_if_fail(doc);
|
||||
|
||||
doc->line_breaking = !doc->line_breaking;
|
||||
}
|
||||
|
@ -593,3 +593,8 @@ gboolean
|
||||
on_escape_key_press_event (GtkWidget *widget,
|
||||
GdkEventKey *event,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_line_breaking1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
|
@ -351,6 +351,7 @@ static void init_doc_struct(document *new_doc)
|
||||
new_doc->undo_actions = NULL;
|
||||
new_doc->redo_actions = NULL;
|
||||
new_doc->scroll_percent = -1.0F;
|
||||
new_doc->line_breaking = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,6 +100,7 @@ typedef struct document
|
||||
FileEncoding saved_encoding;
|
||||
/** %Document-specific tab setting. */
|
||||
gboolean use_tabs;
|
||||
gboolean line_breaking; /**< Whether to split long lines as you type. */
|
||||
} document;
|
||||
|
||||
|
||||
|
45
src/editor.c
45
src/editor.c
@ -31,6 +31,8 @@
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include "SciLexer.h"
|
||||
#include "geany.h"
|
||||
|
||||
@ -206,6 +208,48 @@ static void on_update_ui(gint idx, G_GNUC_UNUSED SCNotification *nt)
|
||||
}
|
||||
|
||||
|
||||
static void check_line_breaking(gint idx, gint pos, gchar c)
|
||||
{
|
||||
document *doc = &doc_list[idx];
|
||||
ScintillaObject *sci = doc->sci;
|
||||
gint line, lstart;
|
||||
|
||||
if (!doc->line_breaking)
|
||||
return;
|
||||
|
||||
if (c == GDK_space)
|
||||
pos--; /* Use previous space, not new one */
|
||||
else
|
||||
if (strchr(GEANY_WORDCHARS, c) == NULL)
|
||||
return;
|
||||
|
||||
line = sci_get_current_line(sci);
|
||||
lstart = sci_get_position_from_line(sci, line);
|
||||
|
||||
if (pos - lstart < editor_prefs.line_break_column)
|
||||
return;
|
||||
|
||||
/* look for the last space before editor_prefs.line_break_column */
|
||||
pos = MIN(pos, lstart + editor_prefs.line_break_column);
|
||||
|
||||
while (pos > lstart)
|
||||
{
|
||||
c = sci_get_char_at(sci, --pos);
|
||||
if (c == GDK_space)
|
||||
{
|
||||
gint indent_size = sci_get_line_indentation(sci, line);
|
||||
|
||||
/* break the line after the space */
|
||||
sci_insert_text(sci, pos + 1, utils_get_eol_char(idx));
|
||||
|
||||
if (doc->auto_indent)
|
||||
sci_set_line_indentation(sci, line + 1, indent_size);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void on_char_added(gint idx, SCNotification *nt)
|
||||
{
|
||||
ScintillaObject *sci = doc_list[idx].sci;
|
||||
@ -264,6 +308,7 @@ static void on_char_added(gint idx, SCNotification *nt)
|
||||
}
|
||||
default: editor_start_auto_complete(idx, pos, FALSE);
|
||||
}
|
||||
check_line_breaking(idx, pos, nt->ch);
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,6 +83,7 @@ typedef struct EditorPrefs
|
||||
gboolean use_gtk_word_boundaries; /* hidden pref */
|
||||
gboolean complete_snippets_whilst_editing; /* hidden pref */
|
||||
gboolean detect_tab_mode;
|
||||
gint line_break_column;
|
||||
} EditorPrefs;
|
||||
|
||||
extern EditorPrefs editor_prefs;
|
||||
|
210
src/interface.c
210
src/interface.c
@ -37,7 +37,7 @@ create_window1 (void)
|
||||
GtkWidget *file1_menu;
|
||||
GtkWidget *menu_new1;
|
||||
GtkWidget *menu_new_with_template1;
|
||||
GtkWidget *image2333;
|
||||
GtkWidget *image2350;
|
||||
GtkWidget *menu_new_with_template1_menu;
|
||||
GtkWidget *invisible2;
|
||||
GtkWidget *separator12;
|
||||
@ -48,11 +48,11 @@ create_window1 (void)
|
||||
GtkWidget *menu_save1;
|
||||
GtkWidget *menu_save_as1;
|
||||
GtkWidget *menu_save_all1;
|
||||
GtkWidget *image2334;
|
||||
GtkWidget *image2351;
|
||||
GtkWidget *menu_reload1;
|
||||
GtkWidget *image2335;
|
||||
GtkWidget *image2352;
|
||||
GtkWidget *menu_reload_as1;
|
||||
GtkWidget *image2336;
|
||||
GtkWidget *image2353;
|
||||
GtkWidget *menu_reload_as1_menu;
|
||||
GtkWidget *invisible7;
|
||||
GtkWidget *separator21;
|
||||
@ -63,7 +63,7 @@ create_window1 (void)
|
||||
GtkWidget *separator14;
|
||||
GtkWidget *menu_close1;
|
||||
GtkWidget *menu_close_all1;
|
||||
GtkWidget *image2337;
|
||||
GtkWidget *image2354;
|
||||
GtkWidget *menu_separatormenuitem1;
|
||||
GtkWidget *menu_quit1;
|
||||
GtkWidget *edit1;
|
||||
@ -88,16 +88,16 @@ create_window1 (void)
|
||||
GtkWidget *menu_duplicate_line1;
|
||||
GtkWidget *separator29;
|
||||
GtkWidget *menu_increase_indent1;
|
||||
GtkWidget *image2338;
|
||||
GtkWidget *image2355;
|
||||
GtkWidget *menu_decrease_indent1;
|
||||
GtkWidget *image2339;
|
||||
GtkWidget *image2356;
|
||||
GtkWidget *separator37;
|
||||
GtkWidget *send_selection_to2;
|
||||
GtkWidget *send_selection_to2_menu;
|
||||
GtkWidget *invisible13;
|
||||
GtkWidget *separator18;
|
||||
GtkWidget *add_comments1;
|
||||
GtkWidget *image2340;
|
||||
GtkWidget *image2357;
|
||||
GtkWidget *add_comments1_menu;
|
||||
GtkWidget *menu_add_changelog_entry1;
|
||||
GtkWidget *insert_file_header1;
|
||||
@ -106,11 +106,11 @@ create_window1 (void)
|
||||
GtkWidget *insert_gpl_notice2;
|
||||
GtkWidget *insert_bsd_license_notice2;
|
||||
GtkWidget *insert_date1;
|
||||
GtkWidget *image2341;
|
||||
GtkWidget *image2358;
|
||||
GtkWidget *insert_date1_menu;
|
||||
GtkWidget *invisible8;
|
||||
GtkWidget *insert_include2;
|
||||
GtkWidget *image2342;
|
||||
GtkWidget *image2359;
|
||||
GtkWidget *insert_include2_menu;
|
||||
GtkWidget *invisible4;
|
||||
GtkWidget *separator9;
|
||||
@ -122,7 +122,7 @@ create_window1 (void)
|
||||
GtkWidget *find_previous1;
|
||||
GtkWidget *find_in_files1;
|
||||
GtkWidget *replace1;
|
||||
GtkWidget *image2343;
|
||||
GtkWidget *image2360;
|
||||
GtkWidget *separator33;
|
||||
GtkWidget *find_nextsel1;
|
||||
GtkWidget *find_prevsel1;
|
||||
@ -130,11 +130,11 @@ create_window1 (void)
|
||||
GtkWidget *next_message1;
|
||||
GtkWidget *separator32;
|
||||
GtkWidget *go_to_line1;
|
||||
GtkWidget *image2344;
|
||||
GtkWidget *image2361;
|
||||
GtkWidget *menu_view1;
|
||||
GtkWidget *menu_view1_menu;
|
||||
GtkWidget *menu_change_font1;
|
||||
GtkWidget *image2345;
|
||||
GtkWidget *image2362;
|
||||
GtkWidget *menu_separator4;
|
||||
GtkWidget *menu_toggle_all_additional_widgets1;
|
||||
GtkWidget *menu_fullscreen1;
|
||||
@ -150,6 +150,7 @@ create_window1 (void)
|
||||
GtkWidget *menu_document1;
|
||||
GtkWidget *menu_document1_menu;
|
||||
GtkWidget *menu_line_breaking1;
|
||||
GtkWidget *line_breaking1;
|
||||
GtkWidget *menu_use_auto_indentation1;
|
||||
GtkWidget *indent_type1;
|
||||
GtkWidget *indent_type1_menu;
|
||||
@ -184,24 +185,24 @@ create_window1 (void)
|
||||
GtkWidget *menu_project1;
|
||||
GtkWidget *menu_project1_menu;
|
||||
GtkWidget *project_new1;
|
||||
GtkWidget *image2346;
|
||||
GtkWidget *image2363;
|
||||
GtkWidget *project_open1;
|
||||
GtkWidget *image2347;
|
||||
GtkWidget *image2364;
|
||||
GtkWidget *project_close1;
|
||||
GtkWidget *image2348;
|
||||
GtkWidget *image2365;
|
||||
GtkWidget *separator34;
|
||||
GtkWidget *project_properties1;
|
||||
GtkWidget *menu_build1;
|
||||
GtkWidget *tools1;
|
||||
GtkWidget *tools1_menu;
|
||||
GtkWidget *menu_choose_color1;
|
||||
GtkWidget *image2349;
|
||||
GtkWidget *image2366;
|
||||
GtkWidget *menu_count_words1;
|
||||
GtkWidget *load_tags1;
|
||||
GtkWidget *menu_help1;
|
||||
GtkWidget *menu_help1_menu;
|
||||
GtkWidget *help1;
|
||||
GtkWidget *image2350;
|
||||
GtkWidget *image2367;
|
||||
GtkWidget *keyboard_shortcuts1;
|
||||
GtkWidget *website1;
|
||||
GtkWidget *separator16;
|
||||
@ -304,9 +305,9 @@ create_window1 (void)
|
||||
gtk_widget_show (menu_new_with_template1);
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), menu_new_with_template1);
|
||||
|
||||
image2333 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2333);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2333);
|
||||
image2350 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2350);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2350);
|
||||
|
||||
menu_new_with_template1_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_new_with_template1), menu_new_with_template1_menu);
|
||||
@ -349,25 +350,25 @@ create_window1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), menu_save_all1);
|
||||
gtk_tooltips_set_tip (tooltips, menu_save_all1, _("Saves all open files"), NULL);
|
||||
|
||||
image2334 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2334);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2334);
|
||||
image2351 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2351);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2351);
|
||||
|
||||
menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload"));
|
||||
gtk_widget_show (menu_reload1);
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload1);
|
||||
|
||||
image2335 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2335);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2335);
|
||||
image2352 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2352);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2352);
|
||||
|
||||
menu_reload_as1 = gtk_image_menu_item_new_with_mnemonic (_("R_eload As"));
|
||||
gtk_widget_show (menu_reload_as1);
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload_as1);
|
||||
|
||||
image2336 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2336);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2336);
|
||||
image2353 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2353);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2353);
|
||||
|
||||
menu_reload_as1_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu);
|
||||
@ -412,9 +413,9 @@ create_window1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), menu_close_all1);
|
||||
gtk_tooltips_set_tip (tooltips, menu_close_all1, _("Closes all open files"), NULL);
|
||||
|
||||
image2337 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2337);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2337);
|
||||
image2354 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2354);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2354);
|
||||
|
||||
menu_separatormenuitem1 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (menu_separatormenuitem1);
|
||||
@ -518,17 +519,17 @@ create_window1 (void)
|
||||
gtk_widget_show (menu_increase_indent1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1);
|
||||
|
||||
image2338 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2338);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2338);
|
||||
image2355 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2355);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2355);
|
||||
|
||||
menu_decrease_indent1 = gtk_image_menu_item_new_with_mnemonic (_("_Decrease Indent"));
|
||||
gtk_widget_show (menu_decrease_indent1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_decrease_indent1);
|
||||
|
||||
image2339 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2339);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2339);
|
||||
image2356 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2356);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2356);
|
||||
|
||||
separator37 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (separator37);
|
||||
@ -554,9 +555,9 @@ create_window1 (void)
|
||||
gtk_widget_show (add_comments1);
|
||||
gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1);
|
||||
|
||||
image2340 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2340);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2340);
|
||||
image2357 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2357);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2357);
|
||||
|
||||
add_comments1_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu);
|
||||
@ -595,9 +596,9 @@ create_window1 (void)
|
||||
gtk_widget_show (insert_date1);
|
||||
gtk_container_add (GTK_CONTAINER (edit1_menu), insert_date1);
|
||||
|
||||
image2341 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2341);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2341);
|
||||
image2358 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2358);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2358);
|
||||
|
||||
insert_date1_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date1), insert_date1_menu);
|
||||
@ -609,9 +610,9 @@ create_window1 (void)
|
||||
gtk_widget_show (insert_include2);
|
||||
gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2);
|
||||
|
||||
image2342 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2342);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2342);
|
||||
image2359 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2359);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2359);
|
||||
|
||||
insert_include2_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu);
|
||||
@ -655,9 +656,9 @@ create_window1 (void)
|
||||
gtk_widget_show (replace1);
|
||||
gtk_container_add (GTK_CONTAINER (search1_menu), replace1);
|
||||
|
||||
image2343 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2343);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2343);
|
||||
image2360 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2360);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2360);
|
||||
|
||||
separator33 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (separator33);
|
||||
@ -690,9 +691,9 @@ create_window1 (void)
|
||||
gtk_widget_show (go_to_line1);
|
||||
gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1);
|
||||
|
||||
image2344 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2344);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2344);
|
||||
image2361 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2361);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2361);
|
||||
|
||||
menu_view1 = gtk_menu_item_new_with_mnemonic (_("_View"));
|
||||
gtk_widget_show (menu_view1);
|
||||
@ -706,9 +707,9 @@ create_window1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (menu_view1_menu), menu_change_font1);
|
||||
gtk_tooltips_set_tip (tooltips, menu_change_font1, _("Change the default font"), NULL);
|
||||
|
||||
image2345 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2345);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2345);
|
||||
image2362 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2362);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2362);
|
||||
|
||||
menu_separator4 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (menu_separator4);
|
||||
@ -782,6 +783,10 @@ create_window1 (void)
|
||||
gtk_tooltips_set_tip (tooltips, menu_line_breaking1, _("Wrap the line at the window border and continue it on the next line. Note: line wrapping has a high performance cost for large documents so should be disabled on slow machines."), NULL);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_line_breaking1), TRUE);
|
||||
|
||||
line_breaking1 = gtk_check_menu_item_new_with_mnemonic (_("Line _Breaking"));
|
||||
gtk_widget_show (line_breaking1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_document1_menu), line_breaking1);
|
||||
|
||||
menu_use_auto_indentation1 = gtk_check_menu_item_new_with_mnemonic (_("_Auto-indentation"));
|
||||
gtk_widget_show (menu_use_auto_indentation1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_document1_menu), menu_use_auto_indentation1);
|
||||
@ -924,25 +929,25 @@ create_window1 (void)
|
||||
gtk_widget_show (project_new1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_new1);
|
||||
|
||||
image2346 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2346);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2346);
|
||||
image2363 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2363);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2363);
|
||||
|
||||
project_open1 = gtk_image_menu_item_new_with_mnemonic (_("_Open"));
|
||||
gtk_widget_show (project_open1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_open1);
|
||||
|
||||
image2347 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2347);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2347);
|
||||
image2364 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2364);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2364);
|
||||
|
||||
project_close1 = gtk_image_menu_item_new_with_mnemonic (_("_Close"));
|
||||
gtk_widget_show (project_close1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_close1);
|
||||
|
||||
image2348 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2348);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2348);
|
||||
image2365 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2365);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2365);
|
||||
|
||||
separator34 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (separator34);
|
||||
@ -969,9 +974,9 @@ create_window1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (tools1_menu), menu_choose_color1);
|
||||
gtk_tooltips_set_tip (tooltips, menu_choose_color1, _("Open a color chooser dialog, to interactively pick colors from a palette."), NULL);
|
||||
|
||||
image2349 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2349);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2349);
|
||||
image2366 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2366);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2366);
|
||||
|
||||
menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count"));
|
||||
gtk_widget_show (menu_count_words1);
|
||||
@ -994,9 +999,9 @@ create_window1 (void)
|
||||
gtk_widget_show (help1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_help1_menu), help1);
|
||||
|
||||
image2350 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2350);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2350);
|
||||
image2367 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2367);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2367);
|
||||
|
||||
keyboard_shortcuts1 = gtk_menu_item_new_with_mnemonic (_("_Keyboard Shortcuts"));
|
||||
gtk_widget_show (keyboard_shortcuts1);
|
||||
@ -1498,6 +1503,9 @@ create_window1 (void)
|
||||
g_signal_connect ((gpointer) menu_line_breaking1, "toggled",
|
||||
G_CALLBACK (on_line_breaking1_toggled),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) line_breaking1, "toggled",
|
||||
G_CALLBACK (on_line_breaking1_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_use_auto_indentation1, "toggled",
|
||||
G_CALLBACK (on_use_auto_indentation1_toggled),
|
||||
NULL);
|
||||
@ -1679,7 +1687,7 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, file1_menu, "file1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_new1, "menu_new1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1, "menu_new_with_template1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2333, "image2333");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2350, "image2350");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1_menu, "menu_new_with_template1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, invisible2, "invisible2");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator12, "separator12");
|
||||
@ -1690,11 +1698,11 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_save1, "menu_save1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_save_as1, "menu_save_as1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_save_all1, "menu_save_all1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2334, "image2334");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2351, "image2351");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2335, "image2335");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2352, "image2352");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2336, "image2336");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2353, "image2353");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator21, "separator21");
|
||||
@ -1705,7 +1713,7 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, separator14, "separator14");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_close1, "menu_close1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2337, "image2337");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2354, "image2354");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1");
|
||||
GLADE_HOOKUP_OBJECT (window1, edit1, "edit1");
|
||||
@ -1730,16 +1738,16 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_duplicate_line1, "menu_duplicate_line1");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator29, "separator29");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_increase_indent1, "menu_increase_indent1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2338, "image2338");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2355, "image2355");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2339, "image2339");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2356, "image2356");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator37, "separator37");
|
||||
GLADE_HOOKUP_OBJECT (window1, send_selection_to2, "send_selection_to2");
|
||||
GLADE_HOOKUP_OBJECT (window1, send_selection_to2_menu, "send_selection_to2_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, invisible13, "invisible13");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator18, "separator18");
|
||||
GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2340, "image2340");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2357, "image2357");
|
||||
GLADE_HOOKUP_OBJECT (window1, add_comments1_menu, "add_comments1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_add_changelog_entry1, "menu_add_changelog_entry1");
|
||||
GLADE_HOOKUP_OBJECT (window1, insert_file_header1, "insert_file_header1");
|
||||
@ -1748,11 +1756,11 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, insert_gpl_notice2, "insert_gpl_notice2");
|
||||
GLADE_HOOKUP_OBJECT (window1, insert_bsd_license_notice2, "insert_bsd_license_notice2");
|
||||
GLADE_HOOKUP_OBJECT (window1, insert_date1, "insert_date1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2341, "image2341");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2358, "image2358");
|
||||
GLADE_HOOKUP_OBJECT (window1, insert_date1_menu, "insert_date1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, invisible8, "invisible8");
|
||||
GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2342, "image2342");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2359, "image2359");
|
||||
GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator9, "separator9");
|
||||
@ -1764,7 +1772,7 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1");
|
||||
GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1");
|
||||
GLADE_HOOKUP_OBJECT (window1, replace1, "replace1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2343, "image2343");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2360, "image2360");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator33, "separator33");
|
||||
GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1");
|
||||
GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1");
|
||||
@ -1772,11 +1780,11 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, next_message1, "next_message1");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator32, "separator32");
|
||||
GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2344, "image2344");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2361, "image2361");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_view1, "menu_view1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_view1_menu, "menu_view1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_change_font1, "menu_change_font1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2345, "image2345");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2362, "image2362");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_toggle_all_additional_widgets1, "menu_toggle_all_additional_widgets1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1");
|
||||
@ -1792,6 +1800,7 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_document1, "menu_document1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_document1_menu, "menu_document1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_line_breaking1, "menu_line_breaking1");
|
||||
GLADE_HOOKUP_OBJECT (window1, line_breaking1, "line_breaking1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_use_auto_indentation1, "menu_use_auto_indentation1");
|
||||
GLADE_HOOKUP_OBJECT (window1, indent_type1, "indent_type1");
|
||||
GLADE_HOOKUP_OBJECT (window1, indent_type1_menu, "indent_type1_menu");
|
||||
@ -1824,24 +1833,24 @@ create_window1 (void)
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_project1, "menu_project1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_project1_menu, "menu_project1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, project_new1, "project_new1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2346, "image2346");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2363, "image2363");
|
||||
GLADE_HOOKUP_OBJECT (window1, project_open1, "project_open1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2347, "image2347");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2364, "image2364");
|
||||
GLADE_HOOKUP_OBJECT (window1, project_close1, "project_close1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2348, "image2348");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2365, "image2365");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator34, "separator34");
|
||||
GLADE_HOOKUP_OBJECT (window1, project_properties1, "project_properties1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_build1, "menu_build1");
|
||||
GLADE_HOOKUP_OBJECT (window1, tools1, "tools1");
|
||||
GLADE_HOOKUP_OBJECT (window1, tools1_menu, "tools1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2349, "image2349");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2366, "image2366");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_count_words1, "menu_count_words1");
|
||||
GLADE_HOOKUP_OBJECT (window1, load_tags1, "load_tags1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_help1, "menu_help1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_help1_menu, "menu_help1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, help1, "help1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2350, "image2350");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2367, "image2367");
|
||||
GLADE_HOOKUP_OBJECT (window1, keyboard_shortcuts1, "keyboard_shortcuts1");
|
||||
GLADE_HOOKUP_OBJECT (window1, website1, "website1");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator16, "separator16");
|
||||
@ -2638,6 +2647,10 @@ create_prefs_dialog (void)
|
||||
GtkWidget *check_unfold_children;
|
||||
GtkWidget *check_indicators;
|
||||
GtkWidget *check_newline_strip;
|
||||
GtkWidget *hbox11;
|
||||
GtkWidget *label209;
|
||||
GtkObject *spin_line_break_adj;
|
||||
GtkWidget *spin_line_break;
|
||||
GtkWidget *label172;
|
||||
GtkWidget *frame18;
|
||||
GtkWidget *alignment21;
|
||||
@ -3761,6 +3774,20 @@ create_prefs_dialog (void)
|
||||
gtk_tooltips_set_tip (tooltips, check_newline_strip, _("Enable newline to strip the trailing spaces on the previous line."), NULL);
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_newline_strip), FALSE);
|
||||
|
||||
hbox11 = gtk_hbox_new (FALSE, 12);
|
||||
gtk_widget_show (hbox11);
|
||||
gtk_box_pack_start (GTK_BOX (vbox17), hbox11, TRUE, TRUE, 0);
|
||||
|
||||
label209 = gtk_label_new (_("Line breaking column:"));
|
||||
gtk_widget_show (label209);
|
||||
gtk_box_pack_start (GTK_BOX (hbox11), label209, FALSE, FALSE, 0);
|
||||
|
||||
spin_line_break_adj = gtk_adjustment_new (72, 3, 1000, 1, 10, 10);
|
||||
spin_line_break = gtk_spin_button_new (GTK_ADJUSTMENT (spin_line_break_adj), 1, 0);
|
||||
gtk_widget_show (spin_line_break);
|
||||
gtk_box_pack_start (GTK_BOX (hbox11), spin_line_break, FALSE, TRUE, 0);
|
||||
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_line_break), TRUE);
|
||||
|
||||
label172 = gtk_label_new (_("<b>Features</b>"));
|
||||
gtk_widget_show (label172);
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame14), label172);
|
||||
@ -4652,6 +4679,9 @@ create_prefs_dialog (void)
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_unfold_children, "check_unfold_children");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_indicators, "check_indicators");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_newline_strip, "check_newline_strip");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, hbox11, "hbox11");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label209, "label209");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, spin_line_break, "spin_line_break");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label172, "label172");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, frame18, "frame18");
|
||||
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment21, "alignment21");
|
||||
|
@ -240,6 +240,7 @@ static void save_dialog_prefs(GKeyFile *config)
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_disable_dnd", editor_prefs.disable_dnd);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_smart_home_key", editor_prefs.smart_home_key);
|
||||
g_key_file_set_boolean(config, PACKAGE, "pref_editor_newline_strip", editor_prefs.newline_strip);
|
||||
g_key_file_set_integer(config, PACKAGE, "line_break_column", editor_prefs.line_break_column);
|
||||
|
||||
/* files */
|
||||
g_key_file_set_string(config, PACKAGE, "pref_editor_default_new_encoding", encodings[prefs.default_new_encoding].charset);
|
||||
@ -546,6 +547,7 @@ static void load_dialog_prefs(GKeyFile *config)
|
||||
editor_prefs.use_gtk_word_boundaries = utils_get_setting_boolean(config, PACKAGE, "use_gtk_word_boundaries", TRUE);
|
||||
editor_prefs.complete_snippets_whilst_editing = utils_get_setting_boolean(config, PACKAGE, "complete_snippets_whilst_editing", FALSE);
|
||||
editor_prefs.scroll_stop_at_last_line = utils_get_setting_boolean(config, PACKAGE, "scroll_stop_at_last_line", FALSE);
|
||||
editor_prefs.line_break_column = utils_get_setting_integer(config, PACKAGE, "line_break_column", 72);
|
||||
|
||||
/* Files
|
||||
* use current locale encoding as default for new files (should be UTF-8 in most cases) */
|
||||
|
@ -427,6 +427,9 @@ void prefs_init_dialog(void)
|
||||
widget = lookup_widget(ui_widgets.prefs_dialog, "spin_symbol_complete_chars");
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), editor_prefs.symbolcompletion_min_chars);
|
||||
|
||||
widget = lookup_widget(ui_widgets.prefs_dialog, "spin_line_break");
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), editor_prefs.line_break_column);
|
||||
|
||||
|
||||
/* Tools Settings */
|
||||
if (prefs.tools_make_cmd)
|
||||
@ -822,6 +825,9 @@ on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_data)
|
||||
widget = lookup_widget(ui_widgets.prefs_dialog, "spin_symbollistheight");
|
||||
editor_prefs.symbolcompletion_max_height = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
|
||||
|
||||
widget = lookup_widget(ui_widgets.prefs_dialog, "spin_line_break");
|
||||
editor_prefs.line_break_column = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
|
||||
|
||||
|
||||
/* Tools Settings */
|
||||
widget = lookup_widget(ui_widgets.prefs_dialog, "entry_com_make");
|
||||
|
@ -680,6 +680,10 @@ void ui_document_show_hide(gint idx)
|
||||
GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "menu_line_breaking1")),
|
||||
doc_list[idx].line_wrapping);
|
||||
|
||||
gtk_check_menu_item_set_active(
|
||||
GTK_CHECK_MENU_ITEM(lookup_widget(app->window, "line_breaking1")),
|
||||
doc_list[idx].line_breaking);
|
||||
|
||||
item = lookup_widget(app->window, "menu_use_auto_indentation1");
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item),
|
||||
doc_list[idx].auto_indent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user