[gthumb: 2/15] file store: removed the 'checked' property as it is unused
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 2/15] file store: removed the 'checked' property as it is unused
- Date: Wed, 23 Nov 2011 12:50:01 +0000 (UTC)
commit 4d217b310479b3e3a6a05ca784714cfbec0d1879
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Nov 22 11:38:22 2011 +0100
file store: removed the 'checked' property as it is unused
gthumb/gth-file-list.c | 1 -
gthumb/gth-file-store.c | 72 ++---------------------------------------------
gthumb/gth-file-store.h | 8 +----
3 files changed, 4 insertions(+), 77 deletions(-)
---
diff --git a/gthumb/gth-file-list.c b/gthumb/gth-file-list.c
index 7554445..5126f1b 100644
--- a/gthumb/gth-file-list.c
+++ b/gthumb/gth-file-list.c
@@ -873,7 +873,6 @@ gfl_add_files (GthFileList *file_list,
gth_file_store_queue_add (file_store,
file_data,
pixbuf,
- TRUE,
TRUE);
if (pixbuf != NULL)
diff --git a/gthumb/gth-file-store.c b/gthumb/gth-file-store.c
index 8728f7c..403ac60 100644
--- a/gthumb/gth-file-store.c
+++ b/gthumb/gth-file-store.c
@@ -32,7 +32,6 @@
enum {
- CHECK_CHANGED,
VISIBILITY_CHANGED,
THUMBNAIL_CHANGED,
LAST_SIGNAL
@@ -49,7 +48,6 @@ typedef struct {
GthFileData *file_data;
GdkPixbuf *thumbnail;
gboolean is_icon;
- gboolean checked;
/*< private >*/
@@ -74,7 +72,6 @@ struct _GthFileStorePrivate
GthFileDataCompFunc cmp_func;
gboolean inverse_sort;
gboolean update_filter;
- gboolean check_changed;
};
@@ -138,7 +135,6 @@ _gth_file_row_copy (GthFileRow *row)
_gth_file_row_set_file (row2, row->file_data);
_gth_file_row_set_thumbnail (row2, row->thumbnail);
row2->is_icon = row->is_icon;
- row2->checked = row->checked;
row2->pos = row->pos;
row2->abs_pos = row->abs_pos;
row2->visible = row->visible;
@@ -223,15 +219,6 @@ gth_file_store_class_init (GthFileStoreClass *klass)
object_class = (GObjectClass*) klass;
object_class->finalize = gth_file_store_finalize;
- gth_file_store_signals[CHECK_CHANGED] =
- g_signal_new ("check_changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GthFileStoreClass, check_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
gth_file_store_signals[VISIBILITY_CHANGED] =
g_signal_new ("visibility_changed",
G_TYPE_FROM_CLASS (klass),
@@ -271,13 +258,11 @@ gth_file_store_init (GthFileStore *file_store)
file_store->priv->cmp_func = NULL;
file_store->priv->inverse_sort = FALSE;
file_store->priv->update_filter = FALSE;
- file_store->priv->check_changed = FALSE;
if (column_type[0] == G_TYPE_INVALID) {
column_type[GTH_FILE_STORE_FILE_DATA_COLUMN] = GTH_TYPE_FILE_DATA;
column_type[GTH_FILE_STORE_THUMBNAIL_COLUMN] = GDK_TYPE_PIXBUF;
column_type[GTH_FILE_STORE_IS_ICON_COLUMN] = G_TYPE_BOOLEAN;
- column_type[GTH_FILE_STORE_CHECKED_COLUMN] = G_TYPE_BOOLEAN;
}
}
@@ -389,10 +374,6 @@ gth_file_store_get_value (GtkTreeModel *tree_model,
g_value_init (value, G_TYPE_BOOLEAN);
g_value_set_boolean (value, row->is_icon);
break;
- case GTH_FILE_STORE_CHECKED_COLUMN:
- g_value_init (value, G_TYPE_BOOLEAN);
- g_value_set_boolean (value, row->checked);
- break;
}
}
@@ -1039,7 +1020,6 @@ g_print (" INSERT: %d\n", i);
}
g_signal_emit (file_store, gth_file_store_signals[VISIBILITY_CHANGED], 0);
- g_signal_emit (file_store, gth_file_store_signals[CHECK_CHANGED], 0);
g_free (new_rows);
g_free (old_rows);
@@ -1149,40 +1129,6 @@ gth_file_store_n_visibles (GthFileStore *file_store)
}
-GList *
-gth_file_store_get_checked (GthFileStore *file_store)
-{
- GList *list = NULL;
- int i;
-
- for (i = 0; i < file_store->priv->num_rows; i++) {
- GthFileRow *row = file_store->priv->rows[i];
-
- if ((row != NULL) && row->checked)
- list = g_list_prepend (list, g_object_ref (file_store->priv->rows[i]->file_data));
- }
-
- return g_list_reverse (list);
-}
-
-
-int
-gth_file_store_get_n_checked (GthFileStore *file_store)
-{
- int n = 0;
- int i;
-
- for (i = 0; i < file_store->priv->num_rows; i++) {
- GthFileRow *row = file_store->priv->rows[i];
-
- if ((row != NULL) && row->checked)
- n++;
- }
-
- return n;
-}
-
-
GthFileData *
gth_file_store_get_file (GthFileStore *file_store,
GtkTreeIter *iter)
@@ -1386,10 +1332,9 @@ gth_file_store_add (GthFileStore *file_store,
GthFileData *file,
GdkPixbuf *thumbnail,
gboolean is_icon,
- gboolean checked,
int position)
{
- gth_file_store_queue_add (file_store, file, thumbnail, is_icon, checked);
+ gth_file_store_queue_add (file_store, file, thumbnail, is_icon);
gth_file_store_exec_add (file_store, position);
}
@@ -1398,8 +1343,7 @@ void
gth_file_store_queue_add (GthFileStore *file_store,
GthFileData *file,
GdkPixbuf *thumbnail,
- gboolean is_icon,
- gboolean checked)
+ gboolean is_icon)
{
GthFileRow *row;
@@ -1409,7 +1353,6 @@ gth_file_store_queue_add (GthFileStore *file_store,
_gth_file_row_set_file (row, file);
_gth_file_row_set_thumbnail (row, thumbnail);
row->is_icon = is_icon;
- row->checked = checked;
file_store->priv->queue = g_list_prepend (file_store->priv->queue, row);
}
@@ -1459,11 +1402,6 @@ gth_file_store_queue_set_valist (GthFileStore *file_store,
row->is_icon = va_arg (var_args, gboolean);
row->changed = TRUE;
break;
- case GTH_FILE_STORE_CHECKED_COLUMN:
- row->checked = va_arg (var_args, gboolean);
- row->changed = TRUE;
- file_store->priv->check_changed = TRUE;
- break;
default:
g_warning ("%s: Invalid column number %d added to iter (remember to end your list of columns with a -1)", G_STRLOC, column);
break;
@@ -1579,7 +1517,7 @@ gth_file_store_exec_set (GthFileStore *file_store)
* GtkIconView to invalidate the size of all the items, and instead
* emit a single 'thumbnail-changed' signal that can be used to just
* redraw the GthFileView. */
- if (file_store->priv->update_filter || file_store->priv->check_changed)
+ if (file_store->priv->update_filter)
_gth_file_store_list_changed (file_store);
else
_gth_file_store_thumbnails_changed (file_store);
@@ -1590,10 +1528,6 @@ gth_file_store_exec_set (GthFileStore *file_store)
_gth_file_store_update_visibility (file_store, NULL, -1);
file_store->priv->update_filter = FALSE;
}
- else if (file_store->priv->check_changed) {
- g_signal_emit (file_store, gth_file_store_signals[CHECK_CHANGED], 0);
- file_store->priv->check_changed = FALSE;
- }
}
diff --git a/gthumb/gth-file-store.h b/gthumb/gth-file-store.h
index 8093e83..6dd3fbf 100644
--- a/gthumb/gth-file-store.h
+++ b/gthumb/gth-file-store.h
@@ -43,7 +43,6 @@ enum {
GTH_FILE_STORE_FILE_DATA_COLUMN,
GTH_FILE_STORE_THUMBNAIL_COLUMN,
GTH_FILE_STORE_IS_ICON_COLUMN,
- GTH_FILE_STORE_CHECKED_COLUMN,
GTH_FILE_STORE_N_COLUMNS
};
@@ -58,7 +57,6 @@ struct _GthFileStoreClass
GObjectClass __parent_class;
void (*visibility_changed) (GthFileStore *self);
- void (*check_changed) (GthFileStore *self);
void (*thumbnail_changed) (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter);
@@ -75,8 +73,6 @@ GList * gth_file_store_get_all (GthFileStore *file_sto
int gth_file_store_n_files (GthFileStore *file_store);
GList * gth_file_store_get_visibles (GthFileStore *file_store);
int gth_file_store_n_visibles (GthFileStore *file_store);
-GList * gth_file_store_get_checked (GthFileStore *file_store);
-int gth_file_store_get_n_checked (GthFileStore *file_store);
GthFileData * gth_file_store_get_file (GthFileStore *file_store,
GtkTreeIter *iter);
gboolean gth_file_store_find (GthFileStore *file_store,
@@ -105,13 +101,11 @@ void gth_file_store_add (GthFileStore *file_sto
GthFileData *file,
GdkPixbuf *thumbnail,
gboolean is_icon,
- gboolean checked,
int position);
void gth_file_store_queue_add (GthFileStore *file_store,
GthFileData *file,
GdkPixbuf *thumbnail,
- gboolean is_icon,
- gboolean checked);
+ gboolean is_icon);
void gth_file_store_exec_add (GthFileStore *file_store,
int position);
void gth_file_store_set (GthFileStore *file_store,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]