Revision: 4373
http://geany.svn.sourceforge.net/geany/?rev=4373&view=rev
Author: eht16
Date: 2009-10-26 22:15:27 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Again very minor formatting
Modified Paths:
--------------
trunk/src/build.c
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2009-10-26 22:14:08 UTC (rev 4372)
+++ trunk/src/build.c 2009-10-26 22:15:27 UTC (rev 4373)
@@ -426,7 +426,8 @@
}
break;
case GEANY_GBG_EXEC:
- if ((doc = document_get_current()) == NULL) ft = doc->file_type;
+ if ((doc = document_get_current()) == NULL)
+ ft = doc->file_type;
switch (src)
{
case GEANY_BCS_DEF: return exec_def;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4372
http://geany.svn.sourceforge.net/geany/?rev=4372&view=rev
Author: eht16
Date: 2009-10-26 22:14:08 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Very minor formatting
Modified Paths:
--------------
trunk/src/build.c
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2009-10-26 18:13:50 UTC (rev 4371)
+++ trunk/src/build.c 2009-10-26 22:14:08 UTC (rev 4372)
@@ -430,9 +430,9 @@
switch (src)
{
case GEANY_BCS_DEF: return exec_def;
- case GEANY_BCS_FT: return ft? ft->execcmds: NULL;
- case GEANY_BCS_HOME_FT: return ft? ft->homeexeccmds: NULL;
- case GEANY_BCS_PROJ_FT: return ft? ft->projexeccmds: NULL;
+ case GEANY_BCS_FT: return ft ? ft->execcmds: NULL;
+ case GEANY_BCS_HOME_FT: return ft ? ft->homeexeccmds: NULL;
+ case GEANY_BCS_PROJ_FT: return ft ? ft->projexeccmds: NULL;
case GEANY_BCS_PREF: return exec_pref;
case GEANY_BCS_PROJ: return exec_proj;
default: return NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4371
http://geany.svn.sourceforge.net/geany/?rev=4371&view=rev
Author: ntrel
Date: 2009-10-26 18:13:50 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Improve 'Detect from file' indentation pref by ignoring lines with
indentation wider than 24 characters as this is more likely to be
alignment than indentation.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-26 15:45:12 UTC (rev 4370)
+++ trunk/ChangeLog 2009-10-26 18:13:50 UTC (rev 4371)
@@ -19,6 +19,10 @@
* src/prefs.c, src/ui_utils.c, doc/geany.txt, doc/geany.html:
Disable switching the sidebar to the right on Windows as it will
probably fail like the Split Window plugin.
+ * src/document.c:
+ Improve 'Detect from file' indentation pref by ignoring lines with
+ indentation wider than 24 characters as this is more likely to be
+ alignment than indentation.
2009-10-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2009-10-26 15:45:12 UTC (rev 4370)
+++ trunk/src/document.c 2009-10-26 18:13:50 UTC (rev 4371)
@@ -1097,6 +1097,11 @@
gint pos = sci_get_position_from_line(sci, line);
gchar c;
+ /* most code will have indent total <= 24, otherwise it's more likely to be
+ * alignment than indentation */
+ if (sci_get_line_indentation(sci, line) > 24)
+ continue;
+
c = sci_get_char_at(sci, pos);
if (c == '\t')
tabs++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4370
http://geany.svn.sourceforge.net/geany/?rev=4370&view=rev
Author: ntrel
Date: 2009-10-26 15:45:12 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Disable switching the sidebar to the right on Windows as it will
probably fail like the Split Window plugin.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/prefs.c
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-26 15:31:00 UTC (rev 4369)
+++ trunk/ChangeLog 2009-10-26 15:45:12 UTC (rev 4370)
@@ -16,6 +16,9 @@
* plugins/filebrowser.c:
Fix packing configure widgets equally.
Use spacing multiples of 6 as recommended by Gnome HIG.
+ * src/prefs.c, src/ui_utils.c, doc/geany.txt, doc/geany.html:
+ Disable switching the sidebar to the right on Windows as it will
+ probably fail like the Split Window plugin.
2009-10-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2009-10-26 15:31:00 UTC (rev 4369)
+++ trunk/doc/geany.html 2009-10-26 15:45:12 UTC (rev 4370)
@@ -6,7 +6,7 @@
<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="2009-10-22" />
+<meta name="date" content="2009-10-23" />
<style type="text/css">
/*
@@ -139,7 +139,7 @@
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2009-10-22</td></tr>
+<td>2009-10-23</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.19</td></tr>
</tbody>
@@ -2014,7 +2014,12 @@
change between documents (see <a class="reference" href="#switching-between-documents">Switching between documents</a>) and
to perform some common operations such as saving, closing and reloading.</dd>
<dt>Position</dt>
-<dd>Whether to place the sidebar on the left or right of the editor window.</dd>
+<dd><p class="first">Whether to place the sidebar on the left or right of the editor window.</p>
+<div class="last note">
+<p class="first admonition-title">Note</p>
+<p class="last">This option is not available on Windows.</p>
+</div>
+</dd>
</dl>
</div>
<div class="section">
@@ -5804,7 +5809,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2009-10-23 16:09 UTC.
+Generated on: 2009-10-26 15:39 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 2009-10-26 15:31:00 UTC (rev 4369)
+++ trunk/doc/geany.txt 2009-10-26 15:45:12 UTC (rev 4370)
@@ -1693,6 +1693,9 @@
Position
Whether to place the sidebar on the left or right of the editor window.
+ .. note::
+ This option is not available on Windows.
+
Fonts
`````
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2009-10-26 15:31:00 UTC (rev 4369)
+++ trunk/src/prefs.c 2009-10-26 15:45:12 UTC (rev 4370)
@@ -1636,6 +1636,9 @@
"toggled", G_CALLBACK(on_open_encoding_toggled), NULL);
}
+#ifdef G_OS_WIN32
+ gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "radio_sidebar_right"), FALSE);
+#endif
prefs_init_dialog();
gtk_window_present(GTK_WINDOW(ui_widgets.prefs_dialog));
}
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2009-10-26 15:31:00 UTC (rev 4369)
+++ trunk/src/ui_utils.c 2009-10-26 15:45:12 UTC (rev 4370)
@@ -1820,6 +1820,8 @@
void ui_swap_sidebar_pos(void)
{
+/* reparenting scintilla will probably fail on Windows */
+#ifndef G_OS_WIN32
GtkWidget *pane = ui_lookup_widget(main_widgets.window, "hpaned1");
GtkWidget *left = gtk_paned_get_child1(GTK_PANED(pane));
GtkWidget *right = gtk_paned_get_child2(GTK_PANED(pane));
@@ -1833,6 +1835,7 @@
gtk_paned_set_position(GTK_PANED(pane), pane->allocation.width
- gtk_paned_get_position(GTK_PANED(pane)));
+#endif
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4368
http://geany.svn.sourceforge.net/geany/?rev=4368&view=rev
Author: ntrel
Date: 2009-10-26 15:16:04 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Add 'Doc-comments' plugin API subsection.
Modified Paths:
--------------
trunk/ChangeLog
trunk/HACKING
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-26 14:59:47 UTC (rev 4367)
+++ trunk/ChangeLog 2009-10-26 15:16:04 UTC (rev 4368)
@@ -11,6 +11,8 @@
* src/build.c, src/build.h:
Move function doc-comments to build.c so they stay in sync. Note:
these functions are still not in the API.
+ * HACKING:
+ Add 'Doc-comments' plugin API subsection.
2009-10-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2009-10-26 14:59:47 UTC (rev 4367)
+++ trunk/HACKING 2009-10-26 15:16:04 UTC (rev 4368)
@@ -66,8 +66,8 @@
See the top of each ``src/*.c`` file for a brief description of what
it's for.
-Keeping the plugin ABI stable
------------------------------
+Plugin API code
+---------------
Please be aware that anything with a doc-comment (a comment with an
extra asterix: ``/**``) is something in the plugin API. Things like
enums and structs can usually still be appended to, ensuring that all
@@ -80,13 +80,15 @@
structs by plugins, not just for accessing struct members through
a pointer.
+Keeping the plugin ABI stable
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Before the 1.0 release series, the ABI can change when necessary, and
even the API can change. An ABI change just means that all plugins will
not load and they must be rebuilt. An API change means that some plugins
might not build correctly.
If you're reordering or changing existing elements of structs that are
-used as part of the plugin API, you should increment GEANY_ABI_VERSION
+used as part of the plugin API, you must increment GEANY_ABI_VERSION
in plugindata.h. This is usually not needed if you're just appending
fields to structs. The GEANY_API_VERSION value should be incremented
for any changes to the plugin API, including appending elements.
@@ -102,6 +104,14 @@
* Don't add any array fields to structs in case we want to change the
array size later.
+Doc-comments
+^^^^^^^^^^^^
+* The @file tag can go in the source .c file, but use the .h header name so
+ it appears normally in the generated documentation. See ui_utils.c for an
+ example.
+* Function doc-comments should always go in the source file, not the
+ header, so they can be updated if/when the implementation changes.
+
Glade
-----
Use the code generation features of Glade instead of editing interface.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4367
http://geany.svn.sourceforge.net/geany/?rev=4367&view=rev
Author: ntrel
Date: 2009-10-26 14:59:47 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Move function doc-comments to build.c so they stay in sync. Note:
these functions are still not in the API.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
trunk/src/build.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-26 13:06:51 UTC (rev 4366)
+++ trunk/ChangeLog 2009-10-26 14:59:47 UTC (rev 4367)
@@ -8,6 +8,9 @@
sciwrappers.h, build.h. (This helps to get compiler warnings for uses
of functions not in the API).
Warning: any plugins that include these headers should remove them.
+ * src/build.c, src/build.h:
+ Move function doc-comments to build.c so they stay in sync. Note:
+ these functions are still not in the API.
2009-10-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2009-10-26 13:06:51 UTC (rev 4366)
+++ trunk/src/build.c 2009-10-26 14:59:47 UTC (rev 4367)
@@ -201,7 +201,7 @@
gboolean printbuildcmds = PRINTBUILDCMDS;
static GeanyBuildCommand **cl[GEANY_GBG_COUNT][GEANY_BCS_COUNT] = {
- /* GEANY_BCS_DEF, GEANY_BCS_FT, GEANY_BCS_HOME_FT, GEANY_BCS_PREF,
+ /* GEANY_BCS_DEF, GEANY_BCS_FT, GEANY_BCS_HOME_FT, GEANY_BCS_PREF,
* GEANY_BCS_FT_PROJ, GEANY_BCS_PROJ */
{ &ft_def, NULL, NULL, NULL, NULL, NULL },
{ &non_ft_def, NULL, NULL, &non_ft_pref, NULL, &non_ft_proj },
@@ -306,7 +306,7 @@
gint below, gint *from)
{
/* Note: parameter below used in macros above */
-
+
GeanyFiletype *ft = NULL;
gint sink, *fr = &sink;
@@ -444,7 +444,23 @@
}
-/* remove the specified command, cmd < 0 remove whole group */
+/** Remove the specified Build menu item.
+ *
+ * Makes the specified menu item configuration no longer exist. This
+ * is different to setting fields to blank because the menu item
+ * will be deleted from the configuration file on saving
+ * (except the system filetypes settings @see Build Menu Configuration
+ * section of the Manual).
+ *
+ * @param src the source of the menu item to remove.
+ * @param grp the group of the command to remove.
+ * @param cmd the index (from 0) of the command within the group. A negative
+ * value will remove the whole group.
+ *
+ * If any parameter is out of range does nothing.
+ *
+ * @see build_menu_update
+ **/
void build_remove_menu_item(GeanyBuildSource src, GeanyBuildGroup grp, gint cmd)
{
GeanyBuildCommand *bc;
@@ -462,7 +478,20 @@
}
-/* get the build build command for the specified menu item */
+/** Get the @a GeanyBuildCommand structure for the specified Build menu item.
+ *
+ * Get the command for any menu item specified by @a src, @a grp and @a cmd even if it is
+ * hidden by higher priority commands.
+ *
+ * @param src the source of the specified menu item.
+ * @param grp the group of the specified menu item.
+ * @param cmd the index of the command within the group.
+ *
+ * @return a pointer to the @a GeanyBuildCommand structure or @a NULL if it doesn't exist.
+ * This is a pointer to an internal structure and must not be freed.
+ *
+ * @see build_menu_update
+ **/
GeanyBuildCommand *build_get_menu_item(GeanyBuildSource src, GeanyBuildGroup grp, gint cmd)
{
GeanyBuildCommand *bc;
@@ -475,6 +504,21 @@
}
+/** Get the @a GeanyBuildCommand structure for the menu item.
+ *
+ * Get the current highest priority command specified by @a grp and @a cmd. This is the one
+ * that the menu item will use if activated.
+ *
+ * @param grp the group of the specified menu item.
+ * @param cmd the index of the command within the group.
+ * @param src pointer to @a gint to return which source provided the command. Ignored if @a NULL.
+ * Values are one of @a GeanyBuildSource but returns a signed type not the enum.
+ *
+ * @return a pointer to the @a GeanyBuildCommand structure or @a NULL if it doesn't exist.
+ * This is a pointer to an internal structure and must not be freed.
+ *
+ * @see build_menu_update
+ **/
/* parameter checked version of get_build_cmd for external interface */
GeanyBuildCommand *build_get_current_menu_item(GeanyBuildGroup grp, gint cmd, gint *src)
{
@@ -1373,8 +1417,20 @@
}
-/* Call this whenever build menu items need to be enabled/disabled.
- * Uses current document (if there is one) when doc == NULL */
+/** Update the build menu to reflect changes in configuration or status.
+ *
+ * Sets the labels and number of visible items to match the highest
+ * priority configured commands. Also sets sensitivity if build commands are
+ * running and switches executes to stop when commands are running.
+ *
+ * @param doc The current document, if available, to save looking it up.
+ * If @c NULL it will be looked up.
+ *
+ * Call this after modifying any fields of a GeanyBuildCommand structure.
+ *
+ * @see Build Menu Configuration section of the Manual.
+ *
+ **/
void build_menu_update(GeanyDocument *doc)
{
gint i, cmdcount, cmd, grp;
Modified: trunk/src/build.h
===================================================================
--- trunk/src/build.h 2009-10-26 13:06:51 UTC (rev 4366)
+++ trunk/src/build.h 2009-10-26 14:59:47 UTC (rev 4367)
@@ -181,79 +181,14 @@
/* build menu functions */
-/** Update the build menu to reflect changes in configuration or status.
- *
- * Sets the labels and number of visible items to match the highest
- * priority configured commands. Also sets sensitivity if build commands are
- * running and switches executes to stop when commands are running.
- *
- * @param doc The current document, if available, to save looking it up.
- * If @c NULL it will be looked up.
- *
- * Call this after modifying any fields of a GeanyBuildCommand structure.
- *
- * @see Build Menu Configuration section of the Manual.
- *
- **/
-
void build_menu_update(GeanyDocument *doc);
-
void build_toolbutton_build_clicked(GtkAction *action, gpointer user_data);
-/** Remove the specified Build menu item.
- *
- * Makes the specified menu item configuration no longer exist. This
- * is different to setting fields to blank because the menu item
- * will be deleted from the configuration file on saving
- * (except the system filetypes settings @see Build Menu Configuration
- * section of the Manual).
- *
- * @param src the source of the menu item to remove.
- * @param grp the group of the command to remove.
- * @param cmd the index (from 0) of the command within the group. A negative
- * value will remove the whole group.
- *
- * If any parameter is out of range does nothing.
- *
- * @see build_menu_update
- **/
-
void build_remove_menu_item(GeanyBuildSource src, GeanyBuildGroup grp, gint cmd);
-/** Get the @a GeanyBuildCommand structure for the specified Build menu item.
- *
- * Get the command for any menu item specified by @a src, @a grp and @a cmd even if it is
- * hidden by higher priority commands.
- *
- * @param src the source of the specified menu item.
- * @param grp the group of the specified menu item.
- * @param cmd the index of the command within the group.
- *
- * @return a pointer to the @a GeanyBuildCommand structure or @a NULL if it doesn't exist.
- * This is a pointer to an internal structure and must not be freed.
- *
- * @see build_menu_update
- **/
-
GeanyBuildCommand *build_get_menu_item(GeanyBuildSource src, GeanyBuildGroup grp, gint cmd);
-/** Get the @a GeanyBuildCommand structure for the menu item.
- *
- * Get the current highest priority command specified by @a grp and @a cmd. This is the one
- * that the menu item will use if activated.
- *
- * @param grp the group of the specified menu item.
- * @param cmd the index of the command within the group.
- * @param src pointer to @a gint to return which source provided the command. Ignored if @a NULL.
- * Values are one of @a GeanyBuildSource but returns a signed type not the enum.
- *
- * @return a pointer to the @a GeanyBuildCommand structure or @a NULL if it doesn't exist.
- * This is a pointer to an internal structure and must not be freed.
- *
- * @see build_menu_update
- **/
-
GeanyBuildCommand *build_get_current_menu_item(GeanyBuildGroup grp, gint cmd, gint *src);
BuildMenuItems *build_get_menu_items(gint filetype_idx);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4364
http://geany.svn.sourceforge.net/geany/?rev=4364&view=rev
Author: eht16
Date: 2009-10-25 22:43:15 +0000 (Sun, 25 Oct 2009)
Log Message:
-----------
Add missing API documentation (oops)
Modified Paths:
--------------
trunk/src/ui_utils.c
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2009-10-25 22:27:13 UTC (rev 4363)
+++ trunk/src/ui_utils.c 2009-10-25 22:43:15 UTC (rev 4364)
@@ -1522,12 +1522,18 @@
}
-void ui_widget_modify_font_from_string(GtkWidget *wid, const gchar *str)
+/**
+ * Modifies the font of a widget using gtk_widget_modify_font().
+ *
+ * @param widget The widget.
+ * @param str The font name as expected by pango_font_description_from_string().
+ */
+void ui_widget_modify_font_from_string(GtkWidget *widget, const gchar *str)
{
PangoFontDescription *pfd;
pfd = pango_font_description_from_string(str);
- gtk_widget_modify_font(wid, pfd);
+ gtk_widget_modify_font(widget, pfd);
pango_font_description_free(pfd);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.