-#include <config.h>
+/* testtreecolumns.c
+ * Copyright (C) 2001 Red Hat, Inc
+ * Author: Jonathan Blandford
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
#include <gtk/gtk.h>
/*
if (!view_column_model_type)
{
- static const GTypeInfo view_column_model_info =
+ const GTypeInfo view_column_model_info =
{
sizeof (GtkListStoreClass),
NULL, /* base_init */
(GInstanceInitFunc) view_column_model_init,
};
- static const GInterfaceInfo tree_model_info =
+ const GInterfaceInfo tree_model_info =
{
(GInterfaceInitFunc) view_column_model_tree_model_init,
NULL,
NULL
};
- static const GInterfaceInfo drag_source_info =
+ const GInterfaceInfo drag_source_info =
{
(GInterfaceInitFunc) view_column_model_drag_source_init,
NULL,
NULL
};
- static const GInterfaceInfo drag_dest_info =
+ const GInterfaceInfo drag_dest_info =
{
(GInterfaceInitFunc) view_column_model_drag_dest_init,
NULL,
{
GtkTreeModel *retval;
- retval = GTK_TREE_MODEL (g_object_new (view_column_model_get_type (), NULL));
+ retval = g_object_new (view_column_model_get_type (), NULL);
((ViewColumnModel *)retval)->view = view;
((ViewColumnModel *)retval)->columns = gtk_tree_view_get_columns (view);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 500, 300);
- vbox = gtk_vbox_new (FALSE, 8);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
- hbox = gtk_hbox_new (FALSE, 8);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
/* Left Pane */
gtk_box_pack_start (GTK_BOX (hbox), swindow, TRUE, TRUE, 0);
/* Middle Pane */
- vbox2 = gtk_vbox_new (FALSE, 8);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 8);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0);
- bbox = gtk_vbutton_box_new ();
+ bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
gtk_box_pack_start (GTK_BOX (vbox2), bbox, TRUE, TRUE, 0);
"changed", G_CALLBACK (selection_changed), button);
gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
- bbox = gtk_vbutton_box_new ();
+ bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_SPREAD);
gtk_box_pack_start (GTK_BOX (vbox2), bbox, TRUE, TRUE, 0);
/* Right Pane */
- vbox2 = gtk_vbox_new (FALSE, 8);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 8);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0);
swindow = gtk_scrolled_window_new (NULL, NULL);
GDK_ACTION_MOVE);
- gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
+ FALSE, FALSE, 0);
- hbox = gtk_hbox_new (FALSE, 8);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
button = gtk_button_new_with_mnemonic ("_Add new Column");
g_signal_connect (button, "clicked", G_CALLBACK (add_clicked), left_tree_model);