[gtk+/popovers: 9/26] entry: Avoid bubblewindow popup/popdown API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/popovers: 9/26] entry: Avoid bubblewindow popup/popdown API
- Date: Wed, 25 Dec 2013 12:27:18 +0000 (UTC)
commit d0cd6ed62b5e1e798259375a097406b83697a21a
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]