mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
:get_property): remove g_value_init calls, as they are no longer needed.
2000-12-20 Jonathan Blandford <jrb@redhat.com> * gtk/gtkcellrenderer*.c (::get_property): remove g_value_init calls, as they are no longer needed. * gtk/gtktreemodelsort.c: Fix up the comparison code. * gtk/gtktreemodel.h: Start work on ::reordered signal. Need to figure out how to emit a signal on an interface.
This commit is contained in:
parent
f00175cf07
commit
dadf966b3b
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2000-12-20 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcellrenderer*.c (::get_property): remove g_value_init
|
||||
calls, as they are no longer needed.
|
||||
|
||||
* gtk/gtktreemodelsort.c: Fix up the comparison code.
|
||||
|
||||
* gtk/gtktreemodel.h: Start work on ::reordered signal. Need to
|
||||
figure out how to emit a signal on an interface.
|
||||
|
||||
2000-12-20 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* tests: new directory to contain tests, gtk/test* should move
|
||||
|
@ -1,3 +1,13 @@
|
||||
2000-12-20 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcellrenderer*.c (::get_property): remove g_value_init
|
||||
calls, as they are no longer needed.
|
||||
|
||||
* gtk/gtktreemodelsort.c: Fix up the comparison code.
|
||||
|
||||
* gtk/gtktreemodel.h: Start work on ::reordered signal. Need to
|
||||
figure out how to emit a signal on an interface.
|
||||
|
||||
2000-12-20 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* tests: new directory to contain tests, gtk/test* should move
|
||||
|
@ -1,3 +1,13 @@
|
||||
2000-12-20 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcellrenderer*.c (::get_property): remove g_value_init
|
||||
calls, as they are no longer needed.
|
||||
|
||||
* gtk/gtktreemodelsort.c: Fix up the comparison code.
|
||||
|
||||
* gtk/gtktreemodel.h: Start work on ::reordered signal. Need to
|
||||
figure out how to emit a signal on an interface.
|
||||
|
||||
2000-12-20 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* tests: new directory to contain tests, gtk/test* should move
|
||||
|
@ -1,3 +1,13 @@
|
||||
2000-12-20 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcellrenderer*.c (::get_property): remove g_value_init
|
||||
calls, as they are no longer needed.
|
||||
|
||||
* gtk/gtktreemodelsort.c: Fix up the comparison code.
|
||||
|
||||
* gtk/gtktreemodel.h: Start work on ::reordered signal. Need to
|
||||
figure out how to emit a signal on an interface.
|
||||
|
||||
2000-12-20 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* tests: new directory to contain tests, gtk/test* should move
|
||||
|
@ -1,3 +1,13 @@
|
||||
2000-12-20 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcellrenderer*.c (::get_property): remove g_value_init
|
||||
calls, as they are no longer needed.
|
||||
|
||||
* gtk/gtktreemodelsort.c: Fix up the comparison code.
|
||||
|
||||
* gtk/gtktreemodel.h: Start work on ::reordered signal. Need to
|
||||
figure out how to emit a signal on an interface.
|
||||
|
||||
2000-12-20 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* tests: new directory to contain tests, gtk/test* should move
|
||||
|
@ -1,3 +1,13 @@
|
||||
2000-12-20 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcellrenderer*.c (::get_property): remove g_value_init
|
||||
calls, as they are no longer needed.
|
||||
|
||||
* gtk/gtktreemodelsort.c: Fix up the comparison code.
|
||||
|
||||
* gtk/gtktreemodel.h: Start work on ::reordered signal. Need to
|
||||
figure out how to emit a signal on an interface.
|
||||
|
||||
2000-12-20 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* tests: new directory to contain tests, gtk/test* should move
|
||||
|
@ -1,3 +1,13 @@
|
||||
2000-12-20 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcellrenderer*.c (::get_property): remove g_value_init
|
||||
calls, as they are no longer needed.
|
||||
|
||||
* gtk/gtktreemodelsort.c: Fix up the comparison code.
|
||||
|
||||
* gtk/gtktreemodel.h: Start work on ::reordered signal. Need to
|
||||
figure out how to emit a signal on an interface.
|
||||
|
||||
2000-12-20 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* tests: new directory to contain tests, gtk/test* should move
|
||||
|
@ -121,7 +121,6 @@ gtk_cell_renderer_pixbuf_get_property (GObject *object,
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_PIXBUF:
|
||||
g_value_init (value, G_TYPE_OBJECT);
|
||||
g_value_set_object (value, G_OBJECT (cellpixbuf->pixbuf));
|
||||
break;
|
||||
default:
|
||||
|
@ -205,22 +205,18 @@ gtk_cell_renderer_text_get_property (GObject *object,
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_TEXT:
|
||||
g_value_init (value, G_TYPE_STRING);
|
||||
g_value_set_string (value, celltext->text);
|
||||
break;
|
||||
case PROP_STRIKETHROUGH:
|
||||
g_value_init (value, G_TYPE_BOOLEAN);
|
||||
attr_iter = pango_attr_list_get_iterator (celltext->attr_list);
|
||||
attr = pango_attr_iterator_get (attr_iter,
|
||||
PANGO_ATTR_STRIKETHROUGH);
|
||||
g_value_set_boolean (value, ((PangoAttrInt*) attr)->value);
|
||||
break;
|
||||
case PROP_UNDERLINE:
|
||||
g_value_init (value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean (value, celltext->underline);
|
||||
break;
|
||||
case PROP_EDITABLE:
|
||||
g_value_init (value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean (value, celltext->editable);
|
||||
break;
|
||||
default:
|
||||
|
@ -164,11 +164,9 @@ gtk_cell_renderer_toggle_get_property (GObject *object,
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_STATE:
|
||||
g_value_init (value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean (value, celltoggle->state);
|
||||
break;
|
||||
case PROP_RADIO:
|
||||
g_value_init (value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean (value, celltoggle->radio);
|
||||
break;
|
||||
default:
|
||||
|
@ -40,6 +40,12 @@ gtk_tree_model_get_type (void)
|
||||
sizeof (GtkTreeModelIface), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
NULL,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
0,
|
||||
0, /* n_preallocs */
|
||||
NULL
|
||||
};
|
||||
|
||||
tree_model_type = g_type_register_static (G_TYPE_INTERFACE, "GtkTreeModel", &tree_model_info, 0);
|
||||
|
@ -71,6 +71,9 @@ struct _GtkTreeModelIface
|
||||
GtkTreeIter *iter);
|
||||
void (* deleted) (GtkTreeModel *tree_model,
|
||||
GtkTreePath *path);
|
||||
void (* reordered) (GtkTreeModel *tree_model,
|
||||
GtkTreePath *path,
|
||||
gint *new_order);
|
||||
|
||||
/* VTable - not signals */
|
||||
guint (* get_flags) (GtkTreeModel *tree_model);
|
||||
|
@ -419,10 +419,7 @@ gtk_tree_model_sort_insert_value (GtkTreeModelSort *sort,
|
||||
GtkTreeIter iter;
|
||||
SortElt elt;
|
||||
gint offset;
|
||||
gint middle, j;
|
||||
GValueCompareFunc func;
|
||||
GValue s_value = {0, };
|
||||
GValue tmp_value = {0, };
|
||||
gint j;
|
||||
SortElt *tmp_elt;
|
||||
offset = gtk_tree_path_get_indices (s_path)[gtk_tree_path_get_depth (s_path) - 1];
|
||||
|
||||
@ -466,8 +463,6 @@ gtk_tree_model_sort_insert_value (GtkTreeModelSort *sort,
|
||||
|
||||
g_array_insert_vals (array, index, &elt, 1);
|
||||
|
||||
g_value_unset (&s_value);
|
||||
|
||||
/* update all the larger offsets */
|
||||
tmp_elt = (SortElt *) array->data;
|
||||
for (j = 0; j < array->len; j++, tmp_elt++)
|
||||
@ -1104,8 +1099,8 @@ gtk_tree_model_sort_func (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer user_data)
|
||||
{
|
||||
GValue value_a;
|
||||
GValue value_b;
|
||||
GValue value_a = {0, };
|
||||
GValue value_b = {0, };
|
||||
SortData *sort_data = user_data;
|
||||
gint retval;
|
||||
|
||||
|
@ -946,7 +946,7 @@ gtk_tree_view_motion (GtkWidget *widget,
|
||||
gtk_tree_view_column_set_size (gtk_tree_view_get_column (GTK_TREE_VIEW (widget), tree_view->priv->drag_pos), new_width);
|
||||
}
|
||||
|
||||
/* FIXME: We need to scroll */
|
||||
/* FIXME: Do we need to scroll */
|
||||
_gtk_tree_view_set_size (GTK_TREE_VIEW (widget), -1, tree_view->priv->height);
|
||||
return FALSE;
|
||||
}
|
||||
@ -1437,7 +1437,7 @@ gtk_tree_view_focus_out (GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* FIXME: It would be neat to someday make the headers a seperate widget that
|
||||
* can be shared between various apps
|
||||
* can be shared between various apps. Wishful thinking, though...
|
||||
*/
|
||||
/* Returns TRUE if the focus is within the headers, after the focus operation is
|
||||
* done
|
||||
|
@ -18,14 +18,18 @@ static void
|
||||
node_set (GtkTreeIter *iter)
|
||||
{
|
||||
static gint i = 0;
|
||||
|
||||
gint n;
|
||||
gchar *str;
|
||||
|
||||
str = g_strdup_printf ("FOO: %d", i++);
|
||||
str = g_strdup_printf ("Row (%d)", i++);
|
||||
gtk_tree_store_set (base_model, iter, 0, str, -1);
|
||||
g_free (str);
|
||||
|
||||
str = g_strdup_printf ("%d", g_random_int ());
|
||||
n = g_random_int ();
|
||||
if (n < 0)
|
||||
n *= -1;
|
||||
str = g_strdup_printf ("%d", n);
|
||||
|
||||
gtk_tree_store_set (base_model, iter, 1, str, -1);
|
||||
g_free (str);
|
||||
}
|
||||
@ -133,7 +137,7 @@ iter_insert_after (GtkWidget *button, GtkTreeView *tree_view)
|
||||
gtk_tree_store_insert_after (model,
|
||||
&iter,
|
||||
NULL,
|
||||
&selected);
|
||||
NULL);
|
||||
node_set (&iter);
|
||||
}
|
||||
}
|
||||
@ -303,12 +307,12 @@ make_window (gboolean use_sort)
|
||||
/* A few to start */
|
||||
if (!use_sort)
|
||||
{
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
}
|
||||
/* Show it all */
|
||||
gtk_widget_show_all (window);
|
||||
|
@ -18,14 +18,18 @@ static void
|
||||
node_set (GtkTreeIter *iter)
|
||||
{
|
||||
static gint i = 0;
|
||||
|
||||
gint n;
|
||||
gchar *str;
|
||||
|
||||
str = g_strdup_printf ("FOO: %d", i++);
|
||||
str = g_strdup_printf ("Row (%d)", i++);
|
||||
gtk_tree_store_set (base_model, iter, 0, str, -1);
|
||||
g_free (str);
|
||||
|
||||
str = g_strdup_printf ("%d", g_random_int ());
|
||||
n = g_random_int ();
|
||||
if (n < 0)
|
||||
n *= -1;
|
||||
str = g_strdup_printf ("%d", n);
|
||||
|
||||
gtk_tree_store_set (base_model, iter, 1, str, -1);
|
||||
g_free (str);
|
||||
}
|
||||
@ -133,7 +137,7 @@ iter_insert_after (GtkWidget *button, GtkTreeView *tree_view)
|
||||
gtk_tree_store_insert_after (model,
|
||||
&iter,
|
||||
NULL,
|
||||
&selected);
|
||||
NULL);
|
||||
node_set (&iter);
|
||||
}
|
||||
}
|
||||
@ -303,12 +307,12 @@ make_window (gboolean use_sort)
|
||||
/* A few to start */
|
||||
if (!use_sort)
|
||||
{
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_prepend (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
iter_append (NULL, GTK_TREE_VIEW (tree_view));
|
||||
}
|
||||
/* Show it all */
|
||||
gtk_widget_show_all (window);
|
||||
|
Loading…
Reference in New Issue
Block a user