qulogic/gplugin

52c5f37a856b
Merged in feature/remove-help-from-info (pull request #60)

Remove the help property from GPluginPluginInfo.

Approved-by: Richard Laager
Approved-by: Elliott Sales de Andrade
--- a/gplugin/gplugin-plugin-info.c Sun Feb 23 04:35:25 2020 +0000
+++ b/gplugin/gplugin-plugin-info.c Sun Feb 23 04:37:17 2020 +0000
@@ -68,7 +68,6 @@
gchar *description;
gchar *category;
gchar **authors;
- gchar *help;
gchar *website;
gchar **dependencies;
@@ -100,7 +99,6 @@
PROP_DESCRIPTION,
PROP_CATEGORY,
PROP_AUTHORS,
- PROP_HELP,
PROP_WEBSITE,
PROP_DEPENDENCIES,
N_PROPERTIES,
@@ -251,15 +249,6 @@
}
static void
-gplugin_plugin_info_set_help(GPluginPluginInfo *info, const gchar *help)
-{
- GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info);
-
- g_free(priv->help);
- priv->help = g_strdup(help);
-}
-
-static void
gplugin_plugin_info_set_website(GPluginPluginInfo *info,
const gchar *website)
{
@@ -341,9 +330,6 @@
case PROP_AUTHORS:
g_value_set_boxed(value, gplugin_plugin_info_get_authors(info));
break;
- case PROP_HELP:
- g_value_set_string(value, gplugin_plugin_info_get_help(info));
- break;
case PROP_WEBSITE:
g_value_set_string(value, gplugin_plugin_info_get_website(info));
break;
@@ -415,9 +401,6 @@
case PROP_AUTHORS:
gplugin_plugin_info_set_authors(info, g_value_get_boxed(value));
break;
- case PROP_HELP:
- gplugin_plugin_info_set_help(info, g_value_get_string(value));
- break;
case PROP_WEBSITE:
gplugin_plugin_info_set_website(info, g_value_get_string(value));
break;
@@ -445,7 +428,6 @@
g_clear_pointer(&priv->summary, g_free);
g_clear_pointer(&priv->description, g_free);
g_clear_pointer(&priv->authors, g_strfreev);
- g_clear_pointer(&priv->help, g_free);
g_clear_pointer(&priv->website, g_free);
g_clear_pointer(&priv->dependencies, g_strfreev);
@@ -697,18 +679,6 @@
);
/**
- * GPluginPluginInfo:help:
- *
- * The url of the plugin that can be represented in a user interface.
- */
- properties[PROP_HELP] = g_param_spec_string(
- "help", "help",
- "The help string for the plugin",
- NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY
- );
-
- /**
* GPluginPluginInfo:website:
*
* The url of the plugin that can be represented in a user interface.
@@ -1023,25 +993,6 @@
}
/**
- * gplugin_plugin_info_get_help:
- * @info: The #GPluginPluginInfo instance.
- *
- * Returns the help text for the plugin as specified in @info.
- *
- * Returns: The help from @info.
- */
-const gchar *
-gplugin_plugin_info_get_help(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->help;
-}
-
-/**
* gplugin_plugin_info_get_website:
* @info: The #GPluginPluginInfo instance.
*
--- a/gplugin/gplugin-plugin-info.h Sun Feb 23 04:35:25 2020 +0000
+++ b/gplugin/gplugin-plugin-info.h Sun Feb 23 04:37:17 2020 +0000
@@ -64,7 +64,6 @@
const gchar * const *gplugin_plugin_info_get_authors(GPluginPluginInfo *info);
const gchar *gplugin_plugin_info_get_website(GPluginPluginInfo *info);
const gchar * const *gplugin_plugin_info_get_dependencies(GPluginPluginInfo *info);
-const gchar *gplugin_plugin_info_get_help(GPluginPluginInfo *info);
G_END_DECLS
--- a/gplugin/tests/test-plugin-info.c Sun Feb 23 04:35:25 2020 +0000
+++ b/gplugin/tests/test-plugin-info.c Sun Feb 23 04:37:17 2020 +0000
@@ -79,7 +79,7 @@
gchar *id = NULL, *name = NULL, *version = NULL;
gchar *license_id = NULL, *license_text = NULL, *license_url = NULL;
gchar *icon = NULL, *summary = NULL, *description = NULL, *category = NULL;
- gchar *help = NULL, *website = NULL;
+ gchar *website = NULL;
gchar **authors = NULL, **dependencies = NULL;
guint abi_version = 0;
gboolean internal = FALSE, load_on_query = FALSE;
@@ -101,7 +101,6 @@
"description", "description",
"category", "category",
"authors", r_authors,
- "help", "help",
"website", "website",
"dependencies", r_dependencies,
NULL
@@ -124,7 +123,6 @@
"description", &description,
"category", &category,
"authors", &authors,
- "help", &help,
"website", &website,
"dependencies", &dependencies,
NULL
@@ -145,7 +143,6 @@
test_string(category, "category");
test_stringv(authors, r_authors,
(TestStringVFunc)gplugin_plugin_info_get_authors, info);
- test_string(help, "help");
test_string(website, "website");
test_stringv(dependencies, r_dependencies,
(TestStringVFunc)gplugin_plugin_info_get_dependencies, info);
@@ -178,7 +175,7 @@
gchar *id = NULL, *name = NULL, *version = NULL;
gchar *license_id = NULL, *license_text = NULL, *license_url = NULL;
gchar *icon = NULL, *summary = NULL, *description = NULL, *category = NULL;
- gchar *website = NULL, *help = NULL;
+ gchar *website = NULL;
gchar **authors = NULL, **dependencies = NULL;
guint abi_version = 0;
gboolean internal = FALSE, load_on_query = FALSE;
@@ -200,7 +197,6 @@
"description", "description",
"category", "category",
"authors", r_authors,
- "help", "help",
"website", "website",
"dependencies", r_dependencies,
NULL
@@ -223,7 +219,6 @@
"description", &description,
"category", &category,
"authors", &authors,
- "help", &help,
"website", &website,
"dependencies", &dependencies,
NULL
@@ -244,7 +239,6 @@
test_string(category, "category");
test_stringv(authors, r_authors,
(TestStringVFunc)gplugin_plugin_info_get_authors, info);
- test_string(help, "help");
test_string(website, "website");
test_stringv(dependencies, r_dependencies,
(TestStringVFunc)gplugin_plugin_info_get_dependencies, info);