[gtk+/popovers: 9/17] entry: Avoid bubblewindow popup/popdown API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/popovers: 9/17] entry: Avoid bubblewindow popup/popdown API
- Date: Wed, 13 Nov 2013 19:00:29 +0000 (UTC)
commit b6be0b4d1e7e4fc5fa0a90e0f393061d9999f1b4
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Nov 12 14:35:17 2013 +0100
entry: Avoid bubblewindow popup/popdown API
Besides setting all positioning properties at once, popup() would just
show the widget, so do that directly after just updating the position.
gtk/gtkentry.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index c081557..1affef8 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -9361,7 +9361,7 @@ activate_bubble_cb (GtkWidget *item,
{
const gchar *signal = g_object_get_data (G_OBJECT (item), "gtk-signal");
g_signal_emit_by_name (entry, signal);
- _gtk_bubble_window_popdown (GTK_BUBBLE_WINDOW (entry->priv->selection_bubble));
+ gtk_widget_hide (entry->priv->selection_bubble);
}
static void
@@ -9406,6 +9406,9 @@ bubble_targets_received (GtkClipboard *clipboard,
gtk_widget_destroy (priv->selection_bubble);
priv->selection_bubble = _gtk_bubble_window_new (GTK_WIDGET (entry));
+ _gtk_bubble_window_set_position (GTK_BUBBLE_WINDOW (priv->selection_bubble),
+ GTK_POS_TOP);
+
toolbar = GTK_WIDGET (gtk_toolbar_new ());
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_TEXT);
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), FALSE);
@@ -9453,8 +9456,9 @@ bubble_targets_received (GtkClipboard *clipboard,
rect.width = 0;
}
- _gtk_bubble_window_popup (GTK_BUBBLE_WINDOW (priv->selection_bubble),
- GTK_WIDGET (entry), &rect, GTK_POS_TOP);
+ _gtk_bubble_window_set_pointing_to (GTK_BUBBLE_WINDOW (priv->selection_bubble),
+ &rect);
+ gtk_widget_show (priv->selection_bubble);
priv->selection_bubble_timeout_id = 0;
}
@@ -9479,7 +9483,7 @@ gtk_entry_selection_bubble_popup_unset (GtkEntry *entry)
priv = entry->priv;
if (priv->selection_bubble)
- _gtk_bubble_window_popdown (GTK_BUBBLE_WINDOW (priv->selection_bubble));
+ gtk_widget_hide (priv->selection_bubble);
if (priv->selection_bubble_timeout_id)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]