Revision: 5424
http://geany.svn.sourceforge.net/geany/?rev=5424&view=rev
Author: ntrel
Date: 2010-11-22 16:44:04 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
Add example of using '#if GEANY_API_VERSION >= 200'.
Modified Paths:
--------------
trunk/src/plugindata.h
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2010-11-22 16:30:44 UTC (rev 5423)
+++ trunk/src/plugindata.h 2010-11-22 16:44:04 UTC (rev 5424)
@@ -44,7 +44,13 @@
/** The Application Programming Interface (API) version, incremented
- * whenever any plugin data types are modified or appended to. */
+ * whenever any plugin data types are modified or appended to.
+ *
+ * You can protect code that needs a higher API than e.g. 200 with:
+ * @code #if GEANY_API_VERSION >= 200
+ * some_newer_function();
+ * #endif @endcode
+ */
#define GEANY_API_VERSION 200
/** The Application Binary Interface (ABI) version, incremented whenever
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5423
http://geany.svn.sourceforge.net/geany/?rev=5423&view=rev
Author: ntrel
Date: 2010-11-22 16:30:44 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
Make GEANY_API_VERSION, GEANY_ABI_VERSION macros instead of enums
so you can protect code with '#if GEANY_API_VERSION >= 200'.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/plugindata.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-22 13:49:38 UTC (rev 5422)
+++ trunk/ChangeLog 2010-11-22 16:30:44 UTC (rev 5423)
@@ -8,6 +8,9 @@
sidebar if there are no plugin tabs.
Don't hide the sidebar on startup if only plugin tabs are visible
(fixes #3101867).
+ * src/plugindata.h:
+ Make GEANY_API_VERSION, GEANY_ABI_VERSION macros instead of enums
+ so you can protect code with '#if GEANY_API_VERSION >= 200'.
2010-11-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2010-11-22 13:49:38 UTC (rev 5422)
+++ trunk/src/plugindata.h 2010-11-22 16:30:44 UTC (rev 5423)
@@ -43,21 +43,16 @@
#include "editor.h" /* GeanyIndentType */
-/* Note: We use enum instead of 'static const gint' to allow its use in global variable
- * initializing, otherwise we get errors like:
- * error: initializer element is not constant */
-/** Versioning data */
-enum {
- /** The Application Programming Interface (API) version, incremented
- * whenever any plugin data types are modified or appended to. */
- GEANY_API_VERSION = 199,
+/** The Application Programming Interface (API) version, incremented
+ * whenever any plugin data types are modified or appended to. */
+#define GEANY_API_VERSION 200
- /** The Application Binary Interface (ABI) version, incremented whenever
- * existing fields in the plugin data types have to be changed or reordered. */
- /* This should usually stay the same if fields are only appended, assuming only pointers to
- * structs and not structs themselves are declared by plugins. */
- GEANY_ABI_VERSION = 68
-};
+/** The Application Binary Interface (ABI) version, incremented whenever
+ * existing fields in the plugin data types have to be changed or reordered.
+ * Changing this forces all plugins to be recompiled before Geany can load them. */
+/* This should usually stay the same if fields are only appended, assuming only pointers to
+ * structs and not structs themselves are declared by plugins. */
+#define GEANY_ABI_VERSION 68
/** Defines a function to check the plugin is safe to load.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5422
http://geany.svn.sourceforge.net/geany/?rev=5422&view=rev
Author: ntrel
Date: 2010-11-22 13:49:38 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
Fix auto-displaying of sidebar tab bar when sidebar is reshown.
Only auto-display symbols and documents tabs when showing the
sidebar if there are no plugin tabs.
Don't hide the sidebar on startup if only plugin tabs are visible
(fixes #3101867).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/main.c
trunk/src/sidebar.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-22 12:45:20 UTC (rev 5421)
+++ trunk/ChangeLog 2010-11-22 13:49:38 UTC (rev 5422)
@@ -2,6 +2,12 @@
* doc/geany.txt, doc/geany.html:
Explain how to grep the source for Scintilla lexer properties.
+ * src/sidebar.c, src/callbacks.c, src/main.c:
+ Fix auto-displaying of sidebar tab bar when sidebar is reshown.
+ Only auto-display symbols and documents tabs when showing the
+ sidebar if there are no plugin tabs.
+ Don't hide the sidebar on startup if only plugin tabs are visible
+ (fixes #3101867).
2010-11-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2010-11-22 12:45:20 UTC (rev 5421)
+++ trunk/src/callbacks.c 2010-11-22 13:49:38 UTC (rev 5422)
@@ -1577,7 +1577,10 @@
ui_prefs.sidebar_visible = ! ui_prefs.sidebar_visible;
- if (! interface_prefs.sidebar_openfiles_visible && ! interface_prefs.sidebar_symbol_visible)
+ /* show built-in tabs if no tabs visible */
+ if (ui_prefs.sidebar_visible &&
+ ! interface_prefs.sidebar_openfiles_visible && ! interface_prefs.sidebar_symbol_visible &&
+ gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.sidebar_notebook)) <= 2)
{
interface_prefs.sidebar_openfiles_visible = TRUE;
interface_prefs.sidebar_symbol_visible = TRUE;
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2010-11-22 12:45:20 UTC (rev 5421)
+++ trunk/src/main.c 2010-11-22 13:49:38 UTC (rev 5422)
@@ -192,7 +192,6 @@
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.window, "menu_show_sidebar1")), FALSE);
ignore_callback = FALSE;
}
- ui_sidebar_show_hide();
toolbar_apply_settings();
toolbar_update_ui();
@@ -1072,6 +1071,8 @@
plugins_load_active();
#endif
+ ui_sidebar_show_hide();
+
/* set the active sidebar page after plugins have been loaded */
gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.sidebar_notebook), ui_prefs.sidebar_page);
Modified: trunk/src/sidebar.c
===================================================================
--- trunk/src/sidebar.c 2010-11-22 12:45:20 UTC (rev 5421)
+++ trunk/src/sidebar.c 2010-11-22 13:49:38 UTC (rev 5422)
@@ -1043,6 +1043,10 @@
g_signal_connect(main_widgets.sidebar_notebook, "page-removed",
G_CALLBACK(sidebar_tabs_show_hide), NULL);
+
+ /* tabs may have changed when sidebar is reshown */
+ g_signal_connect(main_widgets.sidebar_notebook, "show",
+ G_CALLBACK(sidebar_tabs_show_hide), NULL);
}
sidebar_tabs_show_hide(GTK_NOTEBOOK(main_widgets.sidebar_notebook), NULL, 0, NULL);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5421
http://geany.svn.sourceforge.net/geany/?rev=5421&view=rev
Author: ntrel
Date: 2010-11-22 12:45:20 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
Explain how to grep the source for Scintilla lexer properties.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-21 17:40:08 UTC (rev 5420)
+++ trunk/ChangeLog 2010-11-22 12:45:20 UTC (rev 5421)
@@ -1,7 +1,13 @@
+2010-11-22 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * doc/geany.txt, doc/geany.html:
+ Explain how to grep the source for Scintilla lexer properties.
+
+
2010-11-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* data/filetypes.xml:
- Add 'instanceif' keyword for PHP (closes #3109330).
+ Add 'instanceof' keyword for PHP (closes #3109330).
2010-11-18 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2010-11-21 17:40:08 UTC (rev 5420)
+++ trunk/doc/geany.html 2010-11-22 12:45:20 UTC (rev 5421)
@@ -4347,6 +4347,11 @@
<h4><a class="toc-backref" href="#id181" id="lexer-properties-section" name="lexer-properties-section">[lexer_properties] Section</a></h4>
<p>Here any special properties for the Scintilla lexer can be set in the
format <tt class="docutils literal"><span class="pre">key.name.field=some.value</span></tt>.</p>
+<p>Properties Geany uses are listed in the system filetype files. To find
+other properties you need Geany's source code:</p>
+<pre class="literal-block">
+egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
+</pre>
</div>
<div class="section">
<h4><a class="toc-backref" href="#id182" id="settings-section" name="settings-section">[settings] Section</a></h4>
@@ -6354,7 +6359,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2010-11-17 17:44 UTC.
+Generated on: 2010-11-22 12:42 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>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2010-11-21 17:40:08 UTC (rev 5420)
+++ trunk/doc/geany.txt 2010-11-22 12:45:20 UTC (rev 5421)
@@ -3642,7 +3642,12 @@
Here any special properties for the Scintilla lexer can be set in the
format ``key.name.field=some.value``.
+Properties Geany uses are listed in the system filetype files. To find
+other properties you need Geany's source code::
+ egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
+
+
[settings] Section
``````````````````
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5420
http://geany.svn.sourceforge.net/geany/?rev=5420&view=rev
Author: eht16
Date: 2010-11-21 17:40:08 +0000 (Sun, 21 Nov 2010)
Log Message:
-----------
Add 'instanceif' keyword for PHP (closes #3109330).
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/filetypes.xml
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-18 18:53:12 UTC (rev 5419)
+++ trunk/ChangeLog 2010-11-21 17:40:08 UTC (rev 5420)
@@ -1,3 +1,9 @@
+2010-11-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * data/filetypes.xml:
+ Add 'instanceif' keyword for PHP (closes #3109330).
+
+
2010-11-18 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/build.c, src/dialogs.c, src/dialogs.h, src/callbacks.c:
Modified: trunk/data/filetypes.xml
===================================================================
--- trunk/data/filetypes.xml 2010-11-18 18:53:12 UTC (rev 5419)
+++ trunk/data/filetypes.xml 2010-11-21 17:40:08 UTC (rev 5420)
@@ -77,7 +77,7 @@
javascript=abs abstract acos anchor asin atan atan2 big bold boolean break byte case catch ceil char charAt charCodeAt class concat const continue cos Date debugger default delete do double else enum escape eval exp export extends false final finally fixed float floor fontcolor fontsize for fromCharCode function goto if implements import in indexOf Infinity instanceof int interface isFinite isNaN italics join lastIndexOf length link log long Math max MAX_VALUE min MIN_VALUE NaN native NEGATIVE_INFINITY new null Number package parseFloat parseInt pop POSITIVE_INFINITY pow private protected public push random return reverse round shift short sin slice small sort splice split sqrt static strike string String sub substr substring sup super switch synchronized tan this throw throws toLowerCase toString toUpperCase transient true try typeof undefined unescape unshift valueOf var void volatile while with
vbscript=and as boolean byref byte byval call case class const continue currency date dim do double each else elseif empty end error exit false for function get global goto if in integer long loop me new next not nothing object on optional or private property public put redim rem resume select set single string sub then to true type until variant wend while with
python=and assert break class continue complex def del elif else except exec finally for from global if import in inherit is int lambda not or pass print raise return tuple try unicode while yield long float str list
-php=abstract and array as bool boolean break case catch cfunction __class__ class clone const continue declare default die __dir__ directory do double echo else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval exception exit extends false __file__ final float for foreach __function__ function goto global if implements include include_once int integer interface isset __line__ list __method__ namespace __namespace__ new null object old_function or parent php_user_filter print private protected public real require require_once resource return __sleep static stdclass string switch this throw true try unset use var __wakeup while xor
+php=abstract and array as bool boolean break case catch cfunction __class__ class clone const continue declare default die __dir__ directory do double echo else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval exception exit extends false __file__ final float for foreach __function__ function goto global if implements include include_once instanceof int integer interface isset __line__ list __method__ namespace __namespace__ new null object old_function or parent php_user_filter print private protected public real require require_once resource return __sleep static stdclass string switch this throw true try unset use var __wakeup while xor
sgml=ELEMENT DOCTYPE ATTLIST ENTITY NOTATION
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5419
http://geany.svn.sourceforge.net/geany/?rev=5419&view=rev
Author: ntrel
Date: 2010-11-18 18:53:12 +0000 (Thu, 18 Nov 2010)
Log Message:
-----------
Improve dialogs_show_input() documentation.
Modified Paths:
--------------
trunk/src/dialogs.c
Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c 2010-11-18 18:27:01 UTC (rev 5418)
+++ trunk/src/dialogs.c 2010-11-18 18:53:12 UTC (rev 5419)
@@ -1035,8 +1035,9 @@
/** Asks the user for text input.
* @param title Dialog title.
* @param parent The currently focused window, usually @c geany->main_widgets->window.
- * @param label_text Input label text.
- * @param default_text Text to display in the input.
+ * @c NULL can be used but is discouraged due to window manager effects.
+ * @param label_text Label text, or @c NULL.
+ * @param default_text Text to display in the input field, or @c NULL.
* @return New copy of user input or @c NULL if cancelled.
* @since 0.20. */
gchar *dialogs_show_input(const gchar *title, GtkWindow *parent, const gchar *label_text,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5416
http://geany.svn.sourceforge.net/geany/?rev=5416&view=rev
Author: ntrel
Date: 2010-11-18 17:51:15 +0000 (Thu, 18 Nov 2010)
Log Message:
-----------
Don't change default build command entry color when cancelling
label editing.
Make dialogs_show_input() return NULL when cancelled.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
trunk/src/callbacks.c
trunk/src/dialogs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-18 16:25:11 UTC (rev 5415)
+++ trunk/ChangeLog 2010-11-18 17:51:15 UTC (rev 5416)
@@ -5,6 +5,10 @@
command label.
Add 'parent' argument to some dialogs_show_input*() functions because
the dialog parent may not always be the main window.
+ * src/build.c, src/dialogs.c, src/callbacks.c:
+ Don't change default build command entry color when cancelling
+ label editing.
+ Make dialogs_show_input() return NULL when cancelled.
2010-11-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2010-11-18 16:25:11 UTC (rev 5415)
+++ trunk/src/build.c 2010-11-18 17:51:15 UTC (rev 5416)
@@ -1822,6 +1822,9 @@
gchar *str = dialogs_show_input(_("Set menu item label"),
NULL, NULL, old);
+ if (!str)
+ return;
+
gtk_button_set_label(GTK_BUTTON(wid), str);
g_free(str);
r->used_dst = TRUE;
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2010-11-18 16:25:11 UTC (rev 5415)
+++ trunk/src/callbacks.c 2010-11-18 17:51:15 UTC (rev 5416)
@@ -1437,11 +1437,12 @@
format = ui_prefs.custom_date_format;
else
{
- setptr(ui_prefs.custom_date_format,
- dialogs_show_input(_("Custom Date Format"), GTK_WINDOW(main_widgets.window),
+ gchar *str = dialogs_show_input(_("Custom Date Format"), GTK_WINDOW(main_widgets.window),
_("Enter here a custom date and time format. "
"You can use any conversion specifiers which can be used with the ANSI C strftime function."),
- ui_prefs.custom_date_format));
+ ui_prefs.custom_date_format);
+ if (str)
+ setptr(ui_prefs.custom_date_format, str);
return;
}
Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c 2010-11-18 16:25:11 UTC (rev 5415)
+++ trunk/src/dialogs.c 2010-11-18 17:51:15 UTC (rev 5416)
@@ -1032,13 +1032,13 @@
}
-/* Returns: newly allocated string - a copy of either the entry text or default_text. */
+/* Returns: new copy of user input or NULL if cancelled. */
gchar *dialogs_show_input(const gchar *title, GtkWindow *parent, const gchar *label_text,
const gchar *default_text)
{
dialog_input = NULL;
dialogs_show_input_full(title, parent, label_text, default_text, FALSE, on_dialog_input, NULL);
- return NVL(dialog_input, g_strdup(default_text));
+ return dialog_input;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.