diff options
author | Jonathan Blandford <jrb@redhat.com> | 2001-11-14 22:52:43 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2001-11-14 22:52:43 +0000 |
commit | 99fea7f97610029d465f6fe37b1241e9604f35a3 (patch) | |
tree | 3cbf8de44849940103ecb2767002238801125ea2 | |
parent | e874c4290abc9b8ab52635f93b305d645eb3c01d (diff) | |
download | gtk+-99fea7f97610029d465f6fe37b1241e9604f35a3.tar.gz |
Return the currently selected column when we get the column, #64380
Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return
the currently selected column when we get the column, #64380
* gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc
to cancel CellRendererText editting, #63613
* gtk/gtkcellrenderertext.c: ditto
* gtk/gtkcellrenderertext.h: formatting changes
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 12 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 12 | ||||
-rw-r--r-- | docs/reference/gtk/tmpl/gtkmenu.sgml | 6 | ||||
-rw-r--r-- | docs/reference/gtk/tmpl/gtktreemodelsort.sgml | 5 | ||||
-rw-r--r-- | gtk/gtkcellrenderertext.c | 3 | ||||
-rw-r--r-- | gtk/gtkcellrenderertext.h | 5 | ||||
-rw-r--r-- | gtk/gtkentry.c | 4 | ||||
-rw-r--r-- | gtk/gtkentry.h | 1 | ||||
-rw-r--r-- | gtk/gtktreeview.c | 10 |
14 files changed, 109 insertions, 9 deletions
@@ -1,3 +1,15 @@ +Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com> + + * gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return + the currently selected column when we get the column, #64380 + + * gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc + to cancel CellRendererText editting, #63613 + + * gtk/gtkcellrenderertext.c: ditto + + * gtk/gtkcellrenderertext.h: formatting changes + 2001-11-14 Matthias Clasen <matthiasc@poet.de> * gtk/gtkbutton.c (gtk_button_get_label): Rearrange docs (#64566) diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index da010b612e..b7647b3e3a 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,15 @@ +Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com> + + * gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return + the currently selected column when we get the column, #64380 + + * gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc + to cancel CellRendererText editting, #63613 + + * gtk/gtkcellrenderertext.c: ditto + + * gtk/gtkcellrenderertext.h: formatting changes + 2001-11-14 Matthias Clasen <matthiasc@poet.de> * gtk/gtkbutton.c (gtk_button_get_label): Rearrange docs (#64566) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index da010b612e..b7647b3e3a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,15 @@ +Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com> + + * gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return + the currently selected column when we get the column, #64380 + + * gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc + to cancel CellRendererText editting, #63613 + + * gtk/gtkcellrenderertext.c: ditto + + * gtk/gtkcellrenderertext.h: formatting changes + 2001-11-14 Matthias Clasen <matthiasc@poet.de> * gtk/gtkbutton.c (gtk_button_get_label): Rearrange docs (#64566) diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index da010b612e..b7647b3e3a 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,15 @@ +Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com> + + * gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return + the currently selected column when we get the column, #64380 + + * gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc + to cancel CellRendererText editting, #63613 + + * gtk/gtkcellrenderertext.c: ditto + + * gtk/gtkcellrenderertext.h: formatting changes + 2001-11-14 Matthias Clasen <matthiasc@poet.de> * gtk/gtkbutton.c (gtk_button_get_label): Rearrange docs (#64566) diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index da010b612e..b7647b3e3a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,15 @@ +Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com> + + * gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return + the currently selected column when we get the column, #64380 + + * gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc + to cancel CellRendererText editting, #63613 + + * gtk/gtkcellrenderertext.c: ditto + + * gtk/gtkcellrenderertext.h: formatting changes + 2001-11-14 Matthias Clasen <matthiasc@poet.de> * gtk/gtkbutton.c (gtk_button_get_label): Rearrange docs (#64566) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index da010b612e..b7647b3e3a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,15 @@ +Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com> + + * gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return + the currently selected column when we get the column, #64380 + + * gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc + to cancel CellRendererText editting, #63613 + + * gtk/gtkcellrenderertext.c: ditto + + * gtk/gtkcellrenderertext.h: formatting changes + 2001-11-14 Matthias Clasen <matthiasc@poet.de> * gtk/gtkbutton.c (gtk_button_get_label): Rearrange docs (#64566) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index da010b612e..b7647b3e3a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,15 @@ +Wed Nov 14 17:40:23 2001 Jonathan Blandford <jrb@redhat.com> + + * gtk/gtktreeview.c (gtk_tree_view_get_expander_column): Return + the currently selected column when we get the column, #64380 + + * gtk/gtkentry.c (gtk_cell_editable_key_press_event): Handle Esc + to cancel CellRendererText editting, #63613 + + * gtk/gtkcellrenderertext.c: ditto + + * gtk/gtkcellrenderertext.h: formatting changes + 2001-11-14 Matthias Clasen <matthiasc@poet.de> * gtk/gtkbutton.c (gtk_button_get_label): Rearrange docs (#64566) diff --git a/docs/reference/gtk/tmpl/gtkmenu.sgml b/docs/reference/gtk/tmpl/gtkmenu.sgml index 16c0e66f96..eb37062f02 100644 --- a/docs/reference/gtk/tmpl/gtkmenu.sgml +++ b/docs/reference/gtk/tmpl/gtkmenu.sgml @@ -96,9 +96,9 @@ Creates a new #GtkMenu. Adds a new #GtkMenuItem to the end of the menu's item list. </para> -<!-- # Unused Parameters # --> @menu: a #GtkMenu. @child: The #GtkMenuItem to add. +<!-- # Unused Parameters # --> @m: @c: @@ -108,9 +108,9 @@ Adds a new #GtkMenuItem to the end of the menu's item list. Adds a new #GtkMenuItem to the beginning of the menu's item list. </para> -<!-- # Unused Parameters # --> @menu: a #GtkMenu. @child: The #GtkMenuItem to add. +<!-- # Unused Parameters # --> @menu_child: @m: @c: @@ -122,10 +122,10 @@ Adds a new #GtkMenuItem to the menu's item list at the position indicated by @position. </para> -<!-- # Unused Parameters # --> @menu: a #GtkMenu. @child: The #GtkMenuItem to add. @pos: +<!-- # Unused Parameters # --> @position: The position in the item list where @child is added. Positions are numbered from 0 to n-1. diff --git a/docs/reference/gtk/tmpl/gtktreemodelsort.sgml b/docs/reference/gtk/tmpl/gtktreemodelsort.sgml index 8cc1233dc2..31dd65af57 100644 --- a/docs/reference/gtk/tmpl/gtktreemodelsort.sgml +++ b/docs/reference/gtk/tmpl/gtktreemodelsort.sgml @@ -36,3 +36,8 @@ GtkTreeModelSort @Returns: +<!-- ##### ARG GtkTreeModelSort:model ##### --> +<para> + +</para> + diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index 68784a2b16..62086cdd11 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1322,6 +1322,9 @@ gtk_cell_renderer_text_editing_done (GtkCellEditable *entry, const gchar *path; const gchar *new_text; + if (GTK_ENTRY (entry)->editing_canceled) + return; + path = g_object_get_data (G_OBJECT (entry), GTK_CELL_RENDERER_TEXT_PATH); new_text = gtk_entry_get_text (GTK_ENTRY (entry)); diff --git a/gtk/gtkcellrenderertext.h b/gtk/gtkcellrenderertext.h index 9d1338f872..e12df6a37c 100644 --- a/gtk/gtkcellrenderertext.h +++ b/gtk/gtkcellrenderertext.h @@ -58,7 +58,6 @@ struct _GtkCellRendererText guint strikethrough : 1; - /* editable feature doesn't work */ guint editable : 1; guint scale_set : 1; @@ -81,8 +80,8 @@ struct _GtkCellRendererTextClass GtkCellRendererClass parent_class; void (* edited) (GtkCellRendererText *cell_renderer_text, - const gchar *path, - const gchar *new_text); + const gchar *path, + const gchar *new_text); }; GtkType gtk_cell_renderer_text_get_type (void); diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index a9c21bebc3..8aed5b169c 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -910,8 +910,9 @@ gtk_entry_init (GtkEntry *entry) entry->dnd_position = -1; entry->width_chars = -1; entry->is_cell_renderer = FALSE; + entry->editing_canceled = FALSE; entry->has_frame = TRUE; - + gtk_drag_dest_set (GTK_WIDGET (entry), GTK_DEST_DEFAULT_HIGHLIGHT, target_table, G_N_ELEMENTS (target_table), @@ -1838,6 +1839,7 @@ gtk_cell_editable_key_press_event (GtkEntry *entry, { if (key_event->keyval == GDK_Escape) { + entry->editing_canceled = TRUE; gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry)); gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry)); diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h index 8243edee65..027e838db4 100644 --- a/gtk/gtkentry.h +++ b/gtk/gtkentry.h @@ -86,6 +86,7 @@ struct _GtkEntry guint in_click : 1; /* Flag so we don't select all when clicking in entry to focus in */ guint is_cell_renderer : 1; + guint editing_canceled : 1; /* Only used by GtkCellRendererText */ guint button; guint blink_timeout; diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index d6d2630e36..9347a98079 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -7158,7 +7158,8 @@ gtk_tree_view_move_column_after (GtkTreeView *tree_view, * @column: %NULL, or the column to draw the expander arrow at. * * Sets the column to draw the expander arrow at. It must be in @tree_view. If - * @column is %NULL, then the expander arrow is fixed at the first column. + * @column is %NULL, then the expander arrow is always at the first visible + * column. **/ void gtk_tree_view_set_expander_column (GtkTreeView *tree_view, @@ -7198,9 +7199,14 @@ gtk_tree_view_set_expander_column (GtkTreeView *tree_view, GtkTreeViewColumn * gtk_tree_view_get_expander_column (GtkTreeView *tree_view) { + GList *list; + g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), NULL); - return tree_view->priv->expander_column; + for (list = tree_view->priv->columns; list; list = list->data) + if (gtk_tree_view_is_expander_column (tree_view, GTK_TREE_VIEW_COLUMN (list->data))) + return (GtkTreeViewColumn *) list->data; + return NULL; } |