Commit 99fea7f9 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

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
parent e874c429
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)
......
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)
......
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)
......
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)
......
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)
......
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)
......
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)
......
......@@ -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.
......
......@@ -36,3 +36,8 @@ GtkTreeModelSort
@Returns:
<!-- ##### ARG GtkTreeModelSort:model ##### -->
<para>
</para>
......@@ -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));
......
......@@ -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);
......
......@@ -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));
......
......@@ -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;
......
......@@ -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;
}
......
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