Revision: 712 Author: eht16 Date: 2006-08-13 08:04:30 -0700 (Sun, 13 Aug 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=712&view=rev
Log Message: ----------- Added colour values for indentation guides and white space. Made hard coded SCI_AUTOCSETMAXHEIGHT changeable and added an option in the preferences dialog.
Modified Paths: -------------- trunk/ChangeLog trunk/data/filetypes.common trunk/doc/geany.docbook trunk/geany.glade trunk/src/document.c trunk/src/geany.h trunk/src/highlighting.c trunk/src/interface.c trunk/src/keyfile.c trunk/src/prefs.c trunk/src/sciwrappers.c trunk/src/sciwrappers.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/ChangeLog 2006-08-13 15:04:30 UTC (rev 712) @@ -6,6 +6,13 @@ * src/vte.c: Added the GTK IM menu items to the VTE popup menu. * src/utils.c, src/dialogs.c, src/build.c, src/callbacks.c, src/search.c, src/keyfile.c: Use utf8/locale encoding wrappers. + * data/filetypes.common, src/highlighting.c, src/geany.h, + src/keyfile.c, src/prefs.c, src/document.c, src/interface.c, + geany.glade, doc/geany.docbook: + Added colour values for indentation guides and white space. + Made hard coded SCI_AUTOCSETMAXHEIGHT changeable and added an option + in the preferences dialog. + * src/sciwrappers.c: Added sci_set_autoc_max_height().
2006-08-12 Enrico Tröger enrico.troeger@uvena.de
Modified: trunk/data/filetypes.common =================================================================== --- trunk/data/filetypes.common 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/data/filetypes.common 2006-08-13 15:04:30 UTC (rev 712) @@ -14,6 +14,9 @@ current_line=0x0;0xe5e5e5;true;false # colour of the caret(the blinking cursor), only first argument is interpreted caret=0x000000;0x0;false;false +indent_guide=0xc0c0c0;0xffffff;false;false +# the third argument defines whether to use these values or use the default values defined by the filetypes +white_space=0xc0c0c0;0xffffff;true;false # style of folding icons, only first and second arguments are used, valid values are: # first argument: 1 for boxes, 2 for circles # second argument: 1 for straight lines, 2 for curved lines
Modified: trunk/doc/geany.docbook =================================================================== --- trunk/doc/geany.docbook 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/doc/geany.docbook 2006-08-13 15:04:30 UTC (rev 712) @@ -1498,9 +1498,26 @@ <entry>The style for colouring the background of the current line. Only the second argument is interpreted. </entry> - <entry>current_line=0x0;0xE5E5E5;false;false</entry> + <entry>current_line=0x0;0xe5e5e5;false;false</entry> </row> <row> + <entry>indent_guide</entry> + <entry>The style for colouring the indentation guides. + Only the first and second arguments are interpreted. + </entry> + <entry>indent_guide=0xc0c0c0;0xffffff;false;false</entry> + </row> + <row> + <entry>white_space</entry> + <entry>The style for colouring the white space if it is shown. + The first both arguments define the foreground and + background colours, the third argument sets whether to use + the defined colours or to use the colours defined by each + filetype for the white space. + </entry> + <entry>white_space=0xc0c0c0;0xffffff;true;false</entry> + </row> + <row> <entry>folding_style</entry> <entry>The style of folding icons. Only first and second arguments are used.
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/geany.glade 2006-08-13 15:04:30 UTC (rev 712) @@ -2766,7 +2766,7 @@ <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">19</property> + <property name="spacing">20</property>
<child> <widget class="GtkLabel" id="label147"> @@ -4364,7 +4364,7 @@ <child> <widget class="GtkLabel" id="label116"> <property name="visible">True</property> - <property name="label" translatable="yes">Tab Width</property> + <property name="label" translatable="yes">Tab Width:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -4885,6 +4885,64 @@ <property name="fill">False</property> </packing> </child> + + <child> + <widget class="GtkHBox" id="hbox6"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">20</property> + + <child> + <widget class="GtkLabel" id="label173"> + <property name="visible">True</property> + <property name="label" translatable="yes">Rows of auto completion list:</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_autocheight"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Number of rows to display when the auto completion list is shown.</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">10 1 99 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>
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/src/document.c 2006-08-13 15:04:30 UTC (rev 712) @@ -205,6 +205,7 @@ sci_set_mark_long_lines(sci, app->long_line_type, app->long_line_column, app->long_line_color);
sci_set_tab_width(sci, app->pref_editor_tab_width); + sci_set_autoc_max_height(sci, app->autocompletion_max_height);
sci_set_indentionguides(sci, app->pref_editor_show_indent_guide); sci_set_visible_white_spaces(sci, app->pref_editor_show_white_space); @@ -790,8 +791,7 @@ }
-#define SEARCH_NOT_FOUND_TXT _("The document has been searched completely but the match "%s" \ - was not found. Wrap search around the document?") +#define SEARCH_NOT_FOUND_TXT _("The document has been searched completely but the match "%s" was not found. Wrap search around the document?")
/* special search function, used from the find entry in the toolbar */ void document_find_next(gint idx, const gchar *text, gint flags, gboolean find_button, gboolean inc)
Modified: trunk/src/geany.h =================================================================== --- trunk/src/geany.h 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/src/geany.h 2006-08-13 15:04:30 UTC (rev 712) @@ -57,6 +57,7 @@ #define GEANY_WORDCHARS "_#&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\" #define GEANY_MAX_WORD_LENGTH 192 #define GEANY_MAX_AUTOCOMPLETE_WORDS 30 +#define GEANY_MAX_AUTOCOMPLETE_HEIGHT 10 #define GEANY_STRING_UNTITLED _("untitled") #define GEANY_MSGWIN_HEIGHT 208 #define GEANY_WINDOW_MINIMAL_WIDTH 620 @@ -165,6 +166,7 @@ gint tab_pos_sidebar; gint cur_idx; // currently only used by the build system (build_spawn_cmd) guint mru_length; + gint autocompletion_max_height; gint long_line_type; gint long_line_column; #ifdef HAVE_FIFO
Modified: trunk/src/highlighting.c =================================================================== --- trunk/src/highlighting.c 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/src/highlighting.c 2006-08-13 15:04:30 UTC (rev 712) @@ -147,7 +147,7 @@
static guint invert(guint icolour) { - if (types[GEANY_FILETYPES_ALL]->styling[9][0]) + if (types[GEANY_FILETYPES_ALL]->styling[11][0]) { guint r, g, b;
@@ -204,8 +204,10 @@ styleset_get_hex(config, config_home, "styling", "margin_folding", "0x000000", "0xdfdfdf", "false", types[GEANY_FILETYPES_ALL]->styling[5]); styleset_get_hex(config, config_home, "styling", "current_line", "0x000000", "0xe5e5e5", "true", types[GEANY_FILETYPES_ALL]->styling[6]); styleset_get_hex(config, config_home, "styling", "caret", "0x000000", "0x000000", "false", types[GEANY_FILETYPES_ALL]->styling[7]); - styleset_get_int(config, config_home, "styling", "folding_style", 1, 1, types[GEANY_FILETYPES_ALL]->styling[8]); - styleset_get_int(config, config_home, "styling", "invert_all", 0, 0, types[GEANY_FILETYPES_ALL]->styling[9]); + styleset_get_hex(config, config_home, "styling", "indent_guide", "0xc0c0c0", "0xffffff", "false", types[GEANY_FILETYPES_ALL]->styling[8]); + styleset_get_hex(config, config_home, "styling", "white_space", "0xc0c0c0", "0xffffff", "true", types[GEANY_FILETYPES_ALL]->styling[9]); + styleset_get_int(config, config_home, "styling", "folding_style", 1, 1, types[GEANY_FILETYPES_ALL]->styling[10]); + styleset_get_int(config, config_home, "styling", "invert_all", 0, 0, types[GEANY_FILETYPES_ALL]->styling[11]);
types[GEANY_FILETYPES_ALL]->keywords = NULL; styleset_get_wordchars(config, config_home, GEANY_FILETYPES_ALL, GEANY_WORDCHARS); @@ -260,7 +262,7 @@ SSM(sci, SCI_SETFOLDFLAGS, 0, 0);
// choose the folding style - boxes or circles, I prefer boxes, so it is default ;-) - switch (types[GEANY_FILETYPES_ALL]->styling[8][0]) + switch (types[GEANY_FILETYPES_ALL]->styling[10][0]) { case 2: { @@ -281,7 +283,7 @@ }
// choose the folding style - straight or curved, I prefer straight, so it is default ;-) - switch (types[GEANY_FILETYPES_ALL]->styling[8][1]) + switch (types[GEANY_FILETYPES_ALL]->styling[10][1]) { case 2: { @@ -332,6 +334,12 @@ styleset_set_style(sci, STYLE_LINENUMBER, GEANY_FILETYPES_ALL, 4); styleset_set_style(sci, STYLE_BRACELIGHT, GEANY_FILETYPES_ALL, 2); styleset_set_style(sci, STYLE_BRACEBAD, GEANY_FILETYPES_ALL, 3); + styleset_set_style(sci, STYLE_INDENTGUIDE, GEANY_FILETYPES_ALL, 8); + + SSM(sci, SCI_SETWHITESPACEFORE, types[GEANY_FILETYPES_ALL]->styling[9][2], + invert(types[GEANY_FILETYPES_ALL]->styling[9][0])); + SSM(sci, SCI_SETWHITESPACEBACK, types[GEANY_FILETYPES_ALL]->styling[9][2], + invert(types[GEANY_FILETYPES_ALL]->styling[9][1])); }
@@ -422,7 +430,7 @@ }
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_C]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETLEXER, SCLEX_CPP, 0);
@@ -459,8 +467,6 @@ // is used for local structs and typedefs styleset_set_style(sci, SCE_C_GLOBALCLASS, GEANY_FILETYPES_C, 18);
- SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); - if (types[GEANY_FILETYPES_C]->styling[19][0] == 1) SSM(sci, SCI_SETPROPERTY, (sptr_t) "styling.within.preprocessor", (sptr_t) "1"); SSM(sci, SCI_SETPROPERTY, (sptr_t) "preprocessor.symbol.$(file.patterns.cpp)", (sptr_t) "#"); @@ -557,7 +563,7 @@ }
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_CPP]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETLEXER, SCLEX_CPP, 0);
@@ -592,8 +598,6 @@ // is used for local structs and typedefs styleset_set_style(sci, SCE_C_GLOBALCLASS, GEANY_FILETYPES_CPP, 18);
- SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); - if (types[GEANY_FILETYPES_CPP]->styling[19][0] == 1) SSM(sci, SCI_SETPROPERTY, (sptr_t) "styling.within.preprocessor", (sptr_t) "1"); SSM(sci, SCI_SETPROPERTY, (sptr_t) "preprocessor.symbol.$(file.patterns.cpp)", (sptr_t) "#"); @@ -650,7 +654,7 @@ styleset_common(sci, 5);
SSM (sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_PASCAL]->wordchars); - SSM (sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM (sci, SCI_SETLEXER, SCLEX_PASCAL, 0);
@@ -669,10 +673,7 @@ styleset_set_style(sci, SCE_C_COMMENTLINE, GEANY_FILETYPES_PASCAL, 10); styleset_set_style(sci, SCE_C_COMMENTDOC, GEANY_FILETYPES_PASCAL, 11);
- SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); - //SSM(sci, SCI_SETPROPERTY, (sptr_t) "styling.within.preprocessor", (sptr_t) "1"); - }
@@ -836,6 +837,8 @@ SSM (sci, SCI_SETPROPERTY, (sptr_t) "phpscript.mode", (sptr_t) "1"); SSM (sci, SCI_SETLEXER, SCLEX_HTML, 0);
+ SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0); + // use the same colouring for HTML; XML and so on styleset_markup(sci);
@@ -944,8 +947,6 @@ SSM(sci, SCI_SETKEYWORDS, 4, (sptr_t) types[GEANY_FILETYPES_XML]->keywords[4]); SSM(sci, SCI_SETKEYWORDS, 5, (sptr_t) types[GEANY_FILETYPES_XML]->keywords[5]);
- SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); - // hotspotting, nice thing SSM(sci, SCI_SETHOTSPOTACTIVEFORE, 1, invert(0xff0000)); SSM(sci, SCI_SETHOTSPOTACTIVEUNDERLINE, 1, 0); @@ -1215,7 +1216,7 @@ SSM (sci, SCI_SETLEXER, SCLEX_CPP, 0);
SSM (sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_JAVA]->wordchars); - SSM (sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM (sci, SCI_SETCONTROLCHARSYMBOL, 32, 0);
@@ -1248,8 +1249,6 @@ SSM(sci, SCI_STYLESETITALIC, SCE_C_COMMENTDOCKEYWORDERROR, TRUE);
styleset_set_style(sci, SCE_C_GLOBALCLASS, GEANY_FILETYPES_JAVA, 18); - - SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); }
@@ -1333,7 +1332,7 @@ SSM(sci, SCI_SETPROPERTY, (sptr_t) "styling.within.preprocessor", (sptr_t) "1");
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_PERL]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETKEYWORDS, 0, (sptr_t) types[GEANY_FILETYPES_PERL]->keywords[0]);
@@ -1354,8 +1353,6 @@ styleset_set_style(sci, SCE_PL_BACKTICKS, GEANY_FILETYPES_PERL, 14); styleset_set_style(sci, SCE_PL_HASH, GEANY_FILETYPES_PERL, 15); styleset_set_style(sci, SCE_PL_SYMBOLTABLE, GEANY_FILETYPES_PERL, 16); - - SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); }
@@ -1407,6 +1404,7 @@ SSM (sci, SCI_SETLEXER, SCLEX_PYTHON, 0);
SSM(sci, SCI_SETKEYWORDS, 0, (sptr_t) types[GEANY_FILETYPES_PYTHON]->keywords[0]); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
styleset_set_style(sci, SCE_P_DEFAULT, GEANY_FILETYPES_PYTHON, 0); styleset_set_style(sci, SCE_P_COMMENTLINE, GEANY_FILETYPES_PYTHON, 1); @@ -1481,6 +1479,7 @@ SSM (sci, SCI_SETLEXER, SCLEX_RUBY, 0);
SSM(sci, SCI_SETKEYWORDS, 0, (sptr_t) types[GEANY_FILETYPES_RUBY]->keywords[0]); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
styleset_set_style(sci, SCE_RB_DEFAULT, GEANY_FILETYPES_RUBY, 0); styleset_set_style(sci, SCE_RB_COMMENTLINE, GEANY_FILETYPES_RUBY, 1); @@ -1549,7 +1548,7 @@ SSM (sci, SCI_SETLEXER, SCLEX_BASH, 0);
SSM (sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_SH]->wordchars); - SSM (sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM (sci, SCI_SETCONTROLCHARSYMBOL, 32, 0);
@@ -1566,8 +1565,6 @@ styleset_set_style(sci, SCE_SH_BACKTICKS, GEANY_FILETYPES_SH, 8); styleset_set_style(sci, SCE_SH_PARAM, GEANY_FILETYPES_SH, 9); styleset_set_style(sci, SCE_SH_SCALAR, GEANY_FILETYPES_SH, 10); - - SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); }
@@ -1706,7 +1703,7 @@ SSM(sci, SCI_SETKEYWORDS, 5, (sptr_t) types[GEANY_FILETYPES_DOCBOOK]->keywords[1]);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_DOCBOOK]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
// Unknown tags and attributes are highlighed in red. // If a tag is actually OK, it should be added in lower case to the htmlKeyWords string. @@ -1827,7 +1824,7 @@ styleset_common(sci, 5);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_CSS]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETLEXER, SCLEX_CSS, 0);
@@ -1885,7 +1882,7 @@ SSM (sci, SCI_SETLEXER, SCLEX_PROPERTIES, 0);
SSM (sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_CONF]->wordchars); - SSM (sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM (sci, SCI_SETCONTROLCHARSYMBOL, 32, 0);
@@ -1948,7 +1945,7 @@ styleset_common(sci, 5);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_ASM]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETLEXER, SCLEX_ASM, 0);
@@ -2051,7 +2048,7 @@ styleset_common(sci, 5);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_SQL]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETLEXER, SCLEX_SQL, 0);
@@ -2128,7 +2125,7 @@ styleset_common(sci, 5);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_CAML]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETLEXER, SCLEX_CAML, 0);
@@ -2201,7 +2198,7 @@ SSM (sci, SCI_SETLEXER, SCLEX_OMS, 0);
SSM (sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_OMS]->wordchars); - SSM (sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM (sci, SCI_SETCONTROLCHARSYMBOL, 32, 0);
@@ -2218,8 +2215,6 @@ styleset_set_style(sci, SCE_SH_BACKTICKS, GEANY_FILETYPES_OMS, 8); styleset_set_style(sci, SCE_SH_PARAM, GEANY_FILETYPES_OMS, 9); styleset_set_style(sci, SCE_SH_SCALAR, GEANY_FILETYPES_OMS, 10); - - SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); }
@@ -2278,7 +2273,7 @@
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_TCL]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETLEXER, SCLEX_TCL, 0);
@@ -2304,8 +2299,6 @@ styleset_set_style(sci, SCE_TCL_WORD3, GEANY_FILETYPES_TCL, 13); styleset_set_style(sci, SCE_TCL_WORD4, GEANY_FILETYPES_TCL, 14); styleset_set_style(sci, SCE_TCL_WORD5, GEANY_FILETYPES_TCL, 15); - - SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); }
static void styleset_d_init(void) @@ -2395,7 +2388,7 @@ }
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) types[GEANY_FILETYPES_D]->wordchars); - SSM(sci, SCI_AUTOCSETMAXHEIGHT, 8, 0); + SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
SSM(sci, SCI_SETLEXER, SCLEX_CPP, 0);
@@ -2429,7 +2422,5 @@
// is used for local structs and typedefs styleset_set_style(sci, SCE_C_GLOBALCLASS, GEANY_FILETYPES_D, 18); - - SSM(sci, SCI_SETWHITESPACEFORE, 1, invert(0xc0c0c0)); }
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/src/interface.c 2006-08-13 15:04:30 UTC (rev 712) @@ -2173,6 +2173,10 @@ GtkWidget *check_xmltag; GtkWidget *check_folding; GtkWidget *check_indicators; + GtkWidget *hbox6; + GtkWidget *label173; + GtkObject *spin_autocheight_adj; + GtkWidget *spin_autocheight; GtkWidget *label172; GtkWidget *label95; GtkWidget *vbox2; @@ -2300,7 +2304,7 @@ gtk_widget_show (label163); gtk_box_pack_start (GTK_BOX (vbox4), label163, FALSE, FALSE, 0);
- hbox2 = gtk_hbox_new (FALSE, 19); + hbox2 = gtk_hbox_new (FALSE, 20); gtk_widget_show (hbox2); gtk_box_pack_start (GTK_BOX (vbox4), hbox2, FALSE, TRUE, 0);
@@ -2811,7 +2815,7 @@ gtk_table_set_row_spacings (GTK_TABLE (table5), 3); gtk_table_set_col_spacings (GTK_TABLE (table5), 25);
- label116 = gtk_label_new (_("Tab Width")); + label116 = gtk_label_new (_("Tab Width:")); gtk_widget_show (label116); gtk_table_attach (GTK_TABLE (table5), label116, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), @@ -2976,6 +2980,21 @@ gtk_tooltips_set_tip (tooltips, check_indicators, _("Whether to use indicators (a squiggly underline) to highlight the lines where the compiler found a warning or an error."), NULL); gtk_button_set_focus_on_click (GTK_BUTTON (check_indicators), FALSE);
+ hbox6 = gtk_hbox_new (FALSE, 20); + gtk_widget_show (hbox6); + gtk_box_pack_start (GTK_BOX (vbox17), hbox6, TRUE, TRUE, 0); + + label173 = gtk_label_new (_("Rows of auto completion list:")); + gtk_widget_show (label173); + gtk_box_pack_start (GTK_BOX (hbox6), label173, FALSE, FALSE, 0); + + spin_autocheight_adj = gtk_adjustment_new (10, 1, 99, 1, 10, 10); + spin_autocheight = gtk_spin_button_new (GTK_ADJUSTMENT (spin_autocheight_adj), 1, 0); + gtk_widget_show (spin_autocheight); + gtk_box_pack_start (GTK_BOX (hbox6), spin_autocheight, FALSE, TRUE, 0); + gtk_tooltips_set_tip (tooltips, spin_autocheight, _("Number of rows to display when the auto completion list is shown."), NULL); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_autocheight), TRUE); + label172 = gtk_label_new (_("<b>Features</b>")); gtk_widget_show (label172); gtk_frame_set_label_widget (GTK_FRAME (frame14), label172); @@ -3392,6 +3411,9 @@ GLADE_HOOKUP_OBJECT (prefs_dialog, check_xmltag, "check_xmltag"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_folding, "check_folding"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_indicators, "check_indicators"); + GLADE_HOOKUP_OBJECT (prefs_dialog, hbox6, "hbox6"); + GLADE_HOOKUP_OBJECT (prefs_dialog, label173, "label173"); + GLADE_HOOKUP_OBJECT (prefs_dialog, spin_autocheight, "spin_autocheight"); GLADE_HOOKUP_OBJECT (prefs_dialog, label172, "label172"); GLADE_HOOKUP_OBJECT (prefs_dialog, label95, "label95"); GLADE_HOOKUP_OBJECT (prefs_dialog, vbox2, "vbox2");
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/src/keyfile.c 2006-08-13 15:04:30 UTC (rev 712) @@ -84,6 +84,7 @@ g_key_file_set_integer(config, PACKAGE, "tab_pos_editor", app->tab_pos_editor); g_key_file_set_integer(config, PACKAGE, "tab_pos_msgwin", app->tab_pos_msgwin); g_key_file_set_integer(config, PACKAGE, "tab_pos_sidebar", app->tab_pos_sidebar); + g_key_file_set_integer(config, PACKAGE, "autocompletion_max_height", app->autocompletion_max_height); g_key_file_set_integer(config, PACKAGE, "long_line_column", app->long_line_column); g_key_file_set_string(config, PACKAGE, "long_line_color", app->long_line_color); g_key_file_set_boolean(config, PACKAGE, "beep_on_errors", app->beep_on_errors); @@ -245,6 +246,7 @@ app->long_line_type = utils_get_setting_integer(config, PACKAGE, "long_line_type", 0); 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->autocompletion_max_height = utils_get_setting_integer(config, PACKAGE, "autocompletion_max_height", GEANY_MAX_AUTOCOMPLETE_HEIGHT); app->tab_pos_editor = utils_get_setting_integer(config, PACKAGE, "tab_pos_editor", GTK_POS_TOP); app->tab_pos_msgwin = utils_get_setting_integer(config, PACKAGE, "tab_pos_msgwin",GTK_POS_LEFT); app->tab_pos_sidebar = utils_get_setting_integer(config, PACKAGE, "tab_pos_sidebar", GTK_POS_TOP);
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/src/prefs.c 2006-08-13 15:04:30 UTC (rev 712) @@ -44,9 +44,6 @@ #endif
-gint old_tab_width; -gint old_long_line_column; -gchar *old_long_line_color; gchar *dialog_key_name; static GtkListStore *store = NULL; static GtkTreeView *tree = NULL; @@ -113,7 +110,6 @@
widget = lookup_widget(app->prefs_dialog, "spin_long_line"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), app->long_line_column); - old_long_line_column = app->long_line_column;
switch (app->long_line_type) { @@ -123,8 +119,6 @@ } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
- old_long_line_color = g_strdup(app->long_line_color); - color = g_new0(GdkColor, 1); gdk_color_parse(app->long_line_color, color); widget = lookup_widget(app->prefs_dialog, "long_line_color"); @@ -191,7 +185,6 @@ // Editor settings widget = lookup_widget(app->prefs_dialog, "spin_tab_width"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), app->pref_editor_tab_width); - old_tab_width = app->pref_editor_tab_width;
widget = lookup_widget(app->prefs_dialog, "combo_encoding"); // luckily the index of the combo box items match the index of the encodings array @@ -233,7 +226,10 @@ widget = lookup_widget(app->prefs_dialog, "check_indicators"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_editor_use_indicators);
+ widget = lookup_widget(app->prefs_dialog, "spin_autocheight"); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), app->autocompletion_max_height);
+ // Tools Settings #ifdef G_OS_WIN32 // hide related Make path setting @@ -519,7 +515,10 @@ widget = lookup_widget(app->prefs_dialog, "check_indicators"); app->pref_editor_use_indicators = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+ widget = lookup_widget(app->prefs_dialog, "spin_autocheight"); + app->autocompletion_max_height = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
+ // Tools Settings widget = lookup_widget(app->prefs_dialog, "entry_com_make"); g_free(app->tools_make_cmd); @@ -626,10 +625,6 @@ if (! app->pref_editor_folding) document_unfold_all(i); } } - old_tab_width = app->pref_editor_tab_width; - old_long_line_column = app->long_line_column; - g_free(old_long_line_color); - old_long_line_color = g_strdup(app->long_line_color);
// store all settings configuration_save();
Modified: trunk/src/sciwrappers.c =================================================================== --- trunk/src/sciwrappers.c 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/src/sciwrappers.c 2006-08-13 15:04:30 UTC (rev 712) @@ -847,3 +847,8 @@ { return SSM(sci, SCI_GETLINEINDENTPOSITION, line, 0); } + +void sci_set_autoc_max_height(ScintillaObject *sci, gint val) +{ + SSM(sci, SCI_AUTOCSETMAXHEIGHT, val, 0); +}
Modified: trunk/src/sciwrappers.h =================================================================== --- trunk/src/sciwrappers.h 2006-08-13 09:07:10 UTC (rev 711) +++ trunk/src/sciwrappers.h 2006-08-13 15:04:30 UTC (rev 712) @@ -156,5 +156,6 @@ void sci_start_styling (ScintillaObject * sci, gint pos, gint mask); void sci_select_all (ScintillaObject * sci); gint sci_get_line_indent_position(ScintillaObject * sci, gint line); +void sci_set_autoc_max_height (ScintillaObject * sci, gint val);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.