Introduction
Release of 3.0 will be the first chance to break API/ABI compatibility for gedit plugins. Some of the API/ABI changes will be the result of changes to the underlying libraries, in particular GTK+ and the use of PyGI for the bindings, other due to changes in the gedit API itself.
Note that during the developement cycle there are no guarantees of API/ABI stability
iAge
Important!! You must change the iage version of your plugin to 3 once you update the api if not it is not going to be loaded!!
New API added and removed for 3.0
This wiki tries to show the api changes so the plugin developer can update their plugins easily
GeditPanel
Changed API
1 /* Old API */
2 void gedit_panel_add_item (GeditPanel *panel,
3 GtkWidget *item,
4 const gchar *name,
5 GtkWidget *image);
6 void gedit_panel_add_item_with_stock_icon (GeditPanel *panel,
7 GtkWidget *item,
8 const gchar *name,
9 const gchar *stock_id);
10
11 /* New API */
12 /* Now it is needed to pass an unique name as id, if you don't pass an unique
13 name it will return FALSE */
14 gboolean gedit_panel_add_item (GeditPanel *panel,
15 GtkWidget *item,
16 const gchar *id,
17 const gchar *display_name,
18 GtkWidget *image);
19
20 gboolean gedit_panel_add_item_with_stock_icon (GeditPanel *panel,
21 GtkWidget *item,
22 const gchar *id,
23 const gchar *display_name,
24 const gchar *stock_id);
GeditDocument
Properties
"uri" has been replaced by "location"
Signals
1 /* Document save */
2 void (* save) (GeditDocument *document,
3 const gchar *uri,
4 const GeditEncoding *encoding,
5 GeditDocumentSaveFlags flags);
6
7
8 /* Now it takes a GFile instead of the uri, a newline type and a compression type */
9 void (* save) (GeditDocument *document,
10 GFile *location,
11 const GeditEncoding *encoding,
12 GeditDocumentNewlineType newline_type,
13 GeditDocumentCompressionType compression_type,
14 GeditDocumentSaveFlags flags);
API
1 /* Removed api */
2 gchar *gedit_document_get_uri (GeditDocument *doc);
3 void gedit_document_set_uri (GeditDocument *doc,
4 const gchar *uri);
5
6 /* added api */
7 GFile *gedit_document_get_location (GeditDocument *doc);
8 void gedit_document_set_location (GeditDocument *doc,
9 GFile *location);
10
11 /* modified api */
12
13 /* Modified uri by location, and added new param column_pos */
14 void gedit_document_load (GeditDocument *doc,
15 GFile *location,
16 const GeditEncoding *encoding,
17 gint line_pos,
18 gint column_pos,
19 gboolean create);
20
21 /* Modified uri by location and added the newline type and compression type */
22 void gedit_document_save_as (GeditDocument *doc,
23 GFile *location,
24 const GeditEncoding *encoding,
25 GeditDocumentNewlineType newline_type,
26 GeditDocumentCompressionType newline_type,
27 GeditDocumentSaveFlags flags);
GeditWindow
API changed
GeditCommands
1 /* api removed */
2 void gedit_commands_load_uri (GeditWindow *window,
3 const gchar *uri,
4 const GeditEncoding *encoding,
5 gint line_pos);
6 gint gedit_commands_load_uris (GeditWindow *window,
7 const GSList *uris,
8 const GeditEncoding *encoding,
9 gint line_pos);
10
11 /* added api */
12 /* Mostly the same as load_uri but it takes a gfile instead of an uri and it needs the colum position */
13 void gedit_commands_load_location (GeditWindow *window,
14 GFile *location,
15 const GeditEncoding *encoding,
16 gint line_pos,
17 gint column_pos);
18 gint gedit_commands_load_locations (GeditWindow *window,
19 const GSList *locations,
20 const GeditEncoding *encoding,
21 gint line_pos,
22 gint column_pos);