Revision: 2874
http://geany.svn.sourceforge.net/geany/?rev=2874&view=rev
Author: ntrel
Date: 2008-08-11 16:53:03 +0000 (Mon, 11 Aug 2008)
Log Message:
-----------
Rename GeanyIndentPrefs::tab_width to hard_tab_width, and update
keyfile key name.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
trunk/src/editor.h
trunk/src/keyfile.c
trunk/src/plugindata.h
trunk/src/prefs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-08-11 16:44:19 UTC (rev 2873)
+++ trunk/ChangeLog 2008-08-11 16:53:03 UTC (rev 2874)
@@ -12,6 +12,10 @@
is_code_style().
* plugins/export.c:
Fix using correct hard tab width for HTML export, not just LaTeX.
+ * src/prefs.c, src/plugindata.h, src/keyfile.c, src/editor.c,
+ src/editor.h:
+ Rename GeanyIndentPrefs::tab_width to hard_tab_width, and update
+ keyfile key name.
2008-08-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2008-08-11 16:44:19 UTC (rev 2873)
+++ trunk/src/editor.c 2008-08-11 16:53:03 UTC (rev 2874)
@@ -712,7 +712,7 @@
static gint get_tab_width(const GeanyIndentPrefs *indent_prefs)
{
if (indent_prefs->type == GEANY_INDENT_TYPE_BOTH)
- return indent_prefs->tab_width;
+ return indent_prefs->hard_tab_width;
return indent_prefs->width; /* tab width = indent width */
}
@@ -721,7 +721,7 @@
/* Returns a string containing width chars of whitespace, filled with simple space
* characters or with the right number of tab characters, according to the indent prefs.
* (Result is filled with tabs *and* spaces if width isn't a multiple of
- * editor_prefs.tab_width). */
+ * the tab width). */
static gchar *
get_whitespace(const GeanyIndentPrefs *iprefs, gint width)
{
@@ -3626,7 +3626,7 @@
sci_set_use_tabs(sci, use_tabs);
if (type == GEANY_INDENT_TYPE_BOTH)
- sci_set_tab_width(sci, iprefs->tab_width);
+ sci_set_tab_width(sci, iprefs->hard_tab_width);
else
sci_set_tab_width(sci, iprefs->width);
SSM(sci, SCI_SETINDENT, iprefs->width, 0);
Modified: trunk/src/editor.h
===================================================================
--- trunk/src/editor.h 2008-08-11 16:44:19 UTC (rev 2873)
+++ trunk/src/editor.h 2008-08-11 16:53:03 UTC (rev 2874)
@@ -72,7 +72,7 @@
GeanyIndentType type; /**< Whether to use tabs, spaces or both to indent. */
/** Width of a tab, but only when using GEANY_INDENT_TYPE_BOTH.
* To get the display tab width, use sci_get_tab_width(). */
- gint tab_width;
+ gint hard_tab_width;
GeanyAutoIndent auto_indent_mode;
gboolean detect_type;
}
Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c 2008-08-11 16:44:19 UTC (rev 2873)
+++ trunk/src/keyfile.c 2008-08-11 16:53:03 UTC (rev 2874)
@@ -146,7 +146,7 @@
SettingEntry items[] =
{
{&editor_prefs.indentation->width, PACKAGE, "pref_editor_tab_width", (gpointer)4},
- {&editor_prefs.indentation->tab_width, PACKAGE, "indent_tab_width", (gpointer)8},
+ {&editor_prefs.indentation->hard_tab_width, PACKAGE, "indent_hard_tab_width", (gpointer)8},
{&editor_prefs.indentation->auto_indent_mode, PACKAGE, "indent_mode",
(gpointer)GEANY_AUTOINDENT_CURRENTCHARS},
{&editor_prefs.indentation->type, PACKAGE, "indent_type", (gpointer)GEANY_INDENT_TYPE_TABS},
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2008-08-11 16:44:19 UTC (rev 2873)
+++ trunk/src/plugindata.h 2008-08-11 16:53:03 UTC (rev 2874)
@@ -36,7 +36,7 @@
/* The API version should be incremented whenever any plugin data types below are
* modified or appended to. */
-static const gint api_version = 86;
+static const gint api_version = 87;
/* The ABI version should be incremented whenever existing fields in the plugin
* data types below have to be changed or reordered. It should stay the same if fields
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2008-08-11 16:44:19 UTC (rev 2873)
+++ trunk/src/prefs.c 2008-08-11 16:53:03 UTC (rev 2874)
@@ -144,7 +144,7 @@
PrefEntry items[] =
{
{"spin_indent_width", &editor_prefs.indentation->width},
- {"spin_tab_width", &editor_prefs.indentation->tab_width},
+ {"spin_tab_width", &editor_prefs.indentation->hard_tab_width},
};
for (i = 0; i < G_N_ELEMENTS(items); i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2873
http://geany.svn.sourceforge.net/geany/?rev=2873&view=rev
Author: ntrel
Date: 2008-08-11 16:44:19 +0000 (Mon, 11 Aug 2008)
Log Message:
-----------
Fix using correct hard tab width for HTML export, not just LaTeX.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/export.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-08-11 16:31:36 UTC (rev 2872)
+++ trunk/ChangeLog 2008-08-11 16:44:19 UTC (rev 2873)
@@ -10,6 +10,8 @@
* src/editor.c:
Break is_comment() into comment and string detection, each called in
is_code_style().
+ * plugins/export.c:
+ Fix using correct hard tab width for HTML export, not just LaTeX.
2008-08-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/plugins/export.c
===================================================================
--- trunk/plugins/export.c 2008-08-11 16:31:36 UTC (rev 2872)
+++ trunk/plugins/export.c 2008-08-11 16:44:19 UTC (rev 2873)
@@ -627,7 +627,7 @@
case '\t':
{
gint j;
- gint tab_width = p_editor->get_indent_prefs(editor)->tab_width;
+ gint tab_width = p_sci->get_tab_width(editor->sci);
gint tab_stop = tab_width - (column % tab_width);
column += tab_stop - 1; /* -1 because we add 1 at the end of the loop */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2867
http://geany.svn.sourceforge.net/geany/?rev=2867&view=rev
Author: ntrel
Date: 2008-08-08 14:47:49 +0000 (Fri, 08 Aug 2008)
Log Message:
-----------
Removing completed branch.
Removed Paths:
-------------
branches/custom-tab-width/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2866
http://geany.svn.sourceforge.net/geany/?rev=2866&view=rev
Author: ntrel
Date: 2008-08-08 14:46:31 +0000 (Fri, 08 Aug 2008)
Log Message:
-----------
Add sci_get_tab_width() to the API, and use it to get the correct
display tab width in the Export plugin.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/export.c
trunk/src/editor.c
trunk/src/editor.h
trunk/src/plugindata.h
trunk/src/plugins.c
trunk/src/sciwrappers.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-08-08 14:33:23 UTC (rev 2865)
+++ trunk/ChangeLog 2008-08-08 14:46:31 UTC (rev 2866)
@@ -3,6 +3,10 @@
* src/printing.c:
Fix using correct display tab width when the Tabs & Spaces indent
type is set.
+ * src/sciwrappers.c, src/plugindata.h, src/plugins.c, src/editor.c,
+ src/editor.h, plugins/export.c:
+ Add sci_get_tab_width() to the API, and use it to get the correct
+ display tab width in the Export plugin.
2008-08-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/plugins/export.c
===================================================================
--- trunk/plugins/export.c 2008-08-08 14:33:23 UTC (rev 2865)
+++ trunk/plugins/export.c 2008-08-08 14:46:31 UTC (rev 2866)
@@ -409,7 +409,7 @@
}
case '\t':
{
- gint tab_width = p_editor->get_indent_prefs(editor)->tab_width;
+ gint tab_width = p_sci->get_tab_width(editor->sci);
gint tab_stop = tab_width - (column % tab_width);
column += tab_stop - 1; /* -1 because we add 1 at the end of the loop */
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2008-08-08 14:33:23 UTC (rev 2865)
+++ trunk/src/editor.c 2008-08-08 14:46:31 UTC (rev 2866)
@@ -707,6 +707,8 @@
}
+/* Note: this is the same as sci_get_tab_width(), but is still useful when you don't have
+ * a scintilla pointer. */
static gint get_tab_width(const GeanyIndentPrefs *indent_prefs)
{
if (indent_prefs->type == GEANY_INDENT_TYPE_BOTH)
Modified: trunk/src/editor.h
===================================================================
--- trunk/src/editor.h 2008-08-08 14:33:23 UTC (rev 2865)
+++ trunk/src/editor.h 2008-08-08 14:46:31 UTC (rev 2866)
@@ -70,7 +70,9 @@
{
gint width; /**< Indent width. */
GeanyIndentType type; /**< Whether to use tabs, spaces or both to indent. */
- gint tab_width; /**< Width of a tab, when using GEANY_INDENT_TYPE_BOTH. */
+ /** Width of a tab, but only when using GEANY_INDENT_TYPE_BOTH.
+ * To get the display tab width, use sci_get_tab_width(). */
+ gint tab_width;
GeanyAutoIndent auto_indent_mode;
gboolean detect_type;
}
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2008-08-08 14:33:23 UTC (rev 2865)
+++ trunk/src/plugindata.h 2008-08-08 14:46:31 UTC (rev 2866)
@@ -36,7 +36,7 @@
/* The API version should be incremented whenever any plugin data types below are
* modified or appended to. */
-static const gint api_version = 84;
+static const gint api_version = 85;
/* The ABI version should be incremented whenever existing fields in the plugin
* data types below have to be changed or reordered. It should stay the same if fields
@@ -267,6 +267,7 @@
gchar (*get_char_at) (struct _ScintillaObject *sci, gint pos);
gint (*get_current_line) (struct _ScintillaObject *sci);
gboolean (*can_copy) (struct _ScintillaObject *sci);
+ gint (*get_tab_width) (struct _ScintillaObject *sci);
}
ScintillaFuncs;
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2008-08-08 14:33:23 UTC (rev 2865)
+++ trunk/src/plugins.c 2008-08-08 14:46:31 UTC (rev 2866)
@@ -152,7 +152,8 @@
&sci_get_style_at,
&sci_get_char_at,
&sci_get_current_line,
- &sci_can_copy
+ &sci_can_copy,
+ &sci_get_tab_width
};
static TemplateFuncs template_funcs = {
Modified: trunk/src/sciwrappers.c
===================================================================
--- trunk/src/sciwrappers.c 2008-08-08 14:33:23 UTC (rev 2865)
+++ trunk/src/sciwrappers.c 2008-08-08 14:46:31 UTC (rev 2866)
@@ -637,6 +637,7 @@
}
+/** Get display tab width. */
gint sci_get_tab_width(ScintillaObject * sci)
{
return SSM(sci, SCI_GETTABWIDTH, 0, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.