static void
destroy_tasklist(GtkWidget * widget, TasklistData *tasklist)
{
	GConfClient *client = gconf_client_get_default ();

	gconf_client_notify_remove (client, tasklist->listeners[0]);
	gconf_client_notify_remove (client, tasklist->listeners[1]);
	gconf_client_notify_remove (client, tasklist->listeners[2]);
	gconf_client_notify_remove (client, tasklist->listeners[3]);
	gconf_client_notify_remove (client, tasklist->listeners[4]);

	g_object_unref (G_OBJECT (client));
	
	tasklist->listeners[0] = 0;
	tasklist->listeners[1] = 0;
	tasklist->listeners[2] = 0;
	tasklist->listeners[3] = 0;
	tasklist->listeners[4] = 0;

	if (tasklist->properties_dialog)
		gtk_widget_destroy (tasklist->properties_dialog);

	if (tasklist->about)
		gtk_widget_destroy (tasklist->about);

        g_free (tasklist);
}
Exemple #2
0
static void
mojito_service_twitter_dispose (GObject *object)
{
  MojitoServiceTwitterPrivate *priv = MOJITO_SERVICE_TWITTER (object)->priv;

  mojito_online_remove_notify (online_notify, object);

  if (priv->proxy) {
    g_object_unref (priv->proxy);
    priv->proxy = NULL;
  }

  if (priv->twitpic_re) {
    g_regex_unref (priv->twitpic_re);
    priv->twitpic_re = NULL;
  }

#if ! TWITTER_USE_OAUTH
  if (priv->gconf) {
    gconf_client_notify_remove (priv->gconf, priv->gconf_notify_id[0]);
    gconf_client_notify_remove (priv->gconf, priv->gconf_notify_id[1]);
    g_object_unref (priv->gconf);
    priv->gconf = NULL;
  }
#endif

  G_OBJECT_CLASS (mojito_service_twitter_parent_class)->dispose (object);
}
static
void
listen_cleanup (Listener* listener)
{
  gconf_client_notify_remove(listener->client, listener->cnxn_id);
  gconf_client_remove_dir(listener->client, "/", NULL);
}
static void
penge_view_background_dispose (GObject *object)
{
  PengeViewBackgroundPrivate *priv = GET_PRIVATE (object);
  GError *error = NULL;
  
  if (priv->client)
  {
    gconf_client_notify_remove (priv->client,
                                priv->key_notify_id);

    gconf_client_remove_dir (priv->client,
                             KEY_DIR,
                             &error);

    if (error)
    {
      g_warning (G_STRLOC ": Error when removing notification directory: %s",
                 error->message);
      g_clear_error (&error);
    }

    g_object_unref (priv->client);
    priv->client = NULL;
  }

  G_OBJECT_CLASS (penge_view_background_parent_class)->dispose (object);
}
/**
 * Remove the notification for the accelerator key when
 * the button is destroyed.
 * @param widget
 * @param userdata ID returned by gconf_client_notify_add()
 */
static void remove_notify(GtkWidget *widget, gpointer userdata)
{
        guint id = GPOINTER_TO_UINT(userdata);

        gconf_client_notify_remove(ocha_gconf_get_client(),
                                   id);
}
Exemple #6
0
static void
megaphone_applet_finalize (GObject *object)
{
	MegaphoneAppletPriv *priv = GET_PRIV (object);
	
	if (priv->contact) {
		g_object_unref (priv->contact);
	}
	if (priv->factory) {
		g_object_unref (priv->factory);
	}
	if (priv->account_manager) {
		g_signal_handlers_disconnect_by_func (priv->account_manager,
			megaphone_applet_new_connection_cb, object);
		g_object_unref (priv->account_manager);
	}

	if (priv->gconf_cnxn != 0) {
		gconf_client_notify_remove (priv->gconf, priv->gconf_cnxn);
	}
	g_object_unref (priv->gconf);
	g_free (priv->id);

	G_OBJECT_CLASS (megaphone_applet_parent_class)->finalize (object);
}
void
gnc_gconf_remove_notification (GObject *object,
                               const gchar *section,
                               const gchar *whoami)
{
    GConfClient *client;
    gchar *path, *client_tag, *notify_tag;
    guint id;

    g_return_if_fail(G_IS_OBJECT(object));
    g_return_if_fail(whoami != NULL);

    /*
     * Remove any gconf notifications
     */
    client_tag = g_strdup_printf(CLIENT_TAG, section ? section : "", whoami);
    client = g_object_get_data(object, client_tag);
    path = gnc_gconf_section_name(section);
    if (client)
    {
        notify_tag = g_strdup_printf(NOTIFY_TAG, section ? section : "", whoami);
        id = GPOINTER_TO_UINT(g_object_get_data(object, notify_tag));
        gconf_client_notify_remove(client, id);
        gconf_client_remove_dir(client, path, NULL);
        g_object_unref(client);
        g_free(notify_tag);
    }
    g_free(path);
    g_free(client_tag);
}
Exemple #8
0
/* Unbinds a property binding */
static void
prop_binding_unbind (PropBinding *binding)
{
        if (binding->delayed_mode && binding->sync_timeout_id > 0) {
                /* Perform any scheduled syncs */
                g_source_remove (binding->sync_timeout_id);
                        
                /* The object will still be around as we have
                 * a reference */
                prop_binding_perform_scheduled_sync (binding);
        }

        gconf_client_notify_remove (bridge->client,
                                    binding->val_notify_id);
        g_free (binding->key);

        while (binding->val_changes) {
                gconf_value_free (binding->val_changes->data);

                binding->val_changes = g_slist_delete_link
                        (binding->val_changes, binding->val_changes);
        }

        /* The object might have been destroyed .. */
        if (binding->object) {
                g_signal_handler_disconnect (binding->object,
                                             binding->prop_notify_id);

                g_object_weak_unref (binding->object,
                                     prop_binding_object_destroyed, binding);
        }
}
void
calendar_config_remove_notification (guint id)
{
	calendar_config_init ();

	gconf_client_notify_remove (config, id);
}
guint
eel_gconf_notification_add (const char *key,
                            GConfClientNotifyFunc notification_callback,
                            gpointer callback_data)
{
    guint notification_id;
    GConfClient *client;
    GError *error = NULL;

    g_return_val_if_fail (key != NULL, EEL_GCONF_UNDEFINED_CONNECTION);
    g_return_val_if_fail (notification_callback != NULL, EEL_GCONF_UNDEFINED_CONNECTION);

    client = eel_gconf_client_get_global ();
    g_return_val_if_fail (client != NULL, EEL_GCONF_UNDEFINED_CONNECTION);

    notification_id = gconf_client_notify_add (client,
                      key,
                      notification_callback,
                      callback_data,
                      NULL,
                      &error);

    if (eel_gconf_handle_error (&error)) {
        if (notification_id != EEL_GCONF_UNDEFINED_CONNECTION) {
            gconf_client_notify_remove (client, notification_id);
            notification_id = EEL_GCONF_UNDEFINED_CONNECTION;
        }
    }

    return notification_id;
}
Exemple #11
0
void
gm_conf_notifier_remove (gpointer identifier)
{
    g_return_if_fail (identifier != NULL);

    gconf_client_notify_remove (client, GPOINTER_TO_UINT (identifier));
}
static void
dispose (GObject *object)
{
	BMAGConfSettingsPrivate *priv = BMA_GCONF_SETTINGS_GET_PRIVATE (object);

	if (priv->disposed)
		return;

	priv->disposed = TRUE;

	g_hash_table_destroy (priv->pending_changes);

	if (priv->read_connections_id) {
		g_source_remove (priv->read_connections_id);
		priv->read_connections_id = 0;
	}

	gconf_client_notify_remove (priv->client, priv->conf_notify_id);
	gconf_client_remove_dir (priv->client, GCONF_PATH_CONNECTIONS, NULL);

	g_slist_foreach (priv->connections, (GFunc) g_object_unref, NULL);
	g_slist_free (priv->connections);

	g_object_unref (priv->client);

	G_OBJECT_CLASS (bma_gconf_settings_parent_class)->dispose (object);
}
Exemple #13
0
static void
calendar_sources_finalize_source_data (CalendarSources    *sources,
				       CalendarSourceData *source_data)
{
  if (source_data->loaded)
    {
      GSList *l;

      if (source_data->selected_sources_dir)
	{
	  gconf_client_remove_dir (sources->priv->gconf_client,
				   source_data->selected_sources_dir,
				   NULL);

	  g_free (source_data->selected_sources_dir);
	  source_data->selected_sources_dir = NULL;
	}

      if (source_data->selected_sources_listener)
	{
	  gconf_client_notify_remove (sources->priv->gconf_client,
				      source_data->selected_sources_listener);
	  source_data->selected_sources_listener = 0;
	}

      for (l = source_data->clients; l; l = l->next)
        {
          g_signal_handlers_disconnect_by_func (G_OBJECT (l->data),
                                                G_CALLBACK (backend_died_cb),
                                                source_data);
          g_object_unref (l->data);
        }
      g_slist_free (source_data->clients);
      source_data->clients = NULL;

      if (source_data->esource_list)
        {
          g_signal_handlers_disconnect_by_func (source_data->esource_list,
                                                G_CALLBACK (calendar_sources_esource_list_changed),
                                                source_data);
          g_object_unref (source_data->esource_list);
	}
      source_data->esource_list = NULL;

      for (l = source_data->selected_sources; l; l = l->next)
	g_free (l->data);
      g_slist_free (source_data->selected_sources);
      source_data->selected_sources = NULL;

      if (source_data->timeout_id != 0)
        {
          g_source_remove (source_data->timeout_id);
          source_data->timeout_id = 0;
        }

      source_data->loaded = FALSE;
    }
}
void
gsd_keyboard_xkb_shutdown (void)
{
	GConfClient *client;

	pa_callback = NULL;
	pa_callback_user_data = NULL;

	g_hash_table_destroy (preview_dialogs);

	if (!inited_ok)
		return;

	xkl_engine_stop_listen (xkl_engine);

	gdk_window_remove_filter (NULL, (GdkFilterFunc)
				  gsd_keyboard_xkb_evt_filter, NULL);

	client = gconf_client_get_default ();

	if (notify_desktop != 0) {
		gconf_client_remove_dir (client, GKBD_DESKTOP_CONFIG_DIR,
					 NULL);
		gconf_client_notify_remove (client, notify_desktop);
		notify_desktop = 0;
	}

	if (notify_keyboard != 0) {
		gconf_client_remove_dir (client, GKBD_KEYBOARD_CONFIG_DIR,
					 NULL);
		gconf_client_notify_remove (client, notify_keyboard);
		notify_keyboard = 0;
	}

	if (xkl_registry) {
		g_object_unref (xkl_registry);
	}

	g_object_unref (client);
	g_object_unref (xkl_engine);

	xkl_engine = NULL;
	inited_ok = FALSE;
}
static void
entry_destroyed_callback(GtkWidget* entry, gpointer data)
{
  GConfClient* client = data;

  guint notify_id = GPOINTER_TO_UINT(gtk_object_get_data(GTK_OBJECT(entry),
                                                         "notify_id"));

  gconf_client_notify_remove(client, notify_id);
}
Exemple #16
0
static void
configurable_widget_destroy_callback(GtkWidget* widget, gpointer data)
{
    guint notify_id;
    GConfClient* client;

    client = g_object_get_data(widget, "client");
    notify_id = GPOINTER_TO_UINT(g_object_get_data(widget, "notify_id"));

    if (notify_id != 0)
        gconf_client_notify_remove(client, notify_id);
}
Exemple #17
0
/**
 * Remove a GConf notifier
 *
 * @param cb_id The ID of the notifier to remove
 * @param user_data Unused
 */
void mce_gconf_notifier_remove(gpointer cb_id, gpointer user_data)
{
	(void)user_data;

	if( gconf_disabled )
		goto EXIT;

	gconf_client_notify_remove(gconf_client, GPOINTER_TO_INT(cb_id));
	gconf_notifiers = g_slist_remove(gconf_notifiers, cb_id);

EXIT:
	return;
}
void switcher_button_dispose(GObject *gobject)
{
    SwitcherButton *self = SWITCHER_BUTTON(gobject);

    if (self->priv->gconfClient)
    {
        gconf_client_notify_remove(self->priv->gconfClient, self->priv->gconfNotifyCurrent);
        gconf_client_notify_remove(self->priv->gconfClient, self->priv->gconfNotifyLang0);
        gconf_client_notify_remove(self->priv->gconfClient, self->priv->gconfNotifyLang1);

        if (self->priv->model == N800 || self->priv->model == N810)
            gconf_client_remove_dir(self->priv->gconfClient, GCONF_DIR_2008, 0);
        else if (self->priv->model == N770)
            gconf_client_remove_dir(self->priv->gconfClient, GCONF_DIR_2006, 0);

        gconf_client_notify_remove(self->priv->gconfClient, self->priv->gconfNotifyLock);
        gconf_client_remove_dir(self->priv->gconfClient, GCONF_LOCK_DIR, 0);

        g_object_unref(self->priv->gconfClient);
        self->priv->gconfClient = 0;
    }

    if (self->priv->menu)
    {
        g_object_unref(self->priv->menu);
        g_object_unref(self->priv->menuItemCopy);
        g_object_unref(self->priv->menuItemBlock);
        self->priv->menu = 0;
    }

    if (self->priv->osso)
    {
        osso_deinitialize(self->priv->osso);
        self->priv->osso = 0;
    }

    G_OBJECT_CLASS(switcher_button_parent_class)->dispose(gobject);
}
static void
destroy_pager(GtkWidget * widget, PagerData *pager)
{
	GConfClient *client = gconf_client_get_default ();

	gconf_client_notify_remove (client, pager->listeners[0]);
	gconf_client_notify_remove (client, pager->listeners[1]);
	gconf_client_notify_remove (client, pager->listeners[2]);

	g_object_unref (G_OBJECT (client));

	pager->listeners[0] = 0;
	pager->listeners[1] = 0;
	pager->listeners[2] = 0;

	if (pager->properties_dialog)
		gtk_widget_destroy (pager->properties_dialog);

	if (pager->about)
		gtk_widget_destroy (pager->about);

	g_free (pager);
}
void
eel_gconf_notification_remove (guint notification_id)
{
    GConfClient *client;

    if (notification_id == EEL_GCONF_UNDEFINED_CONNECTION) {
        return;
    }

    client = eel_gconf_client_get_global ();
    g_return_if_fail (client != NULL);

    gconf_client_notify_remove (client, notification_id);
}
static void
gst_gconf_video_src_dispose (GObject * object)
{
  GstGConfVideoSrc *src = GST_GCONF_VIDEO_SRC (object);

  if (src->client) {
    if (src->notify_id != 0)
      gconf_client_notify_remove (src->client, src->notify_id);

    g_object_unref (G_OBJECT (src->client));
    src->client = NULL;
  }

  GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
}
static void
panel_properties_dialog_free (PanelPropertiesDialog *dialog)
{
	GConfClient *client;

	client = panel_gconf_get_client ();

	if (dialog->toplevel_notify)
		gconf_client_notify_remove (client, dialog->toplevel_notify);
	dialog->toplevel_notify = 0;

	if (dialog->background_notify)
		gconf_client_notify_remove (client, dialog->background_notify);
	dialog->background_notify = 0;

	if (dialog->properties_dialog)
		gtk_widget_destroy (dialog->properties_dialog);
	dialog->properties_dialog = NULL;

	g_free (dialog->icon_theme_dir);
	dialog->icon_theme_dir = NULL;

	g_free (dialog);
}
Exemple #23
0
static void
dispose (GObject *object)
{
	EAccountList *account_list = E_ACCOUNT_LIST (object);

	if (account_list->priv->gconf) {
		if (account_list->priv->notify_id) {
			gconf_client_notify_remove (account_list->priv->gconf,
						    account_list->priv->notify_id);
		}
		g_object_unref (account_list->priv->gconf);
		account_list->priv->gconf = NULL;
	}

	G_OBJECT_CLASS (e_account_list_parent_class)->dispose (object);
}
static void
mud_connections_finalize (GObject *object)
{
    MudConnections *conn;
    GObjectClass *parent_class;
    GConfClient *client = gconf_client_get_default();

    conn = MUD_CONNECTIONS(object);

    gconf_client_notify_remove(client, conn->priv->connection);
	
    parent_class = g_type_class_peek_parent(G_OBJECT_GET_CLASS(object));
    parent_class->finalize(object);

    g_object_unref(client);
}
Exemple #25
0
static void
gconf_settings_backend_free_notifier (GConfSettingsBackendNotifier *notifier,
                                      GConfSettingsBackend         *gconf)
{
  if (notifier->path)
    g_free (notifier->path);
  notifier->path = NULL;

  if (notifier->notify_id)
    gconf_client_notify_remove (gconf->priv->client, notifier->notify_id);
  notifier->notify_id = 0;

  g_slist_foreach (notifier->subpaths, (GFunc) gconf_settings_backend_free_notifier, gconf);
  g_slist_free (notifier->subpaths);
  notifier->subpaths = NULL;

  g_slice_free (GConfSettingsBackendNotifier, notifier);
}
static void
gconf_bookmarks_dialog_finalize (GObject *object)
{
	GConfClient *client;
	GConfBookmarksDialog *dialog;

	client = gconf_client_get_default ();
	dialog = GCONF_BOOKMARKS_DIALOG (object);

	if (dialog->notify_id != 0) {
		gconf_client_notify_remove (client, dialog->notify_id);
		gconf_client_remove_dir (client, BOOKMARKS_KEY, NULL);
		dialog->notify_id = 0;
	}

	g_object_unref (client);

	G_OBJECT_CLASS (gconf_bookmarks_dialog_parent_class)->finalize (object);
}
Exemple #27
0
static void
shell_status_menu_finalize (GObject *object)
{
  ShellStatusMenu *status = SHELL_STATUS_MENU (object);
  ShellStatusMenuPrivate *priv = status->priv;

  gconf_client_notify_remove (priv->client, priv->client_notify_lockdown_id);

  g_signal_handler_disconnect (priv->user, priv->user_notify_id);
  g_signal_handler_disconnect (priv->user, priv->user_icon_changed_id);

  if (priv->user != NULL) {
    g_object_unref (priv->user);
  }
  g_object_unref (priv->client);
  g_object_unref (priv->manager);

  G_OBJECT_CLASS (shell_status_menu_parent_class)->finalize (object);
}
static void
panel_menu_button_disconnect_from_gconf (PanelMenuButton *button)
{
	GConfClient *client;
	const char  *key;

	if (!button->priv->gconf_notify)
		return;

	client  = panel_gconf_get_client ();

	key = panel_gconf_sprintf (PANEL_CONFIG_DIR "/objects/%s",
				   button->priv->applet_id);

	gconf_client_notify_remove (client, button->priv->gconf_notify);
	button->priv->gconf_notify = 0;

	gconf_client_remove_dir (client, key, NULL);
}
void
gnc_gconf_remove_anon_notification (const gchar *section,
                                    guint cnxn_id)
{
    GConfClient *client;
    gchar *path;

    /*
     * Remove any gconf notifications
     */
    path = gnc_gconf_section_name(section);
    client = gconf_client_get_default();
    if (client)
    {
        gconf_client_notify_remove(client, cnxn_id);
        gconf_client_remove_dir(client, path, NULL);
        g_object_unref(client);
    }
    g_free(path);
}
Exemple #30
0
static void
gdict_pref_dialog_finalize (GObject *object)
{
  GdictPrefDialog *dialog = GDICT_PREF_DIALOG (object);
  
  if (dialog->notify_id);
    gconf_client_notify_remove (dialog->gconf_client, dialog->notify_id);
  
  if (dialog->gconf_client)
    g_object_unref (dialog->gconf_client);
  
  if (dialog->builder)
    g_object_unref (dialog->builder);

  if (dialog->active_source)
    g_free (dialog->active_source);
  
  if (dialog->loader)
    g_object_unref (dialog->loader);
  
  G_OBJECT_CLASS (gdict_pref_dialog_parent_class)->finalize (object);
}