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:
committed by
Matthias Clasen
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>
|
2007-04-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkstatusicon.c (gtk_status_icon_get_size): Add
|
* 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);
|
GTK_WIDGET_CLASS (gtk_entry_parent_class)->grab_focus (widget);
|
||||||
|
|
||||||
|
if (entry->editable && !entry->in_click)
|
||||||
|
{
|
||||||
g_object_get (gtk_widget_get_settings (widget),
|
g_object_get (gtk_widget_get_settings (widget),
|
||||||
"gtk-entry-select-on-focus",
|
"gtk-entry-select-on-focus",
|
||||||
&select_on_focus,
|
&select_on_focus,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (select_on_focus && entry->editable && !entry->in_click)
|
if (select_on_focus)
|
||||||
gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1);
|
gtk_editable_select_region (GTK_EDITABLE (widget), 0, -1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user