new function. (gtk_tree_view_move_column_after): Clean up interface.

Sun Apr 29 20:13:40 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_get_columns): new function.
	(gtk_tree_view_move_column_after): Clean up interface.
This commit is contained in:
Jonathan Blandford 2001-04-30 16:16:02 +00:00 committed by Jonathan Blandford
parent c63e37b4b0
commit 483f2d5203
10 changed files with 57 additions and 24 deletions

View File

@ -1,3 +1,8 @@
Sun Apr 29 20:13:40 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_columns): new function.
(gtk_tree_view_move_column_after): Clean up interface.
Sun Apr 29 03:02:02 2001 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.h:

View File

@ -1,3 +1,8 @@
Sun Apr 29 20:13:40 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_columns): new function.
(gtk_tree_view_move_column_after): Clean up interface.
Sun Apr 29 03:02:02 2001 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.h:

View File

@ -1,3 +1,8 @@
Sun Apr 29 20:13:40 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_columns): new function.
(gtk_tree_view_move_column_after): Clean up interface.
Sun Apr 29 03:02:02 2001 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.h:

View File

@ -1,3 +1,8 @@
Sun Apr 29 20:13:40 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_columns): new function.
(gtk_tree_view_move_column_after): Clean up interface.
Sun Apr 29 03:02:02 2001 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.h:

View File

@ -1,3 +1,8 @@
Sun Apr 29 20:13:40 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_columns): new function.
(gtk_tree_view_move_column_after): Clean up interface.
Sun Apr 29 03:02:02 2001 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.h:

View File

@ -1,3 +1,8 @@
Sun Apr 29 20:13:40 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_columns): new function.
(gtk_tree_view_move_column_after): Clean up interface.
Sun Apr 29 03:02:02 2001 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.h:

View File

@ -1,3 +1,8 @@
Sun Apr 29 20:13:40 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_columns): new function.
(gtk_tree_view_move_column_after): Clean up interface.
Sun Apr 29 03:02:02 2001 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.h:

View File

@ -89,7 +89,6 @@ struct _GtkTreeViewPrivate
GdkWindow *header_window;
GdkWindow *drag_window;
GdkWindow *drag_highlight_window;
GdkWindow *drag_header_window;
GtkTreeViewColumn *drag_column;
gint drag_column_x;

View File

@ -925,13 +925,6 @@ gtk_tree_view_unrealize (GtkWidget *widget)
tree_view->priv->drag_highlight_window = NULL;
}
if (tree_view->priv->drag_header_window)
{
gdk_window_set_user_data (tree_view->priv->drag_header_window, NULL);
gdk_window_destroy (tree_view->priv->drag_header_window);
tree_view->priv->drag_header_window = NULL;
}
gdk_cursor_destroy (tree_view->priv->cursor_drag);
gdk_gc_destroy (tree_view->priv->xor_gc);
@ -1338,12 +1331,6 @@ gtk_tree_view_button_release_drag_column (GtkWidget *widget,
gdk_window_hide (tree_view->priv->drag_highlight_window);
/* deal with headers */
gdk_window_reparent (tree_view->priv->header_window,
widget->window,
0, 0);
gdk_window_hide (tree_view->priv->drag_header_window);
return TRUE;
}
@ -5055,9 +5042,6 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
attributes.window_type = GDK_WINDOW_TEMP;
tree_view->priv->drag_highlight_window = gdk_window_new (NULL, &attributes, attributes_mask);
gdk_window_set_user_data (tree_view->priv->drag_highlight_window, GTK_WIDGET (tree_view));
tree_view->priv->drag_header_window = gdk_window_new (NULL, &attributes, attributes_mask);
gdk_window_set_user_data (tree_view->priv->drag_header_window, GTK_WIDGET (tree_view));
}
gdk_pointer_ungrab (GDK_CURRENT_TIME);
@ -5107,9 +5091,6 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
gdk_window_get_origin (tree_view->priv->header_window, &x, &y);
gdk_window_get_size (tree_view->priv->header_window, &width, &height);
gdk_window_move_resize (tree_view->priv->drag_header_window, x, y, width, height);
gdk_window_reparent (tree_view->priv->header_window, tree_view->priv->drag_header_window, 0, 0);
gdk_window_show (tree_view->priv->drag_header_window);
while (gtk_events_pending ())
gtk_main_iteration ();
@ -5990,7 +5971,25 @@ gtk_tree_view_get_column (GtkTreeView *tree_view,
}
/**
* gtk_tree_view_move_column:
* gtk_tree_view_get_columns:
* @tree_view: A #GtkTreeView
*
* Returns a #GList of all the #GtkTreeViewColumn s currently in @tree_view.
* The returned list must be freed with g_list_free ().
*
* Return value: A list of #GtkTreeViewColumn s
**/
GList *
gtk_tree_view_get_columns (GtkTreeView *tree_view)
{
g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), NULL);
g_return_val_if_fail (tree_view->priv->model != NULL, NULL);
return g_list_copy (tree_view->priv->columns);
}
/**
* gtk_tree_view_move_column_after:
* @tree_view: A #GtkTreeView
* @column: The #GtkTreeViewColumn to be moved.
* @base_column: The #GtkTreeViewColumn to be moved relative to.

View File

@ -138,10 +138,10 @@ gint gtk_tree_view_insert_column_with_attributes (GtkTreeView
...);
GtkTreeViewColumn *gtk_tree_view_get_column (GtkTreeView *tree_view,
gint n);
void gtk_tree_view_move_column (GtkTreeView *tree_view,
GList *gtk_tree_view_get_columns (GtkTreeView *tree_view);
void gtk_tree_view_move_column_after (GtkTreeView *tree_view,
GtkTreeViewColumn *column,
GtkTreeViewColumn *base_column,
gint left);
GtkTreeViewColumn *base_column);
void gtk_tree_view_set_expander_column (GtkTreeView *tree_view,
gint col);
gint gtk_tree_view_get_expander_column (GtkTreeView *tree_view);