Implement an optional "website" property in MidoriExtension
This commit is contained in:
parent
e19d038b53
commit
7bd151a3e9
1 changed files with 26 additions and 1 deletions
|
@ -28,6 +28,7 @@ struct _MidoriExtensionPrivate
|
||||||
gchar* description;
|
gchar* description;
|
||||||
gchar* version;
|
gchar* version;
|
||||||
gchar* authors;
|
gchar* authors;
|
||||||
|
gchar* website;
|
||||||
|
|
||||||
MidoriApp* app;
|
MidoriApp* app;
|
||||||
gint active;
|
gint active;
|
||||||
|
@ -129,7 +130,8 @@ enum
|
||||||
PROP_NAME,
|
PROP_NAME,
|
||||||
PROP_DESCRIPTION,
|
PROP_DESCRIPTION,
|
||||||
PROP_VERSION,
|
PROP_VERSION,
|
||||||
PROP_AUTHORS
|
PROP_AUTHORS,
|
||||||
|
PROP_WEBSITE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -227,6 +229,22 @@ midori_extension_class_init (MidoriExtensionClass* class)
|
||||||
NULL,
|
NULL,
|
||||||
flags));
|
flags));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MidoriExtension:website:
|
||||||
|
*
|
||||||
|
* The website of the extension.
|
||||||
|
*
|
||||||
|
* Since: 0.1.8
|
||||||
|
*/
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_WEBSITE,
|
||||||
|
g_param_spec_string (
|
||||||
|
"website",
|
||||||
|
"Website",
|
||||||
|
"The website of the extension",
|
||||||
|
NULL,
|
||||||
|
flags));
|
||||||
|
|
||||||
g_type_class_add_private (class, sizeof (MidoriExtensionPrivate));
|
g_type_class_add_private (class, sizeof (MidoriExtensionPrivate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,6 +364,7 @@ midori_extension_finalize (GObject* object)
|
||||||
katze_assign (extension->priv->description, NULL);
|
katze_assign (extension->priv->description, NULL);
|
||||||
katze_assign (extension->priv->version, NULL);
|
katze_assign (extension->priv->version, NULL);
|
||||||
katze_assign (extension->priv->authors, NULL);
|
katze_assign (extension->priv->authors, NULL);
|
||||||
|
katze_assign (extension->priv->website, NULL);
|
||||||
|
|
||||||
katze_assign (extension->priv->config_dir, NULL);
|
katze_assign (extension->priv->config_dir, NULL);
|
||||||
g_list_free (extension->priv->lsettings);
|
g_list_free (extension->priv->lsettings);
|
||||||
|
@ -376,6 +395,9 @@ midori_extension_set_property (GObject* object,
|
||||||
case PROP_AUTHORS:
|
case PROP_AUTHORS:
|
||||||
katze_assign (extension->priv->authors, g_value_dup_string (value));
|
katze_assign (extension->priv->authors, g_value_dup_string (value));
|
||||||
break;
|
break;
|
||||||
|
case PROP_WEBSITE:
|
||||||
|
katze_assign (extension->priv->website, g_value_dup_string (value));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -404,6 +426,9 @@ midori_extension_get_property (GObject* object,
|
||||||
case PROP_AUTHORS:
|
case PROP_AUTHORS:
|
||||||
g_value_set_string (value, extension->priv->authors);
|
g_value_set_string (value, extension->priv->authors);
|
||||||
break;
|
break;
|
||||||
|
case PROP_WEBSITE:
|
||||||
|
g_value_set_string (value, extension->priv->website);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue