forked from Mirrors/flatpak-builder
lib: get_current => get_is_current
parent
67de92042b
commit
7da16de205
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue