diff options
author | Alexander Larsson <alexl@redhat.com> | 2015-12-17 20:10:10 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2015-12-17 20:10:10 +0100 |
commit | 7da16de205a40ba38f4c66dbbe4d5d2536054757 (patch) | |
tree | 928688abdb0b93e3253e9511cd39287d28bf0e36 /lib | |
parent | 67de92042bdff81e7883d29c6aeae79e91091cdb (diff) | |
download | xdg-app-7da16de205a40ba38f4c66dbbe4d5d2536054757.tar.gz |
lib: get_current => get_is_current
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test-lib.c | 12 | ||||
-rw-r--r-- | lib/xdg-app-installed-ref.c | 24 | ||||
-rw-r--r-- | lib/xdg-app-installed-ref.h | 2 |
3 files changed, 19 insertions, 19 deletions
diff --git a/lib/test-lib.c b/lib/test-lib.c index 7464a26..335351c 100644 --- a/lib/test-lib.c +++ b/lib/test-lib.c @@ -80,7 +80,7 @@ main (int argc, char *argv[]) xdg_app_ref_get_commit (XDG_APP_REF(ref)), xdg_app_installed_ref_get_origin (ref), xdg_app_installed_ref_get_deploy_dir (ref), - xdg_app_installed_ref_get_current (ref)); + xdg_app_installed_ref_get_is_current (ref)); } } @@ -104,7 +104,7 @@ main (int argc, char *argv[]) xdg_app_ref_get_commit (XDG_APP_REF(app)), xdg_app_installed_ref_get_origin (app), xdg_app_installed_ref_get_deploy_dir (app), - xdg_app_installed_ref_get_current (app)); + xdg_app_installed_ref_get_is_current (app)); g_print ("metadata:\n%s\n", xdg_app_installed_ref_load_metadata (app, NULL, NULL)); } } @@ -128,7 +128,7 @@ main (int argc, char *argv[]) xdg_app_ref_get_commit (XDG_APP_REF(runtime)), xdg_app_installed_ref_get_origin (runtime), xdg_app_installed_ref_get_deploy_dir (runtime), - xdg_app_installed_ref_get_current (runtime)); + xdg_app_installed_ref_get_is_current (runtime)); } } @@ -147,12 +147,12 @@ main (int argc, char *argv[]) xdg_app_ref_get_commit (XDG_APP_REF(app1)), xdg_app_installed_ref_get_origin (app1), xdg_app_installed_ref_get_deploy_dir (app1), - xdg_app_installed_ref_get_current (app1)); + xdg_app_installed_ref_get_is_current (app1)); xdg_app_installed_ref_launch (app1, NULL, NULL); } g_print ("\n**** Getting current installed gedit\n"); - app2 = xdg_app_installation_get_current_installed_app (installation, + app2 = xdg_app_installation_get_current_installed_app (installation, "org.gnome.gedit", NULL, NULL); if (app2) @@ -164,7 +164,7 @@ main (int argc, char *argv[]) xdg_app_ref_get_commit (XDG_APP_REF(app2)), xdg_app_installed_ref_get_origin (app2), xdg_app_installed_ref_get_deploy_dir (app2), - xdg_app_installed_ref_get_current (app2)); + xdg_app_installed_ref_get_is_current (app2)); g_print ("\n**** Listing remotes\n"); diff --git a/lib/xdg-app-installed-ref.c b/lib/xdg-app-installed-ref.c index 63e6cf3..66c6095 100644 --- a/lib/xdg-app-installed-ref.c +++ b/lib/xdg-app-installed-ref.c @@ -32,7 +32,7 @@ typedef struct _XdgAppInstalledRefPrivate XdgAppInstalledRefPrivate; struct _XdgAppInstalledRefPrivate { - gboolean current; + gboolean is_current; char *origin; char *deploy_dir; @@ -44,7 +44,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (XdgAppInstalledRef, xdg_app_installed_ref, XDG_APP_T enum { PROP_0, - PROP_CURRENT, + PROP_IS_CURRENT, PROP_ORIGIN, PROP_DEPLOY_DIR }; @@ -73,8 +73,8 @@ xdg_app_installed_ref_set_property (GObject *object, switch (prop_id) { - case PROP_CURRENT: - priv->current = g_value_get_boolean (value); + case PROP_IS_CURRENT: + priv->is_current = g_value_get_boolean (value); break; case PROP_ORIGIN: @@ -104,8 +104,8 @@ xdg_app_installed_ref_get_property (GObject *object, switch (prop_id) { - case PROP_CURRENT: - g_value_set_boolean (value, priv->current); + case PROP_IS_CURRENT: + g_value_set_boolean (value, priv->is_current); break; case PROP_ORIGIN: @@ -132,8 +132,8 @@ xdg_app_installed_ref_class_init (XdgAppInstalledRefClass *klass) object_class->finalize = xdg_app_installed_ref_finalize; g_object_class_install_property (object_class, - PROP_CURRENT, - g_param_spec_boolean ("current", + PROP_IS_CURRENT, + g_param_spec_boolean ("is-current", "", "", FALSE, @@ -176,11 +176,11 @@ xdg_app_installed_ref_get_deploy_dir (XdgAppInstalledRef *self) } gboolean -xdg_app_installed_ref_get_current (XdgAppInstalledRef *self) +xdg_app_installed_ref_get_is_current (XdgAppInstalledRef *self) { XdgAppInstalledRefPrivate *priv = xdg_app_installed_ref_get_instance_private (self); - return priv->current; + return priv->is_current; } char * @@ -245,7 +245,7 @@ xdg_app_installed_ref_new (const char *full_ref, const char *origin, const char *deploy_dir, XdgAppDir *dir, - gboolean current) + gboolean is_current) { XdgAppRefKind kind = XDG_APP_REF_KIND_APP; XdgAppInstalledRefPrivate *priv; @@ -264,7 +264,7 @@ xdg_app_installed_ref_new (const char *full_ref, "branch", parts[3], "commit", commit, "origin", origin, - "current", current, + "is-current", is_current, "deploy-dir", deploy_dir, NULL); diff --git a/lib/xdg-app-installed-ref.h b/lib/xdg-app-installed-ref.h index da6f4a4..cc712f6 100644 --- a/lib/xdg-app-installed-ref.h +++ b/lib/xdg-app-installed-ref.h @@ -50,7 +50,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdgAppInstalledRef, g_object_unref) XDG_APP_EXTERN const char * xdg_app_installed_ref_get_origin (XdgAppInstalledRef *self); XDG_APP_EXTERN const char * xdg_app_installed_ref_get_deploy_dir (XdgAppInstalledRef *self); -XDG_APP_EXTERN gboolean xdg_app_installed_ref_get_current (XdgAppInstalledRef *self); +XDG_APP_EXTERN gboolean xdg_app_installed_ref_get_is_current (XdgAppInstalledRef *self); XDG_APP_EXTERN char * xdg_app_installed_ref_load_metadata (XdgAppInstalledRef *self, GCancellable *cancellable, GError **error); |