--- a/gplugin/gplugin-plugin-info.c Sun Feb 23 00:03:16 2020 -0600
+++ b/gplugin/gplugin-plugin-info.c Mon Feb 24 01:30:29 2020 +0000
@@ -62,7 +62,7 @@
@@ -94,7 +94,7 @@
@@ -201,11 +201,13 @@
-gplugin_plugin_info_set_icon(GPluginPluginInfo *info, const gchar *icon) {
+gplugin_plugin_info_set_icon_name(GPluginPluginInfo *info, + const gchar *icon_name) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info);
- priv->icon = g_strdup(icon);
+ g_free(priv->icon_name); + priv->icon_name = g_strdup(icon_name); @@ -314,8 +316,8 @@
g_value_set_string(value,
gplugin_plugin_info_get_license_url(info));
- g_value_set_string(value, gplugin_plugin_info_get_icon(info));
+ g_value_set_string(value, gplugin_plugin_info_get_icon_name(info)); g_value_set_string(value, gplugin_plugin_info_get_summary(info));
@@ -385,8 +387,8 @@
gplugin_plugin_info_set_license_url(info,
g_value_get_string(value));
- gplugin_plugin_info_set_icon(info, g_value_get_string(value));
+ gplugin_plugin_info_set_icon_name(info, g_value_get_string(value)); gplugin_plugin_info_set_summary(info, g_value_get_string(value));
@@ -424,7 +426,7 @@
g_clear_pointer(&priv->license_id, g_free);
g_clear_pointer(&priv->license_text, g_free);
g_clear_pointer(&priv->license_url, g_free);
- g_clear_pointer(&priv->icon, g_free);
+ g_clear_pointer(&priv->icon_name, g_free); g_clear_pointer(&priv->summary, g_free);
g_clear_pointer(&priv->description, g_free);
g_clear_pointer(&priv->authors, g_strfreev);
@@ -608,14 +610,14 @@
- * GPluginPluginInfo:icon:
+ * GPluginPluginInfo:icon-name: - * A string representing an icon for the plugin. The actual use of this
- * is determined by the application/library using GPlugin.
+ * A XDG icon name for the plugin. The actual use of this is determined by + * the application/library using GPlugin. - properties[PROP_ICON] = g_param_spec_string(
- "The file path of the icon for the plugin",
+ properties[PROP_ICON_NAME] = g_param_spec_string( + "icon-name", "icon-name", + "The XDG icon name for the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY
@@ -898,22 +900,22 @@
- * gplugin_plugin_info_get_icon:
+ * gplugin_plugin_info_get_icon_name: * @info: The #GPluginPluginInfo instance.
* Returns the name of the icon for the plugin as specified in @info.
- * Returns: The icon from @info.
+ * Returns: The icon name from @info. -gplugin_plugin_info_get_icon(GPluginPluginInfo *info) {
+gplugin_plugin_info_get_icon_name(GPluginPluginInfo *info) { GPluginPluginInfoPrivate *priv = NULL;
g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL);
priv = gplugin_plugin_info_get_instance_private(info);
+ return priv->icon_name; --- a/gplugin/gplugin-plugin-info.h Sun Feb 23 00:03:16 2020 -0600
+++ b/gplugin/gplugin-plugin-info.h Mon Feb 24 01:30:29 2020 +0000
@@ -57,7 +57,7 @@
const gchar *gplugin_plugin_info_get_license_id(GPluginPluginInfo *info);
const gchar *gplugin_plugin_info_get_license_text(GPluginPluginInfo *info);
const gchar *gplugin_plugin_info_get_license_url(GPluginPluginInfo *info);
-const gchar *gplugin_plugin_info_get_icon(GPluginPluginInfo *info);
+const gchar *gplugin_plugin_info_get_icon_name(GPluginPluginInfo *info); const gchar *gplugin_plugin_info_get_summary(GPluginPluginInfo *info);
const gchar *gplugin_plugin_info_get_description(GPluginPluginInfo *info);
const gchar *gplugin_plugin_info_get_category(GPluginPluginInfo *info);
--- a/gplugin/tests/test-plugin-info.c Sun Feb 23 00:03:16 2020 -0600
+++ b/gplugin/tests/test-plugin-info.c Mon Feb 24 01:30:29 2020 +0000
@@ -76,9 +76,9 @@
test_gplugin_plugin_info_construction(void) {
GPluginPluginInfo *info = NULL;
- gchar *id = NULL, *name = NULL, *version = NULL;
+ gchar *id = NULL, *name = NULL, *version = NULL, *icon_name = NULL; gchar *license_id = NULL, *license_text = NULL, *license_url = NULL;
- gchar *icon = NULL, *summary = NULL, *description = NULL, *category = NULL;
+ gchar *summary = NULL, *description = NULL, *category = NULL; gchar **authors = NULL, **dependencies = NULL;
@@ -96,7 +96,7 @@
"license-id", "license-id",
"license-text", "license-text",
"license-url", "license-url",
+ "icon-name", "icon-name", "description", "description",
@@ -118,7 +118,7 @@
"license-id", &license_id,
"license-text", &license_text,
"license-url", &license_url,
+ "icon-name", &icon_name, "description", &description,
@@ -137,7 +137,7 @@
test_string(license_id, "license-id");
test_string(license_text, "license-text");
test_string(license_url, "license-url");
- test_string(icon, "icon");
+ test_string(icon_name, "icon-name"); test_string(summary, "summary");
test_string(description, "description");
test_string(category, "category");
@@ -172,9 +172,9 @@
test_gplugin_plugin_info_new_full(void) {
GPluginPluginInfo *info = NULL;
- gchar *id = NULL, *name = NULL, *version = NULL;
+ gchar *id = NULL, *name = NULL, *version = NULL, *icon_name = NULL; gchar *license_id = NULL, *license_text = NULL, *license_url = NULL;
- gchar *icon = NULL, *summary = NULL, *description = NULL, *category = NULL;
+ gchar *summary = NULL, *description = NULL, *category = NULL; gchar **authors = NULL, **dependencies = NULL;
@@ -192,7 +192,7 @@
"license-id", "license-id",
"license-text", "license-text",
"license-url", "license-url",
+ "icon-name", "icon-name", "description", "description",
@@ -214,7 +214,7 @@
"license-id", &license_id,
"license-text", &license_text,
"license-url", &license_url,
+ "icon-name", &icon_name, "description", &description,
@@ -233,7 +233,7 @@
test_string(license_id, "license-id");
test_string(license_text, "license-text");
test_string(license_url, "license-url");
- test_string(icon, "icon");
+ test_string(icon_name, "icon-name"); test_string(summary, "summary");
test_string(description, "description");
test_string(category, "category");