mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Only call g_object_get() when necessary. (#373137, Morten Welinder, patch
2007-04-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c (gtk_entry_grab_focus): Only call g_object_get() when necessary. (#373137, Morten Welinder, patch by Xan Lopez) svn path=/trunk/; revision=17678
This commit is contained in:
parent
7af6e12b47
commit
08c05b1bcc
@ -1,3 +1,9 @@
|
||||
2007-04-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_grab_focus): Only call
|
||||
g_object_get() when necessary. (#373137, Morten Welinder,
|
||||
patch by Xan Lopez)
|
||||
|
||||
2007-04-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstatusicon.c (gtk_status_icon_get_size): Add
|
||||
|
@ -2146,13 +2146,16 @@ gtk_entry_grab_focus (GtkWidget *widget)
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_entry_parent_class)->grab_focus (widget);
|
||||
|
||||
g_object_get (gtk_widget_get_settings (widget),
|
||||
"gtk-entry-select-on-focus",
|
||||
&select_on_focus,
|
||||
NULL);
|
||||
if (entry->editable && !entry->in_click)
|
||||
{
|
||||
g_object_get (gtk_widget_get_settings (widget),
|
||||
"gtk-entry-select-on-focus",
|
||||
&select_on_focus,
|
||||
NULL);
|
||||
|
||||
if (select_on_focus && entry->editable && !entry->in_click)
|
||||
gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1);
|
||||
if (select_on_focus)
|
||||
gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user