gtranslator r3955 - in trunk: . plugins/subversion src/plugin-system
- From: psanxiao svn gnome org
- To: svn-commits-list gnome org
- Subject: gtranslator r3955 - in trunk: . plugins/subversion src/plugin-system
- Date: Sat, 4 Apr 2009 15:16:54 +0000 (UTC)
Author: psanxiao
Date: Sat Apr 4 15:16:54 2009
New Revision: 3955
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3955&view=rev
Log:
* src/plugin-system/plugin-info-priv.h:
* src/plugin-system/plugin-info.c:
* src/plugin-system/plugin-info.h:
Added license field to plugin-info
* src/plugin-system/plugin-manager.c:
Added license button to About dialog in plugin manager
Modified:
trunk/ChangeLog
trunk/plugins/subversion/subversion.gtranslator-plugin.desktop.in
trunk/src/plugin-system/plugin-info-priv.h
trunk/src/plugin-system/plugin-info.c
trunk/src/plugin-system/plugin-info.h
trunk/src/plugin-system/plugin-manager.c
Modified: trunk/plugins/subversion/subversion.gtranslator-plugin.desktop.in
==============================================================================
--- trunk/plugins/subversion/subversion.gtranslator-plugin.desktop.in (original)
+++ trunk/plugins/subversion/subversion.gtranslator-plugin.desktop.in Sat Apr 4 15:16:54 2009
@@ -3,6 +3,7 @@
IAge=2
_Name=Subversion
_Description=A Subversion client plugin based on libsvn.
+License=
Icon=subversion-icon
Authors=Ignacio Casal Quinteiro <nacho resa gmail com>
Copyright=Copyright @ 2008 Ignacio Casal Quinteiro
Modified: trunk/src/plugin-system/plugin-info-priv.h
==============================================================================
--- trunk/src/plugin-system/plugin-info-priv.h (original)
+++ trunk/src/plugin-system/plugin-info-priv.h Sat Apr 4 15:16:54 2009
@@ -52,6 +52,7 @@
gchar **authors;
gchar *copyright;
gchar *website;
+ gchar *license;
GtranslatorPlugin *plugin;
Modified: trunk/src/plugin-system/plugin-info.c
==============================================================================
--- trunk/src/plugin-system/plugin-info.c (original)
+++ trunk/src/plugin-system/plugin-info.c Sat Apr 4 15:16:54 2009
@@ -264,6 +264,16 @@
else
DEBUG_PRINT ( "Could not find 'Copyright' in %s", file);
+ /* Get License */
+ str = g_key_file_get_string (plugin_file,
+ "Gtranslator Plugin",
+ "License",
+ NULL);
+ if (str)
+ info->license = str;
+ else
+ DEBUG_PRINT ( "Could not find 'Copyright' in %s", file);
+
/* Get Website */
str = g_key_file_get_string (plugin_file,
"Gtranslator Plugin",
@@ -375,3 +385,11 @@
return info->copyright;
}
+
+const gchar *
+gtranslator_plugin_info_get_license (GtranslatorPluginInfo *info)
+{
+ g_return_val_if_fail (info != NULL, NULL);
+
+ return info->license;
+}
Modified: trunk/src/plugin-system/plugin-info.h
==============================================================================
--- trunk/src/plugin-system/plugin-info.h (original)
+++ trunk/src/plugin-system/plugin-info.h Sat Apr 4 15:16:54 2009
@@ -50,10 +50,11 @@
const gchar *gtranslator_plugin_info_get_name (GtranslatorPluginInfo *info);
const gchar *gtranslator_plugin_info_get_description (GtranslatorPluginInfo *info);
-const gchar *gtranslator_plugin_info_get_icon_name (GtranslatorPluginInfo *info);
+const gchar *gtranslator_plugin_info_get_icon_name (GtranslatorPluginInfo *info);
const gchar **gtranslator_plugin_info_get_authors (GtranslatorPluginInfo *info);
const gchar *gtranslator_plugin_info_get_website (GtranslatorPluginInfo *info);
-const gchar *gtranslator_plugin_info_get_copyright (GtranslatorPluginInfo *info);
+const gchar *gtranslator_plugin_info_get_copyright (GtranslatorPluginInfo *info);
+const gchar *gtranslator_plugin_info_get_license (GtranslatorPluginInfo *info);
G_END_DECLS
Modified: trunk/src/plugin-system/plugin-manager.c
==============================================================================
--- trunk/src/plugin-system/plugin-manager.c (original)
+++ trunk/src/plugin-system/plugin-manager.c Sat Apr 4 15:16:54 2009
@@ -106,6 +106,7 @@
"program-name", gtranslator_plugin_info_get_name (info),
"copyright", gtranslator_plugin_info_get_copyright (info),
"authors", gtranslator_plugin_info_get_authors (info),
+ "license", gtranslator_plugin_info_get_license (info),
"comments", gtranslator_plugin_info_get_description (info),
"website", gtranslator_plugin_info_get_website (info),
"logo-icon-name", gtranslator_plugin_info_get_icon_name (info),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]