summaryrefslogtreecommitdiff
path: root/gtk/gtkdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-12-26 07:02:51 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-12-26 07:02:51 +0000
commit168ad4bc79d006908d732ee827c5e4b294005585 (patch)
tree563f623d831aa398e971e946325e79b5c559d83c /gtk/gtkdialog.c
parentad26705e700c9ba62b180156645bfa1d72a7c77b (diff)
downloadgtk+-168ad4bc79d006908d732ee827c5e4b294005585.tar.gz
Add a gtk-label-select-on-focus setting. (gtk_label_grab_focus): And use
2005-12-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtklabel.c (gtk_label_class_init): Add a gtk-label-select-on-focus setting. (gtk_label_grab_focus): And use it here to select the contents of the label when appropriate. (gtk_label_class_init): Use the same keybindings for select all/ unselect all as GtkEntry and GtkTextView. * gtk/gtkdialog.c (gtk_dialog_map): When looking for the initial focus, avoid leaving a selection in a label.
Diffstat (limited to 'gtk/gtkdialog.c')
-rw-r--r--gtk/gtkdialog.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 59a5a30f98..6ed9952aa0 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -353,8 +353,13 @@ gtk_dialog_map (GtkWidget *widget)
first_focus = window->focus_widget;
else if (first_focus == window->focus_widget)
break;
+
+ if (!GTK_IS_LABEL (window->focus_widget))
+ break;
+ else
+ gtk_label_select_region (GTK_LABEL (window->focus_widget), 0, 0);
}
- while (GTK_IS_LABEL (window->focus_widget));
+ while (TRUE);
tmp_list = children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area));