diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-10-08 04:24:45 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-10-08 04:24:45 +0000 |
commit | daeea8b8710994bc480b548e73a6049856ba5613 (patch) | |
tree | 94c894243b465b57692e6ce240dea5de545055d6 /gtk/gtkentrycompletion.c | |
parent | 205d5ce310587a67f4bad427069a0a68247ce843 (diff) | |
download | gtk+-daeea8b8710994bc480b548e73a6049856ba5613.tar.gz |
Share the three copies of get_borders() under the name
2004-10-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentry.h:
* gtk/gtkentry.c:
* gtk/gtkentrycompletion.c:
* gtk/gtkspinbutton.c: Share the three copies of get_borders()
under the name _gtk_entry_get_borders(). (#116368, Owen Taylor)
Diffstat (limited to 'gtk/gtkentrycompletion.c')
-rw-r--r-- | gtk/gtkentrycompletion.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index eb7288e239..089fb76534 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1221,39 +1221,6 @@ gtk_entry_completion_get_text_column (GtkEntryCompletion *completion) /* private */ -/* lame copy from gtkentry.c */ -static void -get_borders (GtkEntry *entry, - gint *xborder, - gint *yborder) -{ - GtkWidget *widget = GTK_WIDGET (entry); - gint focus_width; - gboolean interior_focus; - - gtk_widget_style_get (widget, - "interior-focus", &interior_focus, - "focus-line-width", &focus_width, - NULL); - - if (entry->has_frame) - { - *xborder = widget->style->xthickness; - *yborder = widget->style->ythickness; - } - else - { - *xborder = 0; - *yborder = 0; - } - - if (!interior_focus) - { - *xborder += focus_width; - *yborder += focus_width; - } -} - static gboolean gtk_entry_completion_list_enter_notify (GtkWidget *widget, GdkEventCrossing *event, @@ -1293,7 +1260,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion) gint width; gdk_window_get_origin (completion->priv->entry->window, &x, &y); - get_borders (GTK_ENTRY (completion->priv->entry), &x_border, &y_border); + _gtk_entry_get_borders (GTK_ENTRY (completion->priv->entry), &x_border, &y_border); matches = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (completion->priv->filter_model), NULL); |