void gm_conf_notifier_trigger (const gchar *namespac) { g_return_if_fail (namespac != NULL); gconf_client_notify (client, namespac); }
static void mojito_service_twitter_constructed (GObject *object) { MojitoServiceTwitter *twitter = MOJITO_SERVICE_TWITTER (object); MojitoServiceTwitterPrivate *priv; priv = twitter->priv = GET_PRIVATE (twitter); if (mojito_service_get_param ((MojitoService *)twitter, "own")) { priv->type = OWN; } else if (mojito_service_get_param ((MojitoService *)twitter, "friends")){ priv->type = FRIENDS; } else { priv->type = BOTH; } priv->twitpic_re = g_regex_new ("http://twitpic.com/([A-Za-z0-9]+)", 0, 0, NULL); g_assert (priv->twitpic_re); #if ! TWITTER_USE_OAUTH priv->gconf = gconf_client_get_default (); gconf_client_add_dir (priv->gconf, KEY_BASE, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); priv->gconf_notify_id[0] = gconf_client_notify_add (priv->gconf, KEY_USER, auth_changed_cb, twitter, NULL, NULL); priv->gconf_notify_id[1] = gconf_client_notify_add (priv->gconf, KEY_PASS, auth_changed_cb, twitter, NULL, NULL); gconf_client_notify (priv->gconf, KEY_USER); gconf_client_notify (priv->gconf, KEY_PASS); #endif mojito_online_add_notify (online_notify, twitter); if (mojito_is_online ()) { online_notify (TRUE, twitter); } }
static void gsm_manager_init (GsmManager *manager) { manager->priv = GET_PRIVATE (manager); manager->priv->gconf_client = gconf_client_get_default (); manager->priv->inhibitors = gsm_store_new (); g_signal_connect (manager->priv->inhibitors, "added", G_CALLBACK (on_store_inhibitor_added), manager); g_signal_connect (manager->priv->inhibitors, "removed", G_CALLBACK (on_store_inhibitor_removed), manager); manager->priv->presence = gsm_presence_new (); #if 0 /* Upstream this tells consolekit we're idle */ g_signal_connect (manager->priv->presence, "status-changed", G_CALLBACK (on_presence_status_changed), manager); #endif gconf_client_add_dir (manager->priv->gconf_client, IDLE_KEY_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); gconf_client_notify_add (manager->priv->gconf_client, IDLE_KEY, on_idle_delay_changed, manager, NULL, NULL); gconf_client_notify (manager->priv->gconf_client, IDLE_KEY); register_manager (manager); update_idle (manager); }
static void penge_view_background_init (PengeViewBackground *self) { PengeViewBackgroundPrivate *priv = GET_PRIVATE_REAL (self); GError *error = NULL; self->priv = priv; priv->client = gconf_client_get_default (); gconf_client_add_dir (priv->client, KEY_DIR, GCONF_CLIENT_PRELOAD_NONE, &error); if (error) { g_warning (G_STRLOC ": Error when adding directory for notification: %s", error->message); g_clear_error (&error); } priv->key_notify_id = gconf_client_notify_add (priv->client, KEY_BG_FILENAME, bg_filename_changed_cb, self, NULL, &error); if (error) { g_warning (G_STRLOC ": Error when adding key for notification: %s", error->message); g_clear_error (&error); } /* Trick us into reading the background. Aren't we sneaky muahaha! */ gconf_client_notify (priv->client, KEY_BG_FILENAME); }
static void gconf_on_off_peditor_new (CcUaPanelPrivate *priv, const gchar *key, GtkWidget *widget, gchar **section) { GObject *peditor; /* set data to enable/disable the section this on/off switch controls */ if (section) { g_object_set_data (G_OBJECT (widget), "section-widgets", section); g_signal_connect (widget, "notify::active", G_CALLBACK (cc_ua_panel_section_switched), priv->builder); } /* set up the boolean editor */ peditor = gconf_peditor_new_switch (NULL, key, widget, NULL); g_object_set (peditor, "conv-to-widget-cb", cc_ua_panel_toggle_switch, NULL); /* emit the notify on the key, so that the conv-to-widget-cb callback is run */ gconf_client_notify (priv->client, key); }
static void penge_everything_pane_init (PengeEverythingPane *self) { PengeEverythingPanePrivate *priv = GET_PRIVATE_REAL (self); gfloat tile_width, tile_height; GError *error = NULL; self->priv = priv; /* pointer to pointer */ priv->pointer_to_actor = g_hash_table_new (NULL, NULL); /* For storing sw items */ priv->uuid_to_sw_items = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)sw_item_unref); priv->client = sw_client_new (); sw_client_get_services (priv->client, (SwClientGetServicesCallback)_client_get_services_cb, self); priv->recent_log = g_object_new (ZEITGEIST_TYPE_LOG, NULL); priv->recent_monitor = zeitgeist_monitor_new ( zeitgeist_time_range_new_anytime (), _default_template_factory ()); g_signal_connect (priv->recent_monitor, "events-inserted", (GCallback)_zeitgeist_monitor_events_inserted_signal, self); g_signal_connect (priv->recent_monitor, "events-deleted", (GCallback)_zeitgeist_monitor_events_deleted_signal, self); /* the log holds a weak ref to the monitor */ zeitgeist_log_install_monitor (priv->recent_log, priv->recent_monitor); penge_block_container_set_spacing (PENGE_BLOCK_CONTAINER (self), 5); priv->gconf_client = gconf_client_get_default (); tile_width = gconf_client_get_float (priv->gconf_client, DAWATI_MYZONE_MIN_TILE_WIDTH, NULL); /* Returns 0.0 if unset */ if (tile_width == 0.0) { tile_width = TILE_WIDTH; } tile_height = gconf_client_get_float (priv->gconf_client, DAWATI_MYZONE_MIN_TILE_HEIGHT, NULL); if (tile_height == 0.0) { tile_height = TILE_HEIGHT; } penge_block_container_set_min_tile_size (PENGE_BLOCK_CONTAINER (self), tile_width, tile_height); g_signal_connect (self, "count-changed", (GCallback)_layout_count_changed_cb, self); priv->ratio_notify_id = gconf_client_notify_add (priv->gconf_client, DAWATI_MYZONE_RATIO, _gconf_ratio_notify_cb, self, NULL, &error); if (error) { g_warning (G_STRLOC ": Error setting gconf key notification: %s", error->message); g_clear_error (&error); } else { gconf_client_notify (priv->gconf_client, DAWATI_MYZONE_RATIO); } priv->refresh_id = g_timeout_add_seconds (REFRESH_TIME, (GSourceFunc) _refresh_cb, self); }
static void penge_grid_view_init (PengeGridView *self) { PengeGridViewPrivate *priv = GET_PRIVATE_REAL (self); GError *error = NULL; self->priv = priv; priv->header_label = mx_label_new_with_text ("Myzone"); clutter_actor_set_name (priv->header_label, "myzone-panel-header-label"); mx_table_insert_actor_with_properties (MX_TABLE (self), priv->header_label, 0, 0, "x-expand", FALSE, "y-expand", FALSE, "column-span", 3, NULL); priv->calendar_pane = g_object_new (PENGE_TYPE_CALENDAR_PANE, NULL); clutter_actor_set_width (priv->calendar_pane, 280); mx_table_insert_actor (MX_TABLE (self), priv->calendar_pane, 1, 0); priv->email_pane = g_object_new (PENGE_TYPE_EMAIL_PANE, NULL); mx_table_insert_actor (MX_TABLE (self), priv->email_pane, 2, 0); priv->favourite_apps_pane = g_object_new (PENGE_TYPE_APPS_PANE, NULL); mx_table_insert_actor (MX_TABLE (self), priv->favourite_apps_pane, 3, 0); priv->div_tex = clutter_texture_new_from_file (V_DIV_LINE, &error); if (!priv->div_tex) { g_warning (G_STRLOC ": Error loading vertical divider: %s", error->message); g_clear_error (&error); } else { mx_table_insert_actor (MX_TABLE (self), priv->div_tex, 1, 1); } priv->everything_pane = g_object_new (PENGE_TYPE_EVERYTHING_PANE, NULL); mx_table_insert_actor (MX_TABLE (self), priv->everything_pane, 1, 2); mx_table_set_row_spacing (MX_TABLE (self), 6); mx_table_set_column_spacing (MX_TABLE (self), 6); /* * Create a background and parent it to the grid. We paint and allocate this * in the overridden vfuncs */ priv->background = g_object_new (PENGE_TYPE_VIEW_BACKGROUND, NULL); clutter_actor_set_parent (priv->background, (ClutterActor *)self); clutter_actor_show (priv->background); priv->background_fade = clutter_texture_new_from_file (FADE_BG, NULL); clutter_actor_set_parent (priv->background_fade, (ClutterActor *)self); clutter_actor_show (priv->background_fade); priv->gconf_client = gconf_client_get_default (); priv->show_calendar_notify_id = gconf_client_notify_add (priv->gconf_client, MEEGO_MYZONE_SHOW_CALENDAR, _gconf_show_calendar_notify_cb, self, NULL, &error); if (error) { g_warning (G_STRLOC ": Error setting gconf key notification: %s", error->message); g_clear_error (&error); } else { gconf_client_notify (priv->gconf_client, MEEGO_MYZONE_SHOW_CALENDAR); } priv->show_email_notify_id = gconf_client_notify_add (priv->gconf_client, MEEGO_MYZONE_SHOW_EMAIL, _gconf_show_email_notify_cb, self, NULL, &error); if (error) { g_warning (G_STRLOC ": Error setting gconf key notification: %s", error->message); g_clear_error (&error); } else { gconf_client_notify (priv->gconf_client, MEEGO_MYZONE_SHOW_EMAIL); } }