[network-manager-applet] applet: remove useless "loop" property
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: remove useless "loop" property
- Date: Thu, 11 Sep 2014 20:03:02 +0000 (UTC)
commit 63cd19e2b56272ea4f51553330ff2d8dcd6dccce
Author: Dan Williams <dcbw redhat com>
Date: Thu Sep 11 14:34:09 2014 -0500
applet: remove useless "loop" property
It's not used anywhere in NMApplet.
src/applet.c | 34 ++--------------------------------
src/applet.h | 2 +-
src/main.c | 2 +-
3 files changed, 4 insertions(+), 34 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 48b5f66..81e2ac5 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -3821,39 +3821,12 @@ static void nma_init (NMApplet *applet)
applet->icon_size = 16;
}
-enum {
- PROP_0,
- PROP_LOOP,
- LAST_PROP
-};
-
-static void
-set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- NMApplet *applet = NM_APPLET (object);
-
- switch (prop_id) {
- case PROP_LOOP:
- applet->loop = g_value_get_pointer (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
static void nma_class_init (NMAppletClass *klass)
{
GObjectClass *oclass = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
- oclass->set_property = set_property;
oclass->finalize = finalize;
- pspec = g_param_spec_pointer ("loop", "Loop", "Applet mainloop", G_PARAM_CONSTRUCT |
G_PARAM_WRITABLE);
- g_object_class_install_property (oclass, PROP_LOOP, pspec);
-
dbus_g_object_type_install_info (NM_TYPE_APPLET, &dbus_glib_nma_object_info);
}
@@ -3864,19 +3837,16 @@ nma_initable_interface_init (GInitableIface *iface, gpointer iface_data)
}
NMApplet *
-nm_applet_new (GMainLoop *loop)
+nm_applet_new (void)
{
NMApplet *applet;
GError *error = NULL;
- applet = g_initable_new (NM_TYPE_APPLET, NULL, &error,
- "loop", loop,
- NULL);
+ applet = g_initable_new (NM_TYPE_APPLET, NULL, &error, NULL);
if (!applet) {
g_warning ("%s", error->message);
g_error_free (error);
}
-
return applet;
}
diff --git a/src/applet.h b/src/applet.h
index 174e42a..cd5ac97 100644
--- a/src/applet.h
+++ b/src/applet.h
@@ -268,7 +268,7 @@ struct NMADeviceClass {
GType nma_get_type (void);
-NMApplet *nm_applet_new (GMainLoop *loop);
+NMApplet *nm_applet_new (void);
void applet_schedule_update_icon (NMApplet *applet);
diff --git a/src/main.c b/src/main.c
index e967270..61043d0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -98,7 +98,7 @@ int main (int argc, char *argv[])
loop = g_main_loop_new (NULL, FALSE);
- applet = nm_applet_new (loop);
+ applet = nm_applet_new ();
if (applet == NULL)
exit (1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]