[gimp] app: remove the model column enum from gimpcontainertreeview.h
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove the model column enum from gimpcontainertreeview.h
- Date: Mon, 17 May 2010 19:29:16 +0000 (UTC)
commit e1a88379d03c78f9472374be92031dff7c2a0753
Author: Michael Natterer <mitch gimp org>
Date: Mon May 17 21:28:17 2010 +0200
app: remove the model column enum from gimpcontainertreeview.h
and use the right enum from gimpcontainertreestore.h all over the
place instead.
app/widgets/gimpcontainertreeview-dnd.c | 3 +-
app/widgets/gimpcontainertreeview.c | 34 +++++++++++++++---------------
app/widgets/gimpcontainertreeview.h | 11 ----------
app/widgets/gimpdatafactoryview.c | 5 ++-
app/widgets/gimpdeviceeditor.c | 9 ++++---
app/widgets/gimpitemtreeview.c | 8 +++---
app/widgets/gimplayertreeview.c | 8 +++---
app/widgets/gimpsettingseditor.c | 7 +++--
app/widgets/gimptemplateview.c | 5 ++-
app/widgets/gimptooleditor.c | 5 ++-
10 files changed, 45 insertions(+), 50 deletions(-)
---
diff --git a/app/widgets/gimpcontainertreeview-dnd.c b/app/widgets/gimpcontainertreeview-dnd.c
index 0b03f8e..d0cb716 100644
--- a/app/widgets/gimpcontainertreeview-dnd.c
+++ b/app/widgets/gimpcontainertreeview-dnd.c
@@ -27,6 +27,7 @@
#include "core/gimpcontainer.h"
#include "core/gimpviewable.h"
+#include "gimpcontainertreestore.h"
#include "gimpcontainertreeview.h"
#include "gimpcontainertreeview-dnd.h"
#include "gimpcontainertreeview-private.h"
@@ -105,7 +106,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
gtk_tree_model_get_iter (tree_view->model, &iter, drop_path);
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
dest_viewable = renderer->viewable;
diff --git a/app/widgets/gimpcontainertreeview.c b/app/widgets/gimpcontainertreeview.c
index eb483ff..ab0c209 100644
--- a/app/widgets/gimpcontainertreeview.c
+++ b/app/widgets/gimpcontainertreeview.c
@@ -172,23 +172,23 @@ gimp_container_tree_view_init (GimpContainerTreeView *tree_view)
GIMP_TYPE_CONTAINER_TREE_VIEW,
GimpContainerTreeViewPriv);
- g_assert (GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER ==
+ g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER ==
gimp_container_tree_store_columns_add (tree_view->model_columns,
&tree_view->n_model_columns,
GIMP_TYPE_VIEW_RENDERER));
- g_assert (GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME ==
+ g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME ==
gimp_container_tree_store_columns_add (tree_view->model_columns,
&tree_view->n_model_columns,
G_TYPE_STRING));
- g_assert (GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_ATTRIBUTES ==
+ g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_ATTRIBUTES ==
gimp_container_tree_store_columns_add (tree_view->model_columns,
&tree_view->n_model_columns,
PANGO_TYPE_ATTR_LIST));
- g_assert (GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_SENSITIVE ==
+ g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_SENSITIVE ==
gimp_container_tree_store_columns_add (tree_view->model_columns,
&tree_view->n_model_columns,
G_TYPE_BOOLEAN));
- g_assert (GIMP_CONTAINER_TREE_VIEW_COLUMN_USER_DATA ==
+ g_assert (GIMP_CONTAINER_TREE_STORE_COLUMN_USER_DATA ==
gimp_container_tree_store_columns_add (tree_view->model_columns,
&tree_view->n_model_columns,
G_TYPE_POINTER));
@@ -221,7 +221,7 @@ gimp_container_tree_view_constructor (GType type,
tree_view->view = g_object_new (GTK_TYPE_TREE_VIEW,
"model", tree_view->model,
- "search-column", GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME,
+ "search-column", GIMP_CONTAINER_TREE_STORE_COLUMN_NAME,
"enable-search", FALSE,
"headers-visible", FALSE,
"has-tooltip", TRUE,
@@ -248,7 +248,7 @@ gimp_container_tree_view_constructor (GType type,
gtk_tree_view_column_set_attributes (tree_view->main_column,
tree_view->renderer_cell,
- "renderer", GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER,
+ "renderer", GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER,
NULL);
tree_view->priv->name_cell = gtk_cell_renderer_text_new ();
@@ -259,9 +259,9 @@ gimp_container_tree_view_constructor (GType type,
gtk_tree_view_column_set_attributes (tree_view->main_column,
tree_view->priv->name_cell,
- "text", GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME,
- "attributes", GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_ATTRIBUTES,
- "sensitive", GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_SENSITIVE,
+ "text", GIMP_CONTAINER_TREE_STORE_COLUMN_NAME,
+ "attributes", GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_ATTRIBUTES,
+ "sensitive", GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_SENSITIVE,
NULL);
g_signal_connect (tree_view->priv->name_cell, "editing-canceled",
@@ -655,7 +655,7 @@ gimp_container_tree_view_reorder_item (GimpContainerView *view,
GimpViewRenderer *renderer;
gtk_tree_model_get (tree_view->model, &selected_iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
if (renderer->viewable != viewable)
@@ -820,13 +820,13 @@ gimp_container_tree_view_name_canceled (GtkCellRendererText *cell,
gchar *name;
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
name = gimp_viewable_get_description (renderer->viewable, NULL);
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model), &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME, name,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME, name,
-1);
g_free (name);
@@ -921,7 +921,7 @@ gimp_container_tree_view_button_press (GtkWidget *widget,
gtk_tree_model_get_iter (tree_view->model, &iter, path);
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
tree_view->priv->dnd_renderer = renderer;
@@ -1057,7 +1057,7 @@ gimp_container_tree_view_button_press (GtkWidget *widget,
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model),
&iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME,
real_name,
-1);
}
@@ -1152,7 +1152,7 @@ gimp_container_tree_view_tooltip (GtkWidget *widget,
return FALSE;
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
if (renderer)
@@ -1274,7 +1274,7 @@ gimp_container_tree_view_get_selected (GimpContainerView *view,
(GtkTreePath *) current_row->data);
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
if (renderer->viewable)
diff --git a/app/widgets/gimpcontainertreeview.h b/app/widgets/gimpcontainertreeview.h
index 5b367dd..8bfb6d0 100644
--- a/app/widgets/gimpcontainertreeview.h
+++ b/app/widgets/gimpcontainertreeview.h
@@ -25,17 +25,6 @@
#include "gimpcontainerbox.h"
-enum
-{
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_ATTRIBUTES,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_SENSITIVE,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_USER_DATA,
- GIMP_CONTAINER_TREE_VIEW_N_COLUMNS
-};
-
-
#define GIMP_TYPE_CONTAINER_TREE_VIEW (gimp_container_tree_view_get_type ())
#define GIMP_CONTAINER_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CONTAINER_TREE_VIEW, GimpContainerTreeView))
#define GIMP_CONTAINER_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CONTAINER_TREE_VIEW, GimpContainerTreeViewClass))
diff --git a/app/widgets/gimpdatafactoryview.c b/app/widgets/gimpdatafactoryview.c
index b22b9dd..1d1a98a 100644
--- a/app/widgets/gimpdatafactoryview.c
+++ b/app/widgets/gimpdatafactoryview.c
@@ -41,6 +41,7 @@
#include "gimpcombotagentry.h"
#include "gimpcontainergridview.h"
+#include "gimpcontainertreestore.h"
#include "gimpcontainertreeview.h"
#include "gimpcontainerview.h"
#include "gimpdatafactoryview.h"
@@ -390,7 +391,7 @@ gimp_data_factory_view_tree_name_edited (GtkCellRendererText *cell,
gchar *name;
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
data = GIMP_DATA (renderer->viewable);
@@ -410,7 +411,7 @@ gimp_data_factory_view_tree_name_edited (GtkCellRendererText *cell,
name = gimp_viewable_get_description (renderer->viewable, NULL);
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model), &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME, name,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME, name,
-1);
g_free (name);
}
diff --git a/app/widgets/gimpdeviceeditor.c b/app/widgets/gimpdeviceeditor.c
index 24b8252..03d00b0 100644
--- a/app/widgets/gimpdeviceeditor.c
+++ b/app/widgets/gimpdeviceeditor.c
@@ -31,6 +31,7 @@
#include "core/gimpmarshal.h"
#include "gimpcontainerview.h"
+#include "gimpcontainertreestore.h"
#include "gimpcontainertreeview.h"
#include "gimpdeviceeditor.h"
#include "gimpdeviceinfo.h"
@@ -331,8 +332,8 @@ gimp_device_editor_add_device (GimpContainer *container,
treeview = GIMP_CONTAINER_TREE_VIEW (private->treeview);
gtk_tree_store_set (GTK_TREE_STORE (treeview->model), iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_USER_DATA, widget,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_SENSITIVE,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_USER_DATA, widget,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_SENSITIVE,
gimp_device_info_get_device (info, NULL) != NULL,
-1);
}
@@ -357,7 +358,7 @@ gimp_device_editor_remove_device (GimpContainer *container,
treeview = GIMP_CONTAINER_TREE_VIEW (private->treeview);
gtk_tree_model_get (treeview->model, iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_USER_DATA, &widget,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_USER_DATA, &widget,
-1);
if (widget)
@@ -381,7 +382,7 @@ gimp_device_editor_select_device (GimpContainerView *view,
treeview = GIMP_CONTAINER_TREE_VIEW (private->treeview);
gtk_tree_model_get (treeview->model, insert_data,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_USER_DATA, &widget,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_USER_DATA, &widget,
-1);
if (widget)
diff --git a/app/widgets/gimpitemtreeview.c b/app/widgets/gimpitemtreeview.c
index 276e2e5..b06f0c2 100644
--- a/app/widgets/gimpitemtreeview.c
+++ b/app/widgets/gimpitemtreeview.c
@@ -1196,7 +1196,7 @@ gimp_item_tree_view_name_edited (GtkCellRendererText *cell,
GError *error = NULL;
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
item = GIMP_ITEM (renderer->viewable);
@@ -1216,7 +1216,7 @@ gimp_item_tree_view_name_edited (GtkCellRendererText *cell,
gchar *name = gimp_viewable_get_description (renderer->viewable, NULL);
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model), &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME, name,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME, name,
-1);
g_free (name);
@@ -1442,7 +1442,7 @@ gimp_item_tree_view_toggle_clicked (GtkCellRendererToggle *toggle,
context = gimp_container_view_get_context (GIMP_CONTAINER_VIEW (view));
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
g_object_get (toggle,
"active", &active,
@@ -1467,7 +1467,7 @@ gimp_item_tree_view_toggle_clicked (GtkCellRendererToggle *toggle,
&iter))
{
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
if ((GimpItem *) renderer->viewable != item)
diff --git a/app/widgets/gimplayertreeview.c b/app/widgets/gimplayertreeview.c
index bfef07d..1727201 100644
--- a/app/widgets/gimplayertreeview.c
+++ b/app/widgets/gimplayertreeview.c
@@ -896,7 +896,7 @@ gimp_layer_tree_view_floating_selection_changed (GimpImage *image,
if (iter)
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model), iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_ATTRIBUTES,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_ATTRIBUTES,
layer_view->priv->italic_attrs,
-1);
}
@@ -915,7 +915,7 @@ gimp_layer_tree_view_floating_selection_changed (GimpImage *image,
if (iter)
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model), iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_ATTRIBUTES,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_ATTRIBUTES,
gimp_drawable_has_alpha (drawable) ?
NULL : layer_view->priv->bold_attrs,
-1);
@@ -1262,7 +1262,7 @@ gimp_layer_tree_view_update_borders (GimpLayerTreeView *layer_view,
GimpViewBorderType layer_type = GIMP_VIEW_BORDER_BLACK;
gtk_tree_model_get (tree_view->model, iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &layer_renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &layer_renderer,
layer_view->priv->model_column_mask, &mask_renderer,
-1);
@@ -1433,7 +1433,7 @@ gimp_layer_tree_view_alpha_update (GimpLayerTreeView *view,
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model), iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME_ATTRIBUTES,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME_ATTRIBUTES,
gimp_drawable_has_alpha (GIMP_DRAWABLE (layer)) ?
NULL : view->priv->bold_attrs,
-1);
diff --git a/app/widgets/gimpsettingseditor.c b/app/widgets/gimpsettingseditor.c
index 79ea54b..bcd7e5f 100644
--- a/app/widgets/gimpsettingseditor.c
+++ b/app/widgets/gimpsettingseditor.c
@@ -34,6 +34,7 @@
#include "core/gimplist.h"
#include "core/gimpviewable.h"
+#include "gimpcontainertreestore.h"
#include "gimpcontainertreeview.h"
#include "gimpcontainerview.h"
#include "gimpsettingseditor.h"
@@ -283,7 +284,7 @@ gimp_settings_editor_row_separator_func (GtkTreeModel *model,
gchar *name = NULL;
gtk_tree_model_get (model, iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME, &name,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME, &name,
-1);
g_free (name);
@@ -373,7 +374,7 @@ gimp_settings_editor_name_edited (GtkCellRendererText *cell,
gchar *name;
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
object = GIMP_OBJECT (renderer->viewable);
@@ -403,7 +404,7 @@ gimp_settings_editor_name_edited (GtkCellRendererText *cell,
name = gimp_viewable_get_description (renderer->viewable, NULL);
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model), &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME, name,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME, name,
-1);
g_free (name);
}
diff --git a/app/widgets/gimptemplateview.c b/app/widgets/gimptemplateview.c
index a789b2d..d815b33 100644
--- a/app/widgets/gimptemplateview.c
+++ b/app/widgets/gimptemplateview.c
@@ -36,6 +36,7 @@
#include "core/gimpimage.h"
#include "core/gimptemplate.h"
+#include "gimpcontainertreestore.h"
#include "gimpcontainertreeview.h"
#include "gimpcontainerview.h"
#include "gimptemplateview.h"
@@ -195,7 +196,7 @@ gimp_template_view_tree_name_edited (GtkCellRendererText *cell,
const gchar *old_name;
gtk_tree_model_get (tree_view->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
object = GIMP_OBJECT (renderer->viewable);
@@ -215,7 +216,7 @@ gimp_template_view_tree_name_edited (GtkCellRendererText *cell,
NULL);
gtk_tree_store_set (GTK_TREE_STORE (tree_view->model), &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_NAME, name,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_NAME, name,
-1);
g_free (name);
}
diff --git a/app/widgets/gimptooleditor.c b/app/widgets/gimptooleditor.c
index d85fec0..f8db17e 100644
--- a/app/widgets/gimptooleditor.c
+++ b/app/widgets/gimptooleditor.c
@@ -32,6 +32,7 @@
#include "core/gimpcontext.h"
#include "core/gimptoolinfo.h"
+#include "gimpcontainertreestore.h"
#include "gimpcontainerview.h"
#include "gimpviewrenderer.h"
#include "gimptooleditor.h"
@@ -492,7 +493,7 @@ gimp_tool_editor_eye_data_func (GtkTreeViewColumn *tree_column,
gboolean visible;
gtk_tree_model_get (tree_model, iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
g_object_get (renderer->viewable, "visible", &visible, NULL);
@@ -523,7 +524,7 @@ gimp_tool_editor_eye_clicked (GtkCellRendererToggle *toggle,
"active", &active,
NULL);
gtk_tree_model_get (priv->model, &iter,
- GIMP_CONTAINER_TREE_VIEW_COLUMN_RENDERER, &renderer,
+ GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER, &renderer,
-1);
g_object_set (renderer->viewable, "visible", ! active, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]