gedit r6774 - in trunk: . gedit
- From: icq svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6774 - in trunk: . gedit
- Date: Thu, 1 Jan 2009 12:41:38 +0000 (UTC)
Author: icq
Date: Thu Jan 1 12:41:37 2009
New Revision: 6774
URL: http://svn.gnome.org/viewvc/gedit?rev=6774&view=rev
Log:
2008-01-01 Ignacio Casal Quinteiro <nacho resa gmail com>
* gedit/gedit-plugin-info.c:
* gedit/gedit-plugin-info.h:
* gedit/gedit-plugin-manager.c:
* gedit/gedit-plugin-info-priv.h:
Add Version field for gedit-plugin files.
Modified:
trunk/ChangeLog
trunk/gedit/gedit-plugin-info-priv.h
trunk/gedit/gedit-plugin-info.c
trunk/gedit/gedit-plugin-info.h
trunk/gedit/gedit-plugin-manager.c
Modified: trunk/gedit/gedit-plugin-info-priv.h
==============================================================================
--- trunk/gedit/gedit-plugin-info-priv.h (original)
+++ trunk/gedit/gedit-plugin-info-priv.h Thu Jan 1 12:41:37 2009
@@ -52,6 +52,7 @@
gchar **authors;
gchar *copyright;
gchar *website;
+ gchar *version;
/* A plugin is unavailable if it is not possible to activate it
due to an error loading the plugin module (e.g. for Python plugins
Modified: trunk/gedit/gedit-plugin-info.c
==============================================================================
--- trunk/gedit/gedit-plugin-info.c (original)
+++ trunk/gedit/gedit-plugin-info.c Thu Jan 1 12:41:37 2009
@@ -77,6 +77,7 @@
g_free (info->website);
g_free (info->copyright);
g_free (info->loader);
+ g_free (info->version);
g_strfreev (info->authors);
g_free (info);
@@ -262,7 +263,17 @@
info->website = str;
else
gedit_debug_message (DEBUG_PLUGINS, "Could not find 'Website' in %s", file);
-
+
+ /* Get Version */
+ str = g_key_file_get_string (plugin_file,
+ "Gedit Plugin",
+ "Version",
+ NULL);
+ if (str)
+ info->version = str;
+ else
+ gedit_debug_message (DEBUG_PLUGINS, "Could not find 'Version' in %s", file);
+
g_key_file_free (plugin_file);
/* If we know nothing about the availability of the plugin,
@@ -373,3 +384,11 @@
return info->copyright;
}
+
+const gchar *
+gedit_plugin_info_get_version (GeditPluginInfo *info)
+{
+ g_return_val_if_fail (info != NULL, NULL);
+
+ return info->version;
+}
Modified: trunk/gedit/gedit-plugin-info.h
==============================================================================
--- trunk/gedit/gedit-plugin-info.h (original)
+++ trunk/gedit/gedit-plugin-info.h Thu Jan 1 12:41:37 2009
@@ -55,6 +55,7 @@
const gchar **gedit_plugin_info_get_authors (GeditPluginInfo *info);
const gchar *gedit_plugin_info_get_website (GeditPluginInfo *info);
const gchar *gedit_plugin_info_get_copyright (GeditPluginInfo *info);
+const gchar *gedit_plugin_info_get_version (GeditPluginInfo *info);
G_END_DECLS
Modified: trunk/gedit/gedit-plugin-manager.c
==============================================================================
--- trunk/gedit/gedit-plugin-manager.c (original)
+++ trunk/gedit/gedit-plugin-manager.c Thu Jan 1 12:41:37 2009
@@ -109,6 +109,7 @@
"comments", gedit_plugin_info_get_description (info),
"website", gedit_plugin_info_get_website (info),
"logo-icon-name", gedit_plugin_info_get_icon_name (info),
+ "version", gedit_plugin_info_get_version (info),
NULL);
gtk_window_set_destroy_with_parent (GTK_WINDOW (pm->priv->about),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]