Revision: 2349
http://geany.svn.sourceforge.net/geany/?rev=2349&view=rev
Author: eht16
Date: 2008-03-15 04:06:55 -0700 (Sat, 15 Mar 2008)
Log Message:
-----------
Fix wrong directory when choosing project filename in the New Project dialog.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/project.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-14 18:55:30 UTC (rev 2348)
+++ trunk/ChangeLog 2008-03-15 11:06:55 UTC (rev 2349)
@@ -1,3 +1,9 @@
+2008-03-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/projects.c: Fix wrong directory when choosing project filename
+ in the New Project dialog.
+
+
2008-03-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/keybindings.c:
Modified: trunk/src/project.c
===================================================================
--- trunk/src/project.c 2008-03-14 18:55:30 UTC (rev 2348)
+++ trunk/src/project.c 2008-03-15 11:06:55 UTC (rev 2349)
@@ -718,7 +718,15 @@
if (g_path_is_absolute(locale_filename))
{
if (g_file_test(locale_filename, G_FILE_TEST_EXISTS))
- gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), utf8_filename);
+ {
+ /* if the current filename is a directory, we must use
+ * gtk_file_chooser_set_current_folder(which expects a locale filename) otherwise
+ * we end up in the parent directory */
+ if (g_file_test(locale_filename, G_FILE_TEST_IS_DIR))
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), locale_filename);
+ else
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), utf8_filename);
+ }
else /* if the file doesn't yet exist, use at least the current directory */
{
gchar *locale_dir = g_path_get_dirname(locale_filename);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2347
http://geany.svn.sourceforge.net/geany/?rev=2347&view=rev
Author: ntrel
Date: 2008-03-14 10:44:43 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
Replace Plugins chapter with 'Writing plugins' section.
Add generating plugin API documentation section.
Replace 'Modifying data types' with 'Keeping the plugin ABI stable'
section.
Add note about using -ansi.
Modified Paths:
--------------
trunk/ChangeLog
trunk/HACKING
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-14 17:28:37 UTC (rev 2346)
+++ trunk/ChangeLog 2008-03-14 17:44:43 UTC (rev 2347)
@@ -7,6 +7,12 @@
Make KeyBinding name and label fields non-const strings so they can
be freed by any plugins that need to use malloc'd strings.
Document KeyCallback typedef.
+ * HACKING:
+ Replace Plugins chapter with 'Writing plugins' section.
+ Add generating plugin API documentation section.
+ Replace 'Modifying data types' with 'Keeping the plugin ABI stable'
+ section.
+ Add note about using -ansi.
2008-03-14 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2008-03-14 17:28:37 UTC (rev 2346)
+++ trunk/HACKING 2008-03-14 17:44:43 UTC (rev 2347)
@@ -4,6 +4,23 @@
codebase. You should be aware of the open source licenses used - see
the README file or the documentation.
+Writing plugins
+---------------
+You should generate and read the plugin API documentation, see below.
+
+src/plugindata.h contains the plugin API data types and some notes.
+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).
+
+Plugin API documentation
+^^^^^^^^^^^^^^^^^^^^^^^^
+You can generate documentation for the plugin API using the doxygen
+tool. Run 'make api-doc' in the doc subdirectory. The documentation will
+be output to doc/reference/index.html.
+
+See the Related Pages section for a link to the plugin howto.
+
Patches
-------
We are happy to receive patches, but it's best to check with us by email
@@ -28,6 +45,26 @@
Avoid adding code to geany.h if it will fit better elsewhere.
See the top of each src/*.c file for a brief description of what it's for.
+Keeping the plugin ABI stable
+-----------------------------
+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 still be appended to, ensuring that all the existing
+elements stay in place - this will keep the 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.
+
+When reordering or changing existing elements of structs that are used as
+part of the plugin API, you should increment abi_version in plugindata.h.
+This is not needed if you're just appending fields to structs. The
+api_version value should be incremented for any changes to the plugin API,
+including appending elements.
+
+If you're in any doubt when making changes to plugin API code, just ask us.
+
Glade
-----
Use the code generation features of Glade instead of editing interface.c
@@ -55,7 +92,8 @@
this.
You should also try to write ISO C90 code for portability, so always
use C /* */ comments and function_name(void) instead of function_name().
-This is for compatibility with various Unix-like compilers.
+This is for compatibility with various Unix-like compilers. You can use
+-ansi in your CFLAGS to help check this.
Style
-----
@@ -88,13 +126,6 @@
Some of these notes below are brief (or maybe incomplete) - please
contact the mailing list for more information.
-Modifying data types
---------------------
-When reordering or changing existing elements of structs that are used as
-part of the plugin API, you should increment abi_version in plugindata.h
-(and api_version if changing elements). This is not needed if you're
-just appending fields to structs.
-
Using pre-defined autotools values
----------------------------------
When you are use macros supplied by the autotools like GEANY_PREFIX,
@@ -199,13 +230,6 @@
to the s_tag_type_names strings used in foo.c for FooKinds.
-PLUGINS
-=======
-
-src/plugindata.h contains the plugin API data types and some notes.
-See plugins/demoplugin.c for a very basic example plugin.
-src/plugins.c loads and unloads plugins.
-
Loading a plugin from GDB
-------------------------
This is useful so you can load plugins without installing them first.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2346
http://geany.svn.sourceforge.net/geany/?rev=2346&view=rev
Author: eht16
Date: 2008-03-14 10:28:37 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
Add pkg-config file and new include directory to the files section (thanks to Dominic Hopf).
Modified Paths:
--------------
trunk/ChangeLog
trunk/geany.spec.in
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-14 17:23:24 UTC (rev 2345)
+++ trunk/ChangeLog 2008-03-14 17:28:37 UTC (rev 2346)
@@ -17,6 +17,8 @@
* src/build.c, src/win32.c, src/win32.h:
Add win32_get_exit_status() to retrieve the exit code from a
command on Windows (code moved from build.c).
+ * geany.spec.in: Add pkg-config file and new include directory to the
+ files section (thanks to Dominic Hopf).
2008-03-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/geany.spec.in
===================================================================
--- trunk/geany.spec.in 2008-03-14 17:23:24 UTC (rev 2345)
+++ trunk/geany.spec.in 2008-03-14 17:28:37 UTC (rev 2346)
@@ -51,3 +51,5 @@
%{_datadir}/doc/%{name}/
%{_mandir}/man1/%{name}.1.gz
%{_datadir}/icons/hicolor/16x16/apps/classviewer-*.png
+%{_includedir}/geany/
+%{_libdir}/pkgconfig/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2345
http://geany.svn.sourceforge.net/geany/?rev=2345&view=rev
Author: ntrel
Date: 2008-03-14 10:23:24 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
Make KeyBinding name and label fields non-const strings so they can
be freed by any plugins that need to use malloc'd strings.
Document KeyCallback typedef.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/htmlchars.c
trunk/src/keybindings.c
trunk/src/keybindings.h
trunk/src/plugindata.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-14 16:59:36 UTC (rev 2344)
+++ trunk/ChangeLog 2008-03-14 17:23:24 UTC (rev 2345)
@@ -2,6 +2,11 @@
* src/keybindings.c:
Set main menu accelerators for keybindings.
+ * src/keybindings.c, src/keybindings.h, src/plugindata.h,
+ plugins/htmlchars.c:
+ Make KeyBinding name and label fields non-const strings so they can
+ be freed by any plugins that need to use malloc'd strings.
+ Document KeyCallback typedef.
2008-03-14 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/plugins/htmlchars.c
===================================================================
--- trunk/plugins/htmlchars.c 2008-03-14 16:59:36 UTC (rev 2344)
+++ trunk/plugins/htmlchars.c 2008-03-14 17:23:24 UTC (rev 2345)
@@ -525,7 +525,7 @@
{
GtkWidget *demo_item;
const gchar *menu_text = _("_Insert Special HTML Characters");
- const gchar *kb_label = _("Insert Special HTML Characters");
+ gchar *kb_label = _("Insert Special HTML Characters");
/* Add an item to the Tools menu */
demo_item = gtk_menu_item_new_with_mnemonic(menu_text);
Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2008-03-14 16:59:36 UTC (rev 2344)
+++ trunk/src/keybindings.c 2008-03-14 17:23:24 UTC (rev 2345)
@@ -101,7 +101,7 @@
/** Simple convenience function to fill a KeyBinding struct item */
void keybindings_set_item(KeyBindingGroup *group, gsize key_id,
KeyCallback callback, guint key, GdkModifierType mod,
- const gchar *name, const gchar *label, GtkWidget *menu_item)
+ gchar *name, gchar *label, GtkWidget *menu_item)
{
KeyBinding *kb;
Modified: trunk/src/keybindings.h
===================================================================
--- trunk/src/keybindings.h 2008-03-14 16:59:36 UTC (rev 2344)
+++ trunk/src/keybindings.h 2008-03-14 17:23:24 UTC (rev 2345)
@@ -39,15 +39,18 @@
#endif
+/** Function pointer type used for keybinding callbacks */
typedef void (*KeyCallback) (guint key_id);
/** Represents a single keybinding action */
+/* Note: name and label are not const strings so plugins can set them to malloc'd strings
+ * and free them in cleanup(). */
typedef struct KeyBinding
{
guint key; /**< Key value in lower-case, such as @c GDK_a */
GdkModifierType mods; /**< Modifier keys, such as @c GDK_CONTROL_MASK */
- const gchar *name; /**< Key name for the configuration file, such as @c "menu_new" */
- const gchar *label; /**< Label used in the preferences dialog keybindings tab */
+ gchar *name; /**< Key name for the configuration file, such as @c "menu_new" */
+ gchar *label; /**< Label used in the preferences dialog keybindings tab */
KeyCallback callback; /**< Callback function called when the key combination is pressed */
GtkWidget *menu_item; /**< Menu item widget for setting the menu accelerator */
} KeyBinding;
@@ -302,7 +305,7 @@
void keybindings_set_item(KeyBindingGroup *group, gsize key_id,
KeyCallback callback, guint key, GdkModifierType mod,
- const gchar *name, const gchar *label, GtkWidget *menu_item);
+ gchar *name, gchar *label, GtkWidget *menu_item);
void keybindings_send_command(guint group_id, guint key_id);
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2008-03-14 16:59:36 UTC (rev 2344)
+++ trunk/src/plugindata.h 2008-03-14 17:23:24 UTC (rev 2345)
@@ -35,7 +35,7 @@
/* The API version should be incremented whenever any plugin data types below are
* modified or appended to. */
-static const gint api_version = 48;
+static const gint api_version = 49;
/* 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
@@ -335,7 +335,7 @@
void (*send_command) (guint group_id, guint key_id);
void (*set_item) (struct KeyBindingGroup *group, gsize key_id,
_KeyCallback callback, guint key, GdkModifierType mod,
- const gchar *name, const gchar *label, GtkWidget *menu_item);
+ gchar *name, gchar *label, GtkWidget *menu_item);
}
KeybindingFuncs;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.