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:
Matthias Clasen 2007-04-28 17:53:50 +00:00 committed by Matthias Clasen
parent 7af6e12b47
commit 08c05b1bcc
2 changed files with 15 additions and 6 deletions

View File

@ -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

View File

@ -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