Commit 40743e12 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

implement the GtkCellLayout interface, drop packing/attribute/cell data

Wed Oct  1 22:43:40 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkcellview.[ch]: implement the GtkCellLayout interface, drop
	packing/attribute/cell data functions from the header,
	(gtk_cell_view_set_cell_data): added support for cell data funcs.

	* gtk/gtkcombobox.[ch]: implement the GtkCellLayout interface, drop
	packing/attribute/cell data functions from the header, implemented
	cell data func support.

	* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new): updated
	for the move to GtkCellLayout.

	* tests/testcombo.c (create_combo_box_grid_demo), (main): ditto.
parent c0addc2e
Wed Oct 1 22:43:40 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellview.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header,
(gtk_cell_view_set_cell_data): added support for cell data funcs.
* gtk/gtkcombobox.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header, implemented
cell data func support.
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new): updated
for the move to GtkCellLayout.
* tests/testcombo.c (create_combo_box_grid_demo), (main): ditto.
2003-10-01 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_class_init):
......
Wed Oct 1 22:43:40 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellview.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header,
(gtk_cell_view_set_cell_data): added support for cell data funcs.
* gtk/gtkcombobox.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header, implemented
cell data func support.
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new): updated
for the move to GtkCellLayout.
* tests/testcombo.c (create_combo_box_grid_demo), (main): ditto.
2003-10-01 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_class_init):
......
Wed Oct 1 22:43:40 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellview.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header,
(gtk_cell_view_set_cell_data): added support for cell data funcs.
* gtk/gtkcombobox.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header, implemented
cell data func support.
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new): updated
for the move to GtkCellLayout.
* tests/testcombo.c (create_combo_box_grid_demo), (main): ditto.
2003-10-01 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_class_init):
......
Wed Oct 1 22:43:40 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellview.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header,
(gtk_cell_view_set_cell_data): added support for cell data funcs.
* gtk/gtkcombobox.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header, implemented
cell data func support.
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new): updated
for the move to GtkCellLayout.
* tests/testcombo.c (create_combo_box_grid_demo), (main): ditto.
2003-10-01 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_class_init):
......
Wed Oct 1 22:43:40 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellview.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header,
(gtk_cell_view_set_cell_data): added support for cell data funcs.
* gtk/gtkcombobox.[ch]: implement the GtkCellLayout interface, drop
packing/attribute/cell data functions from the header, implemented
cell data func support.
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new): updated
for the move to GtkCellLayout.
* tests/testcombo.c (create_combo_box_grid_demo), (main): ditto.
2003-10-01 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.c (gtk_action_class_init):
......
This diff is collapsed.
......@@ -58,22 +58,6 @@ GtkWidget *gtk_cell_view_new_with_markup (const gchar *markup)
GtkWidget *gtk_cell_view_new_with_pixbuf (GdkPixbuf *pixbuf);
void gtk_cell_view_pack_start (GtkCellView *cell_view,
GtkCellRenderer *renderer,
gboolean expand);
void gtk_cell_view_pack_end (GtkCellView *cell_view,
GtkCellRenderer *renderer,
gboolean expand);
void gtk_cell_view_clear (GtkCellView *cell_view);
void gtk_cell_view_add_attribute (GtkCellView *cell_view,
GtkCellRenderer *renderer,
const gchar *attribute,
gint column);
void gtk_cell_view_clear_attributes (GtkCellView *cell_view,
GtkCellRenderer *attribute);
void gtk_cell_view_set_attributes (GtkCellView *cell_view,
GtkCellRenderer *renderer,
...);
void gtk_cell_view_set_value (GtkCellView *cell_view,
GtkCellRenderer *renderer,
gchar *property,
......
This diff is collapsed.
......@@ -59,18 +59,6 @@ struct _GtkComboBoxClass
GType gtk_combo_box_get_type (void);
GtkWidget *gtk_combo_box_new (GtkTreeModel *model);
/* manipulate list of cell renderers */
void gtk_combo_box_pack_start (GtkComboBox *combo_box,
GtkCellRenderer *cell,
gboolean expand);
void gtk_combo_box_pack_end (GtkComboBox *combo_box,
GtkCellRenderer *cell,
gboolean expand);
void gtk_combo_box_set_attributes (GtkComboBox *combo_box,
GtkCellRenderer *cell,
...);
void gtk_combo_box_clear (GtkComboBox *combo_box);
/* grids */
void gtk_combo_box_set_wrap_width (GtkComboBox *combo_box,
gint width);
......
......@@ -18,6 +18,7 @@
*/
#include <gtk/gtkcomboboxentry.h>
#include <gtk/gtkcelllayout.h>
#include <gtk/gtkentry.h>
#include <gtk/gtkcellrenderertext.h>
......@@ -156,10 +157,10 @@ gtk_combo_box_entry_new (GtkTreeModel *model,
GTK_COMBO_BOX_ENTRY (ret)->priv->text_column = text_column;
renderer = gtk_cell_renderer_text_new ();
gtk_combo_box_pack_start (GTK_COMBO_BOX (ret), renderer, TRUE);
gtk_combo_box_set_attributes (GTK_COMBO_BOX (ret), renderer,
"text", text_column,
NULL);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (ret), renderer, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (ret), renderer,
"text", text_column,
NULL);
g_signal_connect (GTK_COMBO_BOX_ENTRY (ret)->priv->entry, "changed",
G_CALLBACK (gtk_combo_box_entry_contents_changed), ret);
......
......@@ -55,10 +55,10 @@ create_combo_box_grid_demo ()
store = gtk_list_store_new (1, GDK_TYPE_PIXBUF);
combo = gtk_combo_box_new (GTK_TREE_MODEL (store));
gtk_combo_box_pack_start (GTK_COMBO_BOX (combo),
cell, TRUE);
gtk_combo_box_set_attributes (GTK_COMBO_BOX (combo),
cell, "pixbuf", 0, NULL);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo),
cell, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo),
cell, "pixbuf", 0, NULL);
gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (combo),
3);
......@@ -227,9 +227,9 @@ main (int argc, char **argv)
pixbuf = gtk_widget_render_icon (cellview, GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_BUTTON, NULL);
gtk_cell_view_pack_start (GTK_CELL_VIEW (cellview),
renderer,
FALSE);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (cellview),
renderer,
FALSE);
g_value_init (&value, GDK_TYPE_PIXBUF);
g_value_set_instance (&value, pixbuf);
gtk_cell_view_set_values (GTK_CELL_VIEW (cellview),
......@@ -239,9 +239,9 @@ main (int argc, char **argv)
g_value_unset (&value);
renderer = gtk_cell_renderer_text_new ();
gtk_cell_view_pack_start (GTK_CELL_VIEW (cellview),
renderer,
TRUE);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (cellview),
renderer,
TRUE);
g_value_init (&value, G_TYPE_STRING);
g_value_set_string (&value, "la la la");
gtk_cell_view_set_values (GTK_CELL_VIEW (cellview),
......@@ -264,16 +264,20 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (boom), combobox);
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_combo_box_pack_start (GTK_COMBO_BOX (combobox),
renderer,
FALSE);
gtk_combo_box_set_attributes (GTK_COMBO_BOX (combobox), renderer, "pixbuf", 0, NULL);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
renderer,
FALSE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
"pixbuf", 0,
NULL);
renderer = gtk_cell_renderer_text_new ();
gtk_combo_box_pack_start (GTK_COMBO_BOX (combobox),
renderer,
TRUE);
gtk_combo_box_set_attributes (GTK_COMBO_BOX (combobox), renderer, "text", 1, NULL);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
renderer,
TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
"text", 1,
NULL);
gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 1);
......
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