Revision: 3530
http://geany.svn.sourceforge.net/geany/?rev=3530&view=rev
Author: eht16
Date: 2009-01-30 18:10:27 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
Add a few notes about basic plugin writing guidelines.
Modified Paths:
--------------
trunk/ChangeLog
trunk/HACKING
trunk/doc/plugins.dox
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-01-30 16:12:25 UTC (rev 3529)
+++ trunk/ChangeLog 2009-01-30 18:10:27 UTC (rev 3530)
@@ -6,6 +6,8 @@
Allow entering paths prefixed with '~' in the filebrowser path entry.
Show the full path for files and folders in the filebrowser plugin
as tooltips.
+ * HACKING, doc/plugins.dox:
+ Add a few notes about basic plugin writing guidelines.
2009-01-29 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2009-01-30 16:12:25 UTC (rev 3529)
+++ trunk/HACKING 2009-01-30 18:10:27 UTC (rev 3530)
@@ -20,6 +20,8 @@
* See plugins/demoplugin.c for a very basic example plugin.
* src/plugins.c loads and unloads plugins (you shouldn't need to read
this really).
+* The API documentation contains a few basic guidelines and hints to
+ write plugins.
You should generate and read the plugin API documentation, see below.
Modified: trunk/doc/plugins.dox
===================================================================
--- trunk/doc/plugins.dox 2009-01-30 16:12:25 UTC (rev 3529)
+++ trunk/doc/plugins.dox 2009-01-30 18:10:27 UTC (rev 3530)
@@ -44,6 +44,7 @@
* - @link plugindata.h Main Datatypes and Macros @endlink
* - @link pluginsymbols.c Plugin Symbols @endlink
* - @link signals Plugin Signals @endlink
+ * - @link guidelines Plugin Writing Guidelines @endlink
*
* @note Some of these pages are also listed in Related Pages.
*/
@@ -248,6 +249,77 @@
*
*
*
+ * @page guidelines Plugin Writing Guidelines
+ *
+ * @section intro Introduction
+ *
+ * The following hints and guidelines are only recommendations. Nobody is forced to follow
+ * them at all.
+ *
+ * @section general General notes
+ *
+ * @subsection ideas Getting a plugin idea
+ *
+ * If you want to write a plugin but don't know yet what it should do, have a look at
+ * http://www.geany.org/Support/PluginWishlist to get an idea about what users wish.
+ *
+ * @subsection code Managing the source code
+ *
+ * For authors of plugins for Geany, we created a dedicated @a geany-plugins project at
+ * Sourceforge to ease development of plugins and help new authors.
+ * Project website: http://sourceforge.net/projects/geany-plugins
+ *
+ * Each plugin author is welcome to use these services. To do so, you need an account at
+ * Sourceforge. You can easily register at (http://sourceforge.net/account/registration/).
+ * After you successfully created an account,
+ * tell your account name Enrico or Nick and you will write access to the SVN repository
+ * (http://geany-plugins.svn.sourceforge.net/viewvc/geany-plugins/).
+ * Then you can use the repository for your own plugin.
+ *
+ * Authors using this service should subscribe to the
+ * geany-plugins-commits at uvena.de and geany-plugins-tracker at uvena.de
+ * mailing lists(see my previous post) to stay up to date with changes.
+ * General plugin discussion can happen on the normal geany at uvena.de or
+ * geany-devel at uvena.de lists.
+ *
+ * At time of writing, there are some plugins already available in the
+ * repository. Feel free to use any of these plugins as a start for your own,
+ * maybe by copying the directory structure and the autotools files
+ * (Makefile.am, configure.in, ...). Most of the available plugins are also ready for
+ * i18n support, just for reference.
+ *
+ * New plugins should be imported into a new directory inside the trunk/
+ * directory. There are also the common branches and tags directories, use
+ * them as needed, use always a subdirectory for your own plugin.
+ *
+ * We encourage authors using this service to only commit changes to their
+ * own plugin and not to others' plugins. Instead just send patches to
+ * geany-devel at uvena.de or the plugin author directly.
+ *
+ * (the full announcement of this service can be found at
+ * http://lists.uvena.de/geany/2008-April/003225.html)
+ *
+ *
+ * @section paths Installation paths
+ *
+ * - The plugin binary (@c pluginname.so) should be installed in Geany's libdir. This is
+ * necessary so that Geany can find the plugin.
+ * An easy way to retrieve Geany's libdir is to use the pkg-config tool, e.g. @code
+ * `$PKG_CONFIG --variable=libdir geany`/ geany
+ * @endcode
+ * - If your plugin creates other binary files like helper programs or helper libraries,
+ * they should go into @c $prefix/bin (for programs, ideally prefixed with @a geany),
+ * additional libraries should be installed in Geany's libdir, maybe in a subdirectory.
+ * - Plugins should install their documentation files (README, NEWS, ChangeLog, licences and
+ * other documentation files) into the common documentation directory
+ * @c $prefix/share/doc/geany-plugins/$pluginname/
+ * - Translation files should be installed normally into @c $prefix/share/locale. There is no
+ * need to use Geany's translation directory. To set up translation support properly and
+ * for additional information, see main_locale_init().
+ * - Do @a never install anything into a user's home directory like installing
+ * the plugin binary in @c ~/.config/geany/plugins/.
+ *
+ *
* @page howto Plugin Howto
*
* @section intro Introduction
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3528
http://geany.svn.sourceforge.net/geany/?rev=3528&view=rev
Author: eht16
Date: 2009-01-30 15:39:08 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
If the VTE has a dirty command line, print the resulting warning also to the debug messages.
Modified Paths:
--------------
trunk/src/build.c
trunk/src/vte.c
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2009-01-29 17:24:31 UTC (rev 3527)
+++ trunk/src/build.c 2009-01-30 15:39:08 UTC (rev 3528)
@@ -676,8 +676,11 @@
g_free(utf8_working_dir);
}
if (! vte_send_cmd(vte_cmd))
+ {
ui_set_statusbar(FALSE,
_("Could not execute the file in the VTE because it probably contains a command."));
+ geany_debug("Could not execute the file in the VTE because it probably contains a command.");
+ }
/* show the VTE */
gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_VTE);
Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c 2009-01-29 17:24:31 UTC (rev 3527)
+++ trunk/src/vte.c 2009-01-30 15:39:08 UTC (rev 3528)
@@ -653,8 +653,12 @@
gchar *quoted_path = g_shell_quote(path);
gchar *cmd = g_strconcat("cd ", quoted_path, "\n", NULL);
if (! vte_send_cmd(cmd))
+ {
ui_set_statusbar(FALSE,
_("Could not change the directory in the VTE because it probably contains a command."));
+ geany_debug(
+ "Could not change the directory in the VTE because it probably contains a command.");
+ }
g_free(quoted_path);
g_free(cmd);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3525
http://geany.svn.sourceforge.net/geany/?rev=3525&view=rev
Author: eht16
Date: 2009-01-28 19:55:23 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
Remove the square brackets around Hidden preferences table titles to avoid confusion with section titles in the config file.
Add the new hidden pref 'allow_always_save'.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-01-28 19:30:18 UTC (rev 3524)
+++ trunk/ChangeLog 2009-01-28 19:55:23 UTC (rev 3525)
@@ -24,6 +24,10 @@
optional, plugins can omit it if not needed.
Add a Help button next to the Configure button in the plugin manager
dialog to easily open a plugin's documentation if available.
+ * doc/geany.txt, doc/geany.html:
+ Remove the square brackets around Hidden preferences table titles to
+ avoid confusion with section titles in the config file.
+ Add the new hidden pref 'allow_always_save'.
2009-01-27 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2009-01-28 19:30:18 UTC (rev 3524)
+++ trunk/doc/geany.html 2009-01-28 19:55:23 UTC (rev 3525)
@@ -4050,7 +4050,7 @@
</tr>
</thead>
<tbody valign="top">
-<tr><td><strong>[editor]</strong></td>
+<tr><td><strong>Editor related</strong></td>
<td> </td>
<td> </td>
</tr>
@@ -4075,10 +4075,12 @@
<td>Whether to allow completion of snippets
when editing an existing line (i.e. there
is some text after the current cursor
-position on the line).</td>
+position on the line). Only used when the
+keybinding <tt class="docutils literal"><span class="pre">Complete</span> <span class="pre">snippet</span></tt> is set to
+<tt class="docutils literal"><span class="pre">Space</span></tt>.</td>
<td>false</td>
</tr>
-<tr><td><strong>[interface]</strong></td>
+<tr><td><strong>Interface related</strong></td>
<td> </td>
<td> </td>
</tr>
@@ -4088,7 +4090,17 @@
available with GTK 2.12 or above).</td>
<td>true</td>
</tr>
-<tr><td><strong>[VTE]</strong></td>
+<tr><td>allow_always_save</td>
+<td>Whether files can be saved always, even if
+they don't have any changes. By default,
+the Save buttons and menu items are
+disabled when a file is unchanged. When
+setting this option to true, the Save
+buttons and menu items are always active
+and files can be saved.</td>
+<td>false</td>
+</tr>
+<tr><td><strong>VTE related</strong></td>
<td> </td>
<td> </td>
</tr>
@@ -4669,7 +4681,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference external" href="geany.txt">View document source</a>.
-Generated on: 2009-01-22 20:17 UTC.
+Generated on: 2009-01-28 19:54 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2009-01-28 19:30:18 UTC (rev 3524)
+++ trunk/doc/geany.txt 2009-01-28 19:55:23 UTC (rev 3525)
@@ -3579,7 +3579,7 @@
================================ =========================================== ==================
Key Description Default
================================ =========================================== ==================
-**[editor]**
+**Editor related**
brace_match_ltgt Whether to highlight <, > angle brackets. false
show_editor_scrollbars Whether to display scrollbars. If set to true
false, the horizontal and vertical
@@ -3591,12 +3591,21 @@
complete_snippets_whilst_editing Whether to allow completion of snippets false
when editing an existing line (i.e. there
is some text after the current cursor
- position on the line).
-**[interface]**
+ position on the line). Only used when the
+ keybinding ``Complete snippet`` is set to
+ ``Space``.
+**Interface related**
show_symbol_list_expanders Whether to show or hide the small expander true
icons on the symbol list treeview (only
available with GTK 2.12 or above).
-**[VTE]**
+allow_always_save Whether files can be saved always, even if false
+ they don't have any changes. By default,
+ the Save buttons and menu items are
+ disabled when a file is unchanged. When
+ setting this option to true, the Save
+ buttons and menu items are always active
+ and files can be saved.
+**VTE related**
emulation Terminal emulation mode. Only change this xterm
if you have VTE termcap files other than
``vte/termcap/xterm``.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3522
http://geany.svn.sourceforge.net/geany/?rev=3522&view=rev
Author: eht16
Date: 2009-01-28 17:55:58 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
Mention necessary header includes in the plugin signal descriptions.
Add missing header includes for the demoplugin.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/plugins.dox
trunk/plugins/demoplugin.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-01-28 17:22:34 UTC (rev 3521)
+++ trunk/ChangeLog 2009-01-28 17:55:58 UTC (rev 3522)
@@ -11,6 +11,9 @@
Use the selection 'changed' signal of the treeview to update the
popup menu items and show the popup menu on mouse button press events
so right clicking on items will select them first.
+ * doc/plugins.dox, plugins/demoplugin.h:
+ Mention necessary header includes in the plugin signal descriptions.
+ Add missing header includes for the demoplugin.
2009-01-27 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/doc/plugins.dox
===================================================================
--- trunk/doc/plugins.dox 2009-01-28 17:22:34 UTC (rev 3521)
+++ trunk/doc/plugins.dox 2009-01-28 17:55:58 UTC (rev 3522)
@@ -83,6 +83,9 @@
* @endsignalproto
* @signaldesc
* Sent when a new %document is created.
+ *
+ * You need to include "document.h" for the declaration of GeanyDocument.
+ *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the new document.
* @param user_data user data.
@@ -94,6 +97,9 @@
* @endsignalproto
* @signaldesc
* Sent when a new %document is opened.
+ *
+ * You need to include "document.h" for the declaration of GeanyDocument.
+ *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the opened document.
* @param user_data user data.
@@ -105,6 +111,9 @@
* @endsignalproto
* @signaldesc
* Sent when a new %document is saved.
+ *
+ * You need to include "document.h" for the declaration of GeanyDocument.
+ *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the saved document.
* @param user_data user data.
@@ -116,6 +125,9 @@
* @endsignalproto
* @signaldesc
* Sent when switching notebook pages.
+ *
+ * You need to include "document.h" for the declaration of GeanyDocument.
+ *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the current document.
* @param user_data user data.
@@ -127,6 +139,9 @@
* @endsignalproto
* @signaldesc
* Sent before closing a document.
+ *
+ * You need to include "document.h" for the declaration of GeanyDocument.
+ *
* @param obj a GeanyObject instance, should be ignored.
* @param doc the document about to be closed.
* @param user_data user data.
@@ -176,8 +191,12 @@
* @signaldesc
* Sent before the popup menu of the editing widget is shown. This can be used to modify or extend
* the popup menu.
+ *
* @note You can add menu items from @c plugin_init() using @c geany->main_widgets->editor_menu,
* remembering to destroy them in @c plugin_cleanup().
+ *
+ * You need to include "document.h" for the declaration of GeanyDocument.
+ *
* @param obj a GeanyObject instance, should be ignored.
* @param word the current word (in UTF-8 encoding) below the cursor position
where the popup menu will be opened.
@@ -215,6 +234,9 @@
* care about the return value; make sure to return TRUE only if it is necessary
* and in the correct situations.
*
+ * You need to include "editor.h" for the declaration of GeanyEditor and "Scintilla.h" for
+ * SCNotification.
+ *
* @param obj a GeanyObject instance, should be ignored.
* @param editor The current GeanyEditor.
* @param nt A pointer to the SCNotification struct which holds additional information for
Modified: trunk/plugins/demoplugin.c
===================================================================
--- trunk/plugins/demoplugin.c 2009-01-28 17:22:34 UTC (rev 3521)
+++ trunk/plugins/demoplugin.c 2009-01-28 17:55:58 UTC (rev 3522)
@@ -37,8 +37,11 @@
#include "geany.h" /* for the GeanyApp data type */
#include "support.h" /* for the _() translation macro (see also po/POTFILES.in) */
+#include "editor.h" /* for the declaration of the GeanyEditor struct, not strictly necessary
+ as it will be also included by plugindata.h */
+#include "document.h" /* for the declaration of the GeanyDocument struct */
#include "ui_utils.h"
-#include "Scintilla.h" /* for the SCNotification struct */
+#include "Scintilla.h" /* for the SCNotification struct */
#include "plugindata.h" /* this defines the plugin API */
#include "geanyfunctions.h" /* this wraps geany_functions function pointers */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.