SF.net SVN: geany-plugins:[2018] trunk/geany-plugins/addons

frlan at users.sourceforge.net frlan at xxxxx
Sun Apr 10 14:55:04 UTC 2011


Revision: 2018
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2018&view=rev
Author:   frlan
Date:     2011-04-10 14:55:04 +0000 (Sun, 10 Apr 2011)

Log Message:
-----------
Addons: Reload tasks on reload of document. Closes #3277842.

Modified Paths:
--------------
    trunk/geany-plugins/addons/ChangeLog
    trunk/geany-plugins/addons/README
    trunk/geany-plugins/addons/src/addons.c

Modified: trunk/geany-plugins/addons/ChangeLog
===================================================================
--- trunk/geany-plugins/addons/ChangeLog	2011-04-10 12:33:54 UTC (rev 2017)
+++ trunk/geany-plugins/addons/ChangeLog	2011-04-10 14:55:04 UTC (rev 2018)
@@ -1,3 +1,8 @@
+2011-04-10  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>
+
+ * src/addons.c: Reload tasks on reload of document. Closing #3277842.
+
+
 2010-09-08  Nick Treleaven  <nmt at localhost.localdomain>
 
  * src/ao_tasks.c:

Modified: trunk/geany-plugins/addons/README
===================================================================
--- trunk/geany-plugins/addons/README	2011-04-10 12:33:54 UTC (rev 2017)
+++ trunk/geany-plugins/addons/README	2011-04-10 14:55:04 UTC (rev 2018)
@@ -83,7 +83,7 @@
 from the sources, you should be ready to go.
 If you used a prepared package e.g. from your distribution you probably need
 to install an additional package, this might be called geany-dev or geany-devel.
-Please note that in order to compile and use this plugin, you need Geany 0.16
+Please note that in order to compile and use this plugin, you need Geany 0.21
 or later.
 
 Furthermore you need, of course, a C compiler and the Make tool.

Modified: trunk/geany-plugins/addons/src/addons.c
===================================================================
--- trunk/geany-plugins/addons/src/addons.c	2011-04-10 12:33:54 UTC (rev 2017)
+++ trunk/geany-plugins/addons/src/addons.c	2011-04-10 14:55:04 UTC (rev 2018)
@@ -40,7 +40,7 @@
 GeanyFunctions	*geany_functions;
 
 
-PLUGIN_VERSION_CHECK(195)
+PLUGIN_VERSION_CHECK(206)
 PLUGIN_SET_TRANSLATABLE_INFO(
 	LOCALEDIR,
 	GETTEXT_PACKAGE,
@@ -97,6 +97,7 @@
 static void ao_document_save_cb(GObject *obj, GeanyDocument *doc, gpointer data);
 static void ao_document_before_save_cb(GObject *obj, GeanyDocument *doc, gpointer data);
 static void ao_document_close_cb(GObject *obj, GeanyDocument *doc, gpointer data);
+static void ao_document_reload_cb(GObject *obj, GeanyDocument *doc, gpointer data);
 static void ao_startup_complete_cb(GObject *obj, gpointer data);
 
 gboolean ao_editor_notify_cb(GObject *object, GeanyEditor *editor,
@@ -113,6 +114,8 @@
 	{ "document-close", (GCallback) &ao_document_close_cb, TRUE, NULL },
 	{ "document-activate", (GCallback) &ao_document_activate_cb, TRUE, NULL },
 	{ "document-before-save", (GCallback) &ao_document_before_save_cb, TRUE, NULL },
+	{ "document-reload", (GCallback) &ao_document_reload_cb, TRUE, NULL },
+
 	{ "geany-startup-complete", (GCallback) &ao_startup_complete_cb, TRUE, NULL },
 
 	{ NULL, NULL, FALSE, NULL }
@@ -210,6 +213,14 @@
 }
 
 
+static void ao_document_reload_cb(GObject *obj, GeanyDocument *doc, gpointer data)
+{
+	g_return_if_fail(doc != NULL && doc->is_valid);
+
+	ao_tasks_update(ao_info->tasks, doc);
+}
+
+
 GtkWidget *ao_image_menu_item_new(const gchar *stock_id, const gchar *label)
 {
 	GtkWidget *item = gtk_image_menu_item_new_with_label(label);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list