[gimp] plug-ins: remove dead code from the image-map plug-in
- From: Sven Neumann <neo src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: remove dead code from the image-map plug-in
- Date: Mon, 9 Nov 2009 18:03:41 +0000 (UTC)
commit 8c49ecb2e5981a2c93298e72c00183629484b4a0
Author: Sven Neumann <sven gimp org>
Date: Mon Nov 9 18:59:06 2009 +0100
plug-ins: remove dead code from the image-map plug-in
Remove code that has been commented out long ago when this plug-in
was ported from GtkCList to GtkTreeView.
plug-ins/imagemap/imap_selection.c | 29 -----------------------------
plug-ins/imagemap/imap_selection.h | 10 +++-------
2 files changed, 3 insertions(+), 36 deletions(-)
---
diff --git a/plug-ins/imagemap/imap_selection.c b/plug-ins/imagemap/imap_selection.c
index 7027fb3..5628aef 100644
--- a/plug-ins/imagemap/imap_selection.c
+++ b/plug-ins/imagemap/imap_selection.c
@@ -35,29 +35,6 @@
#include "libgimp/stdplugins-intl.h"
-static void
-set_buttons(Selection_t *data)
-{
-#ifdef _OLD_
- if (gtk_tree_selection_count_selected_rows (data->selection)) {
-#ifdef _OLD_
- gtk_widget_set_sensitive(data->arrow_up,
- (data->selected_row) ? TRUE : FALSE);
- if (data->selected_row < GTK_CLIST(data->list)->rows - 1)
- gtk_widget_set_sensitive(data->arrow_down, TRUE);
- else
- gtk_widget_set_sensitive(data->arrow_down, FALSE);
-#endif
- gtk_widget_set_sensitive(data->remove, TRUE);
- gtk_widget_set_sensitive(data->edit, TRUE);
- } else {
- gtk_widget_set_sensitive(data->arrow_up, FALSE);
- gtk_widget_set_sensitive(data->arrow_down, FALSE);
- gtk_widget_set_sensitive(data->remove, FALSE);
- gtk_widget_set_sensitive(data->edit, FALSE);
- }
-#endif
-}
static void
changed_cb(GtkTreeSelection *selection, gpointer param)
@@ -100,8 +77,6 @@ changed_cb(GtkTreeSelection *selection, gpointer param)
g_list_foreach (selected_rows, (GFunc) gtk_tree_path_free, NULL);
g_list_free (selected_rows);
-
- set_buttons (data);
}
}
@@ -222,7 +197,6 @@ object_removed_cb(Object_t *obj, gpointer data)
if (selection_find_object (selection, obj, &iter)) {
gtk_list_store_remove (GTK_LIST_STORE (selection->store), &iter);
- set_buttons(selection);
}
}
@@ -232,7 +206,6 @@ object_selected_cb(Object_t *obj, gpointer data)
Selection_t *selection = (Selection_t*) data;
gint position = object_get_position_in_list (obj);
selection_set_selected (selection, position);
- set_buttons(selection);
}
static void
@@ -456,8 +429,6 @@ make_selection(ObjectList_t *object_list)
gtk_tree_selection_set_mode (data->selection, GTK_SELECTION_MULTIPLE);
g_signal_connect (data->selection, "changed", G_CALLBACK(changed_cb), data);
- set_buttons (data);
-
/* Set object list callbacks we're interested in */
object_list_add_add_cb (object_list, object_added_cb, data);
object_list_add_update_cb (object_list, object_updated_cb, data);
diff --git a/plug-ins/imagemap/imap_selection.h b/plug-ins/imagemap/imap_selection.h
index dadbb8f..4de3c35 100644
--- a/plug-ins/imagemap/imap_selection.h
+++ b/plug-ins/imagemap/imap_selection.h
@@ -30,13 +30,9 @@ typedef struct {
GtkListStore *store;
GtkTreeSelection *selection;
- GtkWidget *container;
- GtkWidget *list;
- GtkWidget *selected_child;
- GtkWidget *arrow_up;
- GtkWidget *arrow_down;
- GtkWidget *remove;
- GtkWidget *edit;
+ GtkWidget *container;
+ GtkWidget *list;
+ GtkWidget *selected_child;
ObjectList_t *object_list;
gint selected_row;
gint nr_rows;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]