Commit a09f497c authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

add a gtk_list_store_sort_iter_changed line for some special case ...

Tue Nov 26 22:26:04 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
        add a gtk_list_store_sort_iter_changed line for some special
        case ... (#96647 (issue 1), testcases from Soeren Sandmann and
        Daniel Elstner).

Tue Nov 26 22:18:06 2002  Kristian Rietveld  <kris@gtk.org>

        Inconsistent state for toggle renderers, requested by Paolo Bacchilega
        in #88130.

        * gtk/gtktreeprivate.h: move GtkCellRendererInfo here.

        * gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
        fix some indentation issues.

        * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
        (gtk_cell_renderer_toggle_set_property),
        (gtk_cell_renderer_toggle_get_property),
        (gtk_cell_renderer_toggle_render): add an inconsistent property.

        * gtk/gtkstyle.c (gtk_default_draw_check),
        (gtk_default_draw_option): support drawing inconsistent
        options/checks for cells.

Tue Nov 26 22:14:14 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
        (gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
        calling _editing_done twice (which has nasty side-effects). (#96647,
        (issue 2) testcase from Soeren Sandmann).

Tue Nov 26 22:12:21 2002  Kristian Rietveld  <kris@gtk.org>

        #82739, patch from Padraig O'Briain.

        * gtk/gtktreeviewcolumn.[ch]: add
        gtk_tree_view_column_cell_get_position()

Tue Nov 26 22:06:29 2002  Kristian Rietveld  <kris@gtk.org>

        Yes, this chunk breaks ABI compatibility. Owen knows about it and
        agreed with it. It doesn't break ABI that bad though, things will
        still work. Please keep it silent :P.

        This patch fixes some keynav issues reported by Narayana Pattipati
        in #81633. (Also mentioned in #92037 (Sun tracking bug)).

        * gtk/gtkmarshalers.list: add two silly marshalers

        * gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
        (gtk_tree_view_real_unselect_all),
        (gtk_tree_view_real_select_cursor_row),
        (gtk_tree_view_real_toggle_cursor_row),
        (gtk_tree_view_real_expand_collapse_cursor_row),
        (gtk_tree_view_real_start_interactive_search): change the return
        type from void to gboolean, update prototypes, functions, signals and
        entries in GtkTreeViewClass,
        (gtk_tree_view_class_init): add select_cursor_row binding for
        enter key,
        (gtk_tree_view_key_press): only navigate the header button if the
        header is also visible ...

Tue Nov 26 22:05:48 2002  Kristian Rietveld  <kris@gtk.org>

        API bit of #75745, reported by Richard Hult.

        * gtk/gtkcellrenderer.h (GtkCellRendererState): add
        GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
parent 621ae3a6
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
......
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
......
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
......
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
......
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
......
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
Tue Nov 26 18:28:58 GMT 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
......
......@@ -19,6 +19,7 @@
#include "gtkcellrenderer.h"
#include "gtkintl.h"
#include "gtktreeprivate.h"
static void gtk_cell_renderer_init (GtkCellRenderer *cell);
static void gtk_cell_renderer_class_init (GtkCellRendererClass *class);
......@@ -51,14 +52,6 @@ enum {
PROP_CELL_BACKGROUND_SET
};
#define CELLINFO_KEY "gtk-cell-renderer-info"
typedef struct _GtkCellRendererInfo GtkCellRendererInfo;
struct _GtkCellRendererInfo
{
GdkColor cell_background;
};
GType
gtk_cell_renderer_get_type (void)
{
......@@ -102,7 +95,8 @@ gtk_cell_renderer_init (GtkCellRenderer *cell)
cell->ypad = 0;
cellinfo = g_new0 (GtkCellRendererInfo, 1);
g_object_set_data_full (G_OBJECT (cell), CELLINFO_KEY, cellinfo, g_free);
g_object_set_data_full (G_OBJECT (cell),
GTK_CELL_RENDERER_INFO_KEY, cellinfo, g_free);
}
static void
......@@ -251,7 +245,10 @@ gtk_cell_renderer_get_property (GObject *object,
GParamSpec *pspec)
{
GtkCellRenderer *cell = GTK_CELL_RENDERER (object);
GtkCellRendererInfo *cellinfo = g_object_get_data (object, CELLINFO_KEY);
GtkCellRendererInfo *cellinfo;
cellinfo = g_object_get_data (object,
GTK_CELL_RENDERER_INFO_KEY);
switch (param_id)
{
......@@ -377,7 +374,10 @@ static void
set_cell_bg_color (GtkCellRenderer *cell,
GdkColor *color)
{
GtkCellRendererInfo *cellinfo = g_object_get_data (G_OBJECT (cell), CELLINFO_KEY);
GtkCellRendererInfo *cellinfo;
cellinfo = g_object_get_data (G_OBJECT (cell),
GTK_CELL_RENDERER_INFO_KEY);
if (color)
{
......@@ -482,7 +482,10 @@ gtk_cell_renderer_render (GtkCellRenderer *cell,
GtkCellRendererState flags)
{
gboolean selected = FALSE;
GtkCellRendererInfo *cellinfo = g_object_get_data (G_OBJECT (cell), CELLINFO_KEY);
GtkCellRendererInfo *cellinfo;
cellinfo = g_object_get_data (G_OBJECT (cell),
GTK_CELL_RENDERER_INFO_KEY);
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
g_return_if_fail (GTK_CELL_RENDERER_GET_CLASS (cell)->render != NULL);
......
......@@ -32,7 +32,8 @@ typedef enum
GTK_CELL_RENDERER_PRELIT = 1 << 1,
GTK_CELL_RENDERER_INSENSITIVE = 1 << 2,
/* this flag means the cell is in the sort column/row */
GTK_CELL_RENDERER_SORTED = 1 << 3
GTK_CELL_RENDERER_SORTED = 1 << 3,
GTK_CELL_RENDERER_FOCUSED = 1 << 4
} GtkCellRendererState;
typedef enum
......
......@@ -23,6 +23,7 @@
#include "gtkentry.h"
#include "gtkmarshalers.h"
#include "gtkintl.h"
#include "gtktreeprivate.h"
static void gtk_cell_renderer_text_init (GtkCellRendererText *celltext);
static void gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class);
......@@ -1328,6 +1329,16 @@ gtk_cell_renderer_text_editing_done (GtkCellEditable *entry,
{
const gchar *path;
const gchar *new_text;
GtkCellRendererInfo *info;
info = g_object_get_data (G_OBJECT (data),
GTK_CELL_RENDERER_INFO_KEY);
if (info->focus_out_id > 0)
{
g_signal_handler_disconnect (entry, info->focus_out_id);
info->focus_out_id = 0;
}
if (GTK_ENTRY (entry)->editing_canceled)
return;
......@@ -1360,6 +1371,7 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
{
GtkCellRendererText *celltext;
GtkWidget *entry;
GtkCellRendererInfo *info;
celltext = GTK_CELL_RENDERER_TEXT (cell);
......@@ -1377,14 +1389,17 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
info = g_object_get_data (G_OBJECT (cell),
GTK_CELL_RENDERER_INFO_KEY);
gtk_widget_show (entry);
g_signal_connect (entry,
"editing_done",
G_CALLBACK (gtk_cell_renderer_text_editing_done),
celltext);
g_signal_connect (entry, "focus_out_event",
G_CALLBACK (gtk_cell_renderer_text_focus_out_event),
celltext);
info->focus_out_id = g_signal_connect (entry, "focus_out_event",
G_CALLBACK (gtk_cell_renderer_text_focus_out_event),
celltext);
return GTK_CELL_EDITABLE (entry);
......
......@@ -21,6 +21,7 @@
#include <gtk/gtkcellrenderertoggle.h>
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtktreeprivate.h"
static void gtk_cell_renderer_toggle_get_property (GObject *object,
guint param_id,
......@@ -64,10 +65,10 @@ enum {
PROP_ZERO,
PROP_ACTIVATABLE,
PROP_ACTIVE,
PROP_RADIO
PROP_RADIO,
PROP_INCONSISTENT
};
#define TOGGLE_WIDTH 12
static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
......@@ -133,6 +134,15 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
FALSE,
G_PARAM_READABLE |
G_PARAM_WRITABLE));
g_object_class_install_property (object_class,
PROP_INCONSISTENT,
g_param_spec_boolean ("inconsistent",
_("Inconsistent state"),
_("The inconsistent stae of the button"),
FALSE,
G_PARAM_READABLE |
G_PARAM_WRITABLE));
g_object_class_install_property (object_class,
PROP_ACTIVATABLE,
......@@ -177,6 +187,18 @@ gtk_cell_renderer_toggle_get_property (GObject *object,
case PROP_ACTIVE:
g_value_set_boolean (value, celltoggle->active);
break;
case PROP_INCONSISTENT:
{
/* Move out of here when more properties start to use the info
* thing. I put it here to not affect performance, this property
* is not going to be used much.
*/
GtkCellRendererInfo *cellinfo;
cellinfo = g_object_get_data (object, GTK_CELL_RENDERER_INFO_KEY);
g_value_set_boolean (value, cellinfo->inconsistent);
}
break;
case PROP_ACTIVATABLE:
g_value_set_boolean (value, celltoggle->activatable);
break;
......@@ -204,6 +226,16 @@ gtk_cell_renderer_toggle_set_property (GObject *object,
celltoggle->active = g_value_get_boolean (value);
g_object_notify (G_OBJECT(object), "active");
break;
case PROP_INCONSISTENT:
{
/* read comment in _get_property */
GtkCellRendererInfo *cellinfo;
cellinfo = g_object_get_data (object, GTK_CELL_RENDERER_INFO_KEY);
cellinfo->inconsistent = g_value_get_boolean (value);
g_object_notify (G_OBJECT (object), "inconsistent");
}
break;
case PROP_ACTIVATABLE:
celltoggle->activatable = g_value_get_boolean (value);
g_object_notify (G_OBJECT(object), "activatable");
......@@ -283,11 +315,12 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
GtkCellRendererState flags)
{
GtkCellRendererToggle *celltoggle = (GtkCellRendererToggle *) cell;
GtkCellRendererInfo *cellinfo;
gint width, height;
gint x_offset, y_offset;
GtkShadowType shadow;
GtkStateType state = 0;
gtk_cell_renderer_toggle_get_size (cell, widget, cell_area,
&x_offset, &y_offset,
&width, &height);
......@@ -297,7 +330,12 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
if (width <= 0 || height <= 0)
return;
shadow = celltoggle->active ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
cellinfo = g_object_get_data (G_OBJECT (cell), GTK_CELL_RENDERER_INFO_KEY);
if (cellinfo->inconsistent)
shadow = GTK_SHADOW_ETCHED_IN;
else
shadow = celltoggle->active ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED)
{
......
......@@ -717,6 +717,8 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
retval = TRUE;
if (converted)
g_value_unset (&real_value);
if (sort && GTK_LIST_STORE_IS_SORTED (list_store))
gtk_list_store_sort_iter_changed (list_store, iter, old_column);
return retval;
}
......@@ -2266,7 +2268,6 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store,
gtk_tree_model_rows_reordered (GTK_TREE_MODEL (list_store),
tmp_path, NULL,
new_order);
gtk_tree_path_free (tmp_path);
g_free (new_order);
}
......
......@@ -32,6 +32,8 @@ BOOLEAN:OBJECT,BOXED,BOXED
BOOLEAN:INT,INT
BOOLEAN:VOID
BOOLEAN:BOOLEAN
BOOLEAN:NONE
BOOLEAN:BOOLEAN,BOOLEAN,BOOLEAN
ENUM:ENUM
INT:POINTER
NONE:BOOLEAN
......
......@@ -3623,6 +3623,10 @@ gtk_default_draw_check (GtkStyle *style,
draw_part (window, style->text_gc[state_type], area, x, y, CHECK_TEXT);
draw_part (window, style->text_aa_gc[state_type], area, x, y, CHECK_AA);
}
else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */
{
draw_part (window, style->text_gc[state_type], area, x, y, CHECK_INCONSISTENT_TEXT);
}
}
else
{
......@@ -3712,6 +3716,11 @@ gtk_default_draw_option (GtkStyle *style,
height - 4,
0, 360*64);
}
else if (shadow_type == GTK_SHADOW_ETCHED_IN) /* inconsistent */
{
draw_part (window, widget->style->fg_gc[state_type],
area, x, y, CHECK_INCONSISTENT_TEXT);
}
}
else
{
......
......@@ -195,6 +195,21 @@ struct _GtkTreeViewPrivate
GtkDestroyNotify search_destroy;
};
/* cool ABI compat hack */
#define GTK_CELL_RENDERER_INFO_KEY "gtk-cell-renderer-info"
typedef struct _GtkCellRendererInfo GtkCellRendererInfo;
struct _GtkCellRendererInfo
{
GdkColor cell_background;
/* text renderer */
gulong focus_out_id;
/* toggle renderer */
gboolean inconsistent :1;
};
#ifdef __GNUC__
#define TREE_VIEW_INTERNAL_ASSERT(expr, ret) G_STMT_START{ \
......
......@@ -839,6 +839,8 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store,
retval = TRUE;
if (converted)
g_value_unset (&real_value);
if (sort && GTK_TREE_STORE_IS_SORTED (tree_store))
gtk_tree_store_sort_iter_changed (tree_store, iter, old_column);
return retval;
}
......
......@@ -223,16 +223,16 @@ static void gtk_tree_view_set_adjustments (GtkTreeView *tree
static gboolean gtk_tree_view_real_move_cursor (GtkTreeView *tree_view,
GtkMovementStep step,
gint count);
static void gtk_tree_view_real_select_all (GtkTreeView *tree_view);
static void gtk_tree_view_real_unselect_all (GtkTreeView *tree_view);
static void gtk_tree_view_real_select_cursor_row (GtkTreeView *tree_view,