SF.net SVN: geany: [2400] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Mon Mar 24 17:30:13 UTC 2008
Revision: 2400
http://geany.svn.sourceforge.net/geany/?rev=2400&view=rev
Author: eht16
Date: 2008-03-24 10:29:50 -0700 (Mon, 24 Mar 2008)
Log Message:
-----------
Add document_set_filetype() and filetypes_get_from_uid() to
the plugin API.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/plugindata.h
trunk/src/plugins.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-03-24 17:24:39 UTC (rev 2399)
+++ trunk/ChangeLog 2008-03-24 17:29:50 UTC (rev 2400)
@@ -1,3 +1,10 @@
+2008-03-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/plugins.c, src/plugindata.h:
+ Add document_set_filetype() and filetypes_get_from_uid() to
+ the plugin API.
+
+
2008-03-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/editor.c:
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2008-03-24 17:24:39 UTC (rev 2399)
+++ trunk/src/plugindata.h 2008-03-24 17:29:50 UTC (rev 2400)
@@ -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 = 50;
+static const gint api_version = 51;
/* 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
@@ -193,15 +193,16 @@
gint (*get_n_idx) (guint i);
gint (*find_by_filename) (const gchar *filename, gboolean is_tm_filename);
struct document* (*get_current) (void);
- gboolean (*save_file)(gint idx, gboolean force);
- gint (*open_file)(const gchar *locale_filename, gboolean readonly,
+ gboolean (*save_file) (gint idx, gboolean force);
+ gint (*open_file) (const gchar *locale_filename, gboolean readonly,
struct filetype *ft, const gchar *forced_enc);
- void (*open_files)(const GSList *filenames, gboolean readonly, struct filetype *ft,
+ void (*open_files) (const GSList *filenames, gboolean readonly, struct filetype *ft,
const gchar *forced_enc);
- gboolean (*remove)(guint page_num);
- gboolean (*reload_file)(gint idx, const gchar *forced_enc);
- void (*set_encoding)(gint idx, const gchar *new_encoding);
- void (*set_text_changed)(gint idx);
+ gboolean (*remove) (guint page_num);
+ gboolean (*reload_file) (gint idx, const gchar *forced_enc);
+ void (*set_encoding) (gint idx, const gchar *new_encoding);
+ void (*set_text_changed) (gint idx);
+ void (*set_filetype) (gint idx, filetype *type);
}
DocumentFuncs;
@@ -350,6 +351,7 @@
typedef struct FiletypeFuncs
{
filetype* (*detect_from_filename) (const gchar *utf8_filename);
+ filetype* (*get_from_uid) (gint uid);
}
FiletypeFuncs;
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2008-03-24 17:24:39 UTC (rev 2399)
+++ trunk/src/plugins.c 2008-03-24 17:29:50 UTC (rev 2400)
@@ -107,7 +107,8 @@
&document_remove,
&document_reload_file,
&document_set_encoding,
- &document_set_text_changed
+ &document_set_text_changed,
+ &document_set_filetype
};
static ScintillaFuncs sci_funcs = {
@@ -220,7 +221,8 @@
static FiletypeFuncs filetype_funcs = {
- &filetypes_detect_from_filename
+ &filetypes_detect_from_filename,
+ &filetypes_get_from_uid
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list