diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2013-11-12 14:35:17 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2014-01-22 17:10:04 +0100 |
commit | 8384ef961ea14abcc1f91d7917b25622bc326c6f (patch) | |
tree | 9ff7669534922d198731f01fc1ce4b9793f76822 /gtk/gtkentry.c | |
parent | 1813c8391c887ad6a509743211c0335b2407bd93 (diff) | |
download | gtk+-8384ef961ea14abcc1f91d7917b25622bc326c6f.tar.gz |
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.
Diffstat (limited to 'gtk/gtkentry.c')
-rw-r--r-- | gtk/gtkentry.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 65cd2a1b2e..d457471aed 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) { |