forked from AuroraMiddleware/gtk
only emit the signal if an interesting column changes.
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com> * gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the signal if an interesting column changes. * gtk/gtktreestore.c: ditto. * gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so that it no longer grabs
This commit is contained in:
parent
2cfa52b1ee
commit
78d39ef504
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the
|
||||
signal if an interesting column changes.
|
||||
|
||||
* gtk/gtktreestore.c: ditto.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so
|
||||
that it no longer grabs
|
||||
|
||||
2002-01-30 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
|
||||
|
@ -1,3 +1,13 @@
|
||||
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the
|
||||
signal if an interesting column changes.
|
||||
|
||||
* gtk/gtktreestore.c: ditto.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so
|
||||
that it no longer grabs
|
||||
|
||||
2002-01-30 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
|
||||
|
@ -1,3 +1,13 @@
|
||||
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the
|
||||
signal if an interesting column changes.
|
||||
|
||||
* gtk/gtktreestore.c: ditto.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so
|
||||
that it no longer grabs
|
||||
|
||||
2002-01-30 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
|
||||
|
@ -1,3 +1,13 @@
|
||||
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the
|
||||
signal if an interesting column changes.
|
||||
|
||||
* gtk/gtktreestore.c: ditto.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so
|
||||
that it no longer grabs
|
||||
|
||||
2002-01-30 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
|
||||
|
@ -1,3 +1,13 @@
|
||||
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the
|
||||
signal if an interesting column changes.
|
||||
|
||||
* gtk/gtktreestore.c: ditto.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so
|
||||
that it no longer grabs
|
||||
|
||||
2002-01-30 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
|
||||
|
@ -1,3 +1,13 @@
|
||||
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the
|
||||
signal if an interesting column changes.
|
||||
|
||||
* gtk/gtktreestore.c: ditto.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so
|
||||
that it no longer grabs
|
||||
|
||||
2002-01-30 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
|
||||
|
@ -1,3 +1,13 @@
|
||||
Wed Jan 30 18:46:14 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_valist): only emit the
|
||||
signal if an interesting column changes.
|
||||
|
||||
* gtk/gtktreestore.c: ditto.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_cursor): change behavior so
|
||||
that it no longer grabs
|
||||
|
||||
2002-01-30 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
|
||||
|
@ -646,7 +646,8 @@ static gboolean
|
||||
gtk_list_store_real_set_value (GtkListStore *list_store,
|
||||
GtkTreeIter *iter,
|
||||
gint column,
|
||||
GValue *value)
|
||||
GValue *value,
|
||||
gboolean sort)
|
||||
{
|
||||
GtkTreeDataList *list;
|
||||
GtkTreeDataList *prev;
|
||||
@ -736,7 +737,7 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
|
||||
if (converted)
|
||||
g_value_unset (&real_value);
|
||||
|
||||
if (GTK_LIST_STORE_IS_SORTED (list_store))
|
||||
if (sort && GTK_LIST_STORE_IS_SORTED (list_store))
|
||||
gtk_list_store_sort_iter_changed (list_store, iter, orig_column);
|
||||
|
||||
return retval;
|
||||
@ -766,7 +767,7 @@ gtk_list_store_set_value (GtkListStore *list_store,
|
||||
g_return_if_fail (column >= 0 && column < list_store->n_columns);
|
||||
g_return_if_fail (G_IS_VALUE (value));
|
||||
|
||||
if (gtk_list_store_real_set_value (list_store, iter, column, value))
|
||||
if (gtk_list_store_real_set_value (list_store, iter, column, value, TRUE))
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
||||
@ -793,12 +794,32 @@ gtk_list_store_set_valist (GtkListStore *list_store,
|
||||
{
|
||||
gint column;
|
||||
gboolean emit_signal = FALSE;
|
||||
gboolean maybe_need_sort = FALSE;
|
||||
GtkTreeIterCompareFunc func;
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST_STORE (list_store));
|
||||
g_return_if_fail (VALID_ITER (iter, list_store));
|
||||
|
||||
column = va_arg (var_args, gint);
|
||||
|
||||
if (list_store->sort_column_id != -1)
|
||||
{
|
||||
GtkTreeDataSortHeader *header;
|
||||
header = _gtk_tree_data_list_get_header (list_store->sort_list,
|
||||
list_store->sort_column_id);
|
||||
g_return_if_fail (header != NULL);
|
||||
g_return_if_fail (header->func != NULL);
|
||||
func = header->func;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_return_if_fail (list_store->default_sort_func != NULL);
|
||||
func = list_store->default_sort_func;
|
||||
}
|
||||
|
||||
if (func != gtk_tree_data_list_compare_func)
|
||||
maybe_need_sort = TRUE;
|
||||
|
||||
while (column != -1)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
@ -827,13 +848,21 @@ gtk_list_store_set_valist (GtkListStore *list_store,
|
||||
emit_signal = gtk_list_store_real_set_value (list_store,
|
||||
iter,
|
||||
column,
|
||||
&value) || emit_signal;
|
||||
&value,
|
||||
FALSE) || emit_signal;
|
||||
|
||||
if (func == gtk_tree_data_list_compare_func &&
|
||||
column == list_store->sort_column_id)
|
||||
maybe_need_sort = TRUE;
|
||||
|
||||
g_value_unset (&value);
|
||||
|
||||
column = va_arg (var_args, gint);
|
||||
}
|
||||
|
||||
if (maybe_need_sort && GTK_LIST_STORE_IS_SORTED (list_store))
|
||||
gtk_list_store_sort_iter_changed (list_store, iter, list_store->sort_column_id);
|
||||
|
||||
if (emit_signal)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
@ -771,14 +771,14 @@ static gboolean
|
||||
gtk_tree_store_real_set_value (GtkTreeStore *tree_store,
|
||||
GtkTreeIter *iter,
|
||||
gint column,
|
||||
GValue *value)
|
||||
GValue *value,
|
||||
gboolean sort)
|
||||
{
|
||||
GtkTreeDataList *list;
|
||||
GtkTreeDataList *prev;
|
||||
GtkTreePath *path = NULL;
|
||||
GValue real_value = {0, };
|
||||
gboolean converted = FALSE;
|
||||
gint orig_column = column;
|
||||
gboolean retval = FALSE;
|
||||
|
||||
if (! g_type_is_a (G_VALUE_TYPE (value), tree_store->column_headers[column]))
|
||||
@ -856,9 +856,6 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store,
|
||||
if (converted)
|
||||
g_value_unset (&real_value);
|
||||
|
||||
if (GTK_TREE_STORE_IS_SORTED (tree_store))
|
||||
gtk_tree_store_sort_iter_changed (tree_store, iter, orig_column);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -885,7 +882,7 @@ gtk_tree_store_set_value (GtkTreeStore *tree_store,
|
||||
g_return_if_fail (column >= 0 && column < tree_store->n_columns);
|
||||
g_return_if_fail (G_IS_VALUE (value));
|
||||
|
||||
if (gtk_tree_store_real_set_value (tree_store, iter, column, value))
|
||||
if (gtk_tree_store_real_set_value (tree_store, iter, column, value, TRUE))
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
||||
@ -912,12 +909,32 @@ gtk_tree_store_set_valist (GtkTreeStore *tree_store,
|
||||
{
|
||||
gint column;
|
||||
gboolean emit_signal = FALSE;
|
||||
gboolean maybe_need_sort = FALSE;
|
||||
GtkTreeIterCompareFunc func;
|
||||
|
||||
g_return_if_fail (GTK_IS_TREE_STORE (tree_store));
|
||||
g_return_if_fail (VALID_ITER (iter, tree_store));
|
||||
|
||||
column = va_arg (var_args, gint);
|
||||
|
||||
if (tree_store->sort_column_id != -1)
|
||||
{
|
||||
GtkTreeDataSortHeader *header;
|
||||
header = _gtk_tree_data_list_get_header (tree_store->sort_list,
|
||||
tree_store->sort_column_id);
|
||||
g_return_if_fail (header != NULL);
|
||||
g_return_if_fail (header->func != NULL);
|
||||
func = header->func;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_return_if_fail (tree_store->default_sort_func != NULL);
|
||||
func = tree_store->default_sort_func;
|
||||
}
|
||||
|
||||
if (func != gtk_tree_data_list_compare_func)
|
||||
maybe_need_sort = TRUE;
|
||||
|
||||
while (column != -1)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
@ -945,12 +962,21 @@ gtk_tree_store_set_valist (GtkTreeStore *tree_store,
|
||||
emit_signal = gtk_tree_store_real_set_value (tree_store,
|
||||
iter,
|
||||
column,
|
||||
&value) || emit_signal;
|
||||
&value,
|
||||
FALSE) || emit_signal;
|
||||
|
||||
if (func == gtk_tree_data_list_compare_func &&
|
||||
column == tree_store->sort_column_id)
|
||||
maybe_need_sort = TRUE;
|
||||
|
||||
g_value_unset (&value);
|
||||
|
||||
column = va_arg (var_args, gint);
|
||||
}
|
||||
|
||||
if (maybe_need_sort && GTK_TREE_STORE_IS_SORTED (tree_store))
|
||||
gtk_tree_store_sort_iter_changed (tree_store, iter, tree_store->sort_column_id);
|
||||
|
||||
if (emit_signal)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
@ -8320,9 +8320,10 @@ gtk_tree_view_get_cursor (GtkTreeView *tree_view,
|
||||
* useful when you want to focus the user's attention on a particular row. If
|
||||
* @column is not %NULL, then focus is given to the column specified by it.
|
||||
* Additionally, if @column is specified, and @start_editing is %TRUE, then
|
||||
* editing should be started in the specified cell. Keyboard focus is given to
|
||||
* the widget after this is called. Please note that editing can only happen
|
||||
* when the widget is realized.
|
||||
* editing should be started in the specified cell. This function is often
|
||||
* followed by @gtk_widget_grab_focus (@tree_view) in order to give keyboard
|
||||
* focus to the widget. Please note that editing can only happen when the
|
||||
* widget is realized.
|
||||
**/
|
||||
void
|
||||
gtk_tree_view_set_cursor (GtkTreeView *tree_view,
|
||||
@ -8337,7 +8338,6 @@ gtk_tree_view_set_cursor (GtkTreeView *tree_view,
|
||||
|
||||
gtk_tree_view_real_set_cursor (tree_view, path, TRUE);
|
||||
|
||||
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
|
||||
if (focus_column && focus_column->visible)
|
||||
{
|
||||
GList *list;
|
||||
|
Loading…
Reference in New Issue
Block a user