[gnome-software] trivial: Add GS_PLUGIN_ACTION_UNKNOWN
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Add GS_PLUGIN_ACTION_UNKNOWN
- Date: Thu, 8 Sep 2016 11:07:33 +0000 (UTC)
commit 73a1921e7bde715f72ddb8ea8cd7043765d85c1c
Author: Richard Hughes <richard hughsie com>
Date: Thu Sep 8 11:49:09 2016 +0100
trivial: Add GS_PLUGIN_ACTION_UNKNOWN
It's always good to have a sane default value.
src/gs-plugin-private.h | 2 ++
src/gs-plugin.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin-private.h b/src/gs-plugin-private.h
index 97e5044..5cacb89 100644
--- a/src/gs-plugin-private.h
+++ b/src/gs-plugin-private.h
@@ -33,6 +33,7 @@ G_BEGIN_DECLS
/**
* GsPluginAction:
+ * @GS_PLUGIN_ACTION_UNKNOWN: Action is unknown
* @GS_PLUGIN_ACTION_SETUP: Plugin setup (internal)
* @GS_PLUGIN_ACTION_INSTALL: Install an application
* @GS_PLUGIN_ACTION_REMOVE: Remove an application
@@ -73,6 +74,7 @@ G_BEGIN_DECLS
* The plugin action.
**/
typedef enum {
+ GS_PLUGIN_ACTION_UNKNOWN,
GS_PLUGIN_ACTION_SETUP,
GS_PLUGIN_ACTION_INSTALL,
GS_PLUGIN_ACTION_REMOVE,
diff --git a/src/gs-plugin.c b/src/gs-plugin.c
index 62cddc5..85b479b 100644
--- a/src/gs-plugin.c
+++ b/src/gs-plugin.c
@@ -1325,6 +1325,8 @@ gs_plugin_error_to_string (GsPluginError error)
const gchar *
gs_plugin_action_to_string (GsPluginAction action)
{
+ if (action == GS_PLUGIN_ACTION_UNKNOWN)
+ return "unknown";
if (action == GS_PLUGIN_ACTION_SETUP)
return "setup";
if (action == GS_PLUGIN_ACTION_INSTALL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]