forked from AuroraMiddleware/gtk
Work when the entry is not realized. (#392315, Yevgen Muntyan)
2007-01-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c (get_text_area_size): Work when the entry is not realized. (#392315, Yevgen Muntyan) * gtk/gtkentry.c (gtk_entry_queue_draw): Use GTK_WIDGET_DRAWABLE() here. (#392227, Chris Wilson) * gtk/gtkentry.c (cursor_blinks): Don't get settings unnecessarily. (#392227) svn path=/trunk/; revision=17030
This commit is contained in:
parent
8805b9832a
commit
014b276774
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2007-01-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (get_text_area_size): Work when the
|
||||
entry is not realized. (#392315, Yevgen Muntyan)
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_queue_draw): Use
|
||||
GTK_WIDGET_DRAWABLE() here. (#392227, Chris Wilson)
|
||||
|
||||
* gtk/gtkentry.c (cursor_blinks): Don't get settings
|
||||
unnecessarily. (#392227)
|
||||
|
||||
2007-01-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): Only process
|
||||
|
@ -1389,14 +1389,16 @@ get_text_area_size (GtkEntry *entry,
|
||||
"focus-line-width", &focus_width,
|
||||
NULL);
|
||||
|
||||
gdk_drawable_get_size (widget->window, NULL, &frame_height);
|
||||
gtk_widget_get_child_requisition (widget, &requisition);
|
||||
_gtk_entry_get_borders (entry, &xborder, &yborder);
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_drawable_get_size (widget->window, NULL, &frame_height);
|
||||
else
|
||||
frame_height = requisition.height;
|
||||
|
||||
if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
|
||||
height -= 2 * focus_width;
|
||||
|
||||
gtk_widget_get_child_requisition (widget, &requisition);
|
||||
|
||||
_gtk_entry_get_borders (entry, &xborder, &yborder);
|
||||
frame_height -= 2 * focus_width;
|
||||
|
||||
if (x)
|
||||
*x = xborder;
|
||||
@ -3620,7 +3622,7 @@ gtk_entry_draw_cursor (GtkEntry *entry,
|
||||
static void
|
||||
gtk_entry_queue_draw (GtkEntry *entry)
|
||||
{
|
||||
if (GTK_WIDGET_REALIZED (entry))
|
||||
if (GTK_WIDGET_DRAWABLE (entry))
|
||||
gdk_window_invalidate_rect (entry->text_area, NULL, FALSE);
|
||||
}
|
||||
|
||||
@ -5338,14 +5340,16 @@ gtk_entry_drag_data_delete (GtkWidget *widget,
|
||||
static gboolean
|
||||
cursor_blinks (GtkEntry *entry)
|
||||
{
|
||||
GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (entry));
|
||||
gboolean blink;
|
||||
|
||||
if (GTK_WIDGET_HAS_FOCUS (entry) &&
|
||||
entry->editable &&
|
||||
entry->selection_bound == entry->current_pos)
|
||||
{
|
||||
GtkSettings *settings;
|
||||
gboolean blink;
|
||||
|
||||
settings = gtk_widget_get_settings (GTK_WIDGET (entry));
|
||||
g_object_get (settings, "gtk-cursor-blink", &blink, NULL);
|
||||
|
||||
return blink;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user