Commit 9eda1bb7 authored by Martin Nordholts's avatar Martin Nordholts

New setter function so that we can make the "gboolean dnd_drop_to_empty"

* app/widgets/gimpcontainertreeview.[ch]
(gimp_container_tree_view_set_dnd_drop_to_empty): New setter
function so that we can make the "gboolean dnd_drop_to_empty"
class instance member private.

* app/widgets/gimpcontainertreeview-private.h: Move member here.

* app/widgets/gimpcontainertreeview-dnd.c: Go through priv pointer.

* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_init): Use
the new function.

svn path=/trunk/; revision=27671
parent 339e1b81
2008-11-16 Martin Nordholts <martinn@svn.gnome.org>
* app/widgets/gimpcontainertreeview.[ch]
(gimp_container_tree_view_set_dnd_drop_to_empty): New setter
function so that we can make the "gboolean dnd_drop_to_empty"
class instance member private.
* app/widgets/gimpcontainertreeview-private.h: Move member here.
* app/widgets/gimpcontainertreeview-dnd.c: Go through priv pointer.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_init): Use
the new function.
2008-11-16 Sven Neumann <sven@gimp.org>
* app/app.c
......
......@@ -125,7 +125,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
}
}
if (dest_viewable || tree_view->dnd_drop_to_empty)
if (dest_viewable || tree_view->priv->dnd_drop_to_empty)
{
if (GIMP_CONTAINER_TREE_VIEW_GET_CLASS (tree_view)->drop_possible (tree_view,
src_type,
......
......@@ -36,6 +36,8 @@ struct _GimpContainerTreeViewPriv
guint scroll_timeout_id;
guint scroll_timeout_interval;
GdkScrollDirection scroll_dir;
gboolean dnd_drop_to_empty;
};
......
......@@ -395,6 +395,15 @@ gimp_container_tree_view_new (GimpContainer *container,
return GTK_WIDGET (tree_view);
}
void
gimp_container_tree_view_set_dnd_drop_to_empty (GimpContainerTreeView *tree_view,
gboolean dnd_drop_to_empty)
{
g_return_if_fail (GIMP_IS_CONTAINER_TREE_VIEW (tree_view));
tree_view->priv->dnd_drop_to_empty = dnd_drop_to_empty;
}
void
gimp_container_tree_view_connect_name_edited (GimpContainerTreeView *tree_view,
GCallback callback,
......
......@@ -53,7 +53,6 @@ struct _GimpContainerTreeView
GList *toggle_cells;
GList *renderer_cells;
gboolean dnd_drop_to_empty;
Gimp *dnd_gimp; /* eek */
GimpContainerTreeViewPriv *priv;
......@@ -106,6 +105,9 @@ GtkWidget * gimp_container_tree_view_new (GimpContainer *container,
gint view_size,
gint view_border_width);
void gimp_container_tree_view_set_dnd_drop_to_empty
(GimpContainerTreeView *tree_view,
gboolean dnd_drop_to_emtpy);
void
gimp_container_tree_view_connect_name_edited (GimpContainerTreeView *tree_view,
GCallback callback,
......
......@@ -257,7 +257,7 @@ gimp_item_tree_view_init (GimpItemTreeView *view)
tree_view->model_columns[tree_view->n_model_columns] = G_TYPE_BOOLEAN;
tree_view->n_model_columns++;
tree_view->dnd_drop_to_empty = TRUE;
gimp_container_tree_view_set_dnd_drop_to_empty (tree_view, TRUE);
view->image = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment