[gnome-control-center] background: Remove the "changed" signal
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Remove the "changed" signal
- Date: Sat, 12 Feb 2011 03:14:13 +0000 (UTC)
commit c016e5cea2287c55f57e2448cf04599c3550215e
Author: Bastien Nocera <hadess hadess net>
Date: Fri Feb 11 20:24:31 2011 +0000
background: Remove the "changed" signal
It wasn't used anyway.
panels/background/bg-pictures-source.c | 10 -----
panels/background/bg-wallpapers-source.c | 65 +-----------------------------
panels/background/cc-background-item.c | 30 --------------
panels/background/cc-background-item.h | 1 -
4 files changed, 1 insertions(+), 105 deletions(-)
---
diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c
index 400684d..57498fa 100644
--- a/panels/background/bg-pictures-source.c
+++ b/panels/background/bg-pictures-source.c
@@ -127,7 +127,6 @@ picture_scaled (GObject *source_object,
GdkPixbuf *pixbuf;
GtkTreeIter iter;
- GtkTreePath *tree_path;
GtkListStore *store;
store = bg_source_get_liststore (BG_SOURCE (bg_source));
@@ -147,15 +146,6 @@ picture_scaled (GObject *source_object,
0, pixbuf,
1, item,
-1);
- tree_path = gtk_tree_model_get_path (GTK_TREE_MODEL (store),
- &iter);
- //FIXME rowref
-#if 0
- item->rowref = gtk_tree_row_reference_new (GTK_TREE_MODEL (store),
- tree_path);
-#endif
- gtk_tree_path_free (tree_path);
-
g_object_unref (pixbuf);
}
diff --git a/panels/background/bg-wallpapers-source.c b/panels/background/bg-wallpapers-source.c
index c8fe50e..4f8dfa5 100644
--- a/panels/background/bg-wallpapers-source.c
+++ b/panels/background/bg-wallpapers-source.c
@@ -107,65 +107,9 @@ bg_wallpapers_source_class_init (BgWallpapersSourceClass *klass)
object_class->finalize = bg_wallpapers_source_finalize;
}
-//FIXME
-#if 0
-static gboolean
-find_wallpaper (gpointer key,
- gpointer value,
- gpointer data)
-{
- GnomeBG *bg = data;
- CcBackgroundItem *item = value;
-
- return item->bg == bg;
-}
-
-/* FIXME: Is this used for anything? */
-static void
-item_changed_cb (GnomeBG *bg,
- GnomeWpXml *data)
-{
- GtkTreeModel *model;
- GtkTreeIter iter;
- GtkTreePath *path;
- CcBackgroundItem *item;
-
- item = g_hash_table_find (data->wp_hash, find_wallpaper, bg);
-
- if (!item)
- return;
-
- model = gtk_tree_row_reference_get_model (item->rowref);
- path = gtk_tree_row_reference_get_path (item->rowref);
-
- if (gtk_tree_model_get_iter (model, &iter, path))
- {
- GIcon *pixbuf;
-
- g_signal_handlers_block_by_func (bg, G_CALLBACK (item_changed_cb), data);
-
- pixbuf = cc_background_item_get_thumbnail (item,
- data->thumb_factory,
- data->thumb_width,
- data->thumb_height);
- if (pixbuf)
- {
- gtk_list_store_set (GTK_LIST_STORE (data->wp_model), &iter,
- 0, pixbuf, -1);
- g_object_unref (pixbuf);
- }
-
- g_signal_handlers_unblock_by_func (bg, G_CALLBACK (item_changed_cb),
- data);
- }
-}
-#endif
-
-
-
static void
load_wallpapers (gchar *key,
- CcBackgroundItem *item,
+ CcBackgroundItem *item,
BgWallpapersSource *source)
{
BgWallpapersSourcePrivate *priv = source->priv;
@@ -184,7 +128,6 @@ load_wallpapers (gchar *key,
pixbuf = cc_background_item_get_thumbnail (item, priv->thumb_factory,
THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT);
-// cc_background_item_update_size (item, NULL);
gtk_list_store_set (store, &iter,
0, pixbuf,
@@ -193,12 +136,6 @@ load_wallpapers (gchar *key,
if (pixbuf)
g_object_unref (pixbuf);
-
-#if 0
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
- item->rowref = gtk_tree_row_reference_new (GTK_TREE_MODEL (store), path);
- gtk_tree_path_free (path);
-#endif
}
static void
diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c
index 822e21a..9ba7dc1 100644
--- a/panels/background/cc-background-item.c
+++ b/panels/background/cc-background-item.c
@@ -74,13 +74,6 @@ enum {
PROP_SIZE
};
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-static guint signals [LAST_SIGNAL] = { 0, };
-
static void cc_background_item_class_init (CcBackgroundItemClass *klass);
static void cc_background_item_init (CcBackgroundItem *background_item);
static void cc_background_item_finalize (GObject *object);
@@ -273,13 +266,6 @@ update_info (CcBackgroundItem *item,
}
-static void
-on_bg_changed (GnomeBG *bg,
- CcBackgroundItem *item)
-{
- g_signal_emit (item, signals[CHANGED], 0);
-}
-
gboolean
cc_background_item_load (CcBackgroundItem *item,
GFileInfo *info)
@@ -592,17 +578,6 @@ cc_background_item_class_init (CcBackgroundItemClass *klass)
object_class->constructor = cc_background_item_constructor;
object_class->finalize = cc_background_item_finalize;
- signals [CHANGED]
- = g_signal_new ("changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
-
g_object_class_install_property (object_class,
PROP_NAME,
g_param_spec_string ("name",
@@ -701,11 +676,6 @@ cc_background_item_init (CcBackgroundItem *item)
item->priv->bg = gnome_bg_new ();
- g_signal_connect (item->priv->bg,
- "changed",
- G_CALLBACK (on_bg_changed),
- item);
-
item->priv->shading = G_DESKTOP_BACKGROUND_SHADING_SOLID;
item->priv->placement = G_DESKTOP_BACKGROUND_STYLE_SCALED;
item->priv->primary_color = g_strdup ("#000000000000");
diff --git a/panels/background/cc-background-item.h b/panels/background/cc-background-item.h
index dd88db9..8180f2f 100644
--- a/panels/background/cc-background-item.h
+++ b/panels/background/cc-background-item.h
@@ -61,7 +61,6 @@ typedef struct
typedef struct
{
GObjectClass parent_class;
- void (* changed) (CcBackgroundItem *item);
} CcBackgroundItemClass;
GType cc_background_item_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]