[gnome-builder] Use popup/popdown on popovers
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] Use popup/popdown on popovers
- Date: Sat, 3 Sep 2016 10:22:29 +0000 (UTC)
commit 47d776a7824ee4ec817723248fce0ed620bb757c
Author: Timm Bäder <mail baedert org>
Date: Sat Sep 3 09:57:12 2016 +0200
Use popup/popdown on popovers
So we don't miss out on those rad transitions.
configure.ac | 2 +-
contrib/egg/egg-simple-popover.c | 2 +-
contrib/gstyle/gstyle-color-widget-actions.c | 2 +-
contrib/gstyle/gstyle-color-widget.c | 2 +-
contrib/gstyle/gstyle-rename-popover.c | 2 +-
libide/preferences/ide-preferences-font-button.c | 6 +++---
libide/runner/ide-run-button.c | 2 +-
libide/search/ide-omni-search-entry.c | 2 +-
libide/transfers/ide-transfers-button.c | 2 +-
libide/tree/ide-tree-node.c | 2 +-
libide/workbench/ide-omni-bar.c | 2 +-
libide/workbench/ide-perspective-menu-button.c | 2 +-
.../gb-color-picker-prefs-palette-row.c | 8 ++++----
13 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d862d57..be06d18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,7 +182,7 @@ AC_SUBST(BUGREPORT_URL)
dnl ***********************************************************************
dnl Check for Required Packages
dnl ***********************************************************************
-m4_define([gtk_required_version], [3.21.1])
+m4_define([gtk_required_version], [3.21.5])
m4_define([glib_required_version], [2.49.0])
m4_define([gtksourceview_required_version], [3.21.2])
m4_define([gobject_introspection_version], [1.48.0])
diff --git a/contrib/egg/egg-simple-popover.c b/contrib/egg/egg-simple-popover.c
index 598ec5a..ca6866c 100644
--- a/contrib/egg/egg-simple-popover.c
+++ b/contrib/egg/egg-simple-popover.c
@@ -172,7 +172,7 @@ egg_simple_popover_button_clicked (EggSimplePopover *self,
text = gtk_entry_get_text (GTK_ENTRY (priv->entry));
g_signal_emit (self, signals [ACTIVATE], 0, text);
- gtk_widget_hide (GTK_WIDGET (self));
+ gtk_popover_popdown (GTK_POPOVER (self));
}
static void
diff --git a/contrib/gstyle/gstyle-color-widget-actions.c b/contrib/gstyle/gstyle-color-widget-actions.c
index 88590bf..4e67ef6 100644
--- a/contrib/gstyle/gstyle-color-widget-actions.c
+++ b/contrib/gstyle/gstyle-color-widget-actions.c
@@ -71,7 +71,7 @@ gstyle_color_widget_actions_rename (GSimpleAction *action,
gtk_popover_set_relative_to (GTK_POPOVER (popover), GTK_WIDGET (self));
g_signal_connect_swapped (popover, "closed", G_CALLBACK (contextual_popover_closed_cb), self);
g_signal_connect_swapped (popover, "renamed", G_CALLBACK (rename_popover_entry_renamed_cb), self);
- gtk_widget_show (popover);
+ gtk_popover_popup (GTK_POPOVER (popover));
}
static void
diff --git a/contrib/gstyle/gstyle-color-widget.c b/contrib/gstyle/gstyle-color-widget.c
index 395783a..0bc6bf7 100644
--- a/contrib/gstyle/gstyle-color-widget.c
+++ b/contrib/gstyle/gstyle-color-widget.c
@@ -516,7 +516,7 @@ gstyle_color_widget_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
gtk_popover_set_relative_to (GTK_POPOVER (popover), GTK_WIDGET (self));
g_signal_connect_swapped (popover, "closed", G_CALLBACK (contextual_popover_closed_cb), self);
- gtk_widget_show (popover);
+ gtk_popover_popup (GTK_POPOVER (popover));
g_object_unref (builder);
}
}
diff --git a/contrib/gstyle/gstyle-rename-popover.c b/contrib/gstyle/gstyle-rename-popover.c
index 70c0fa1..5724a09 100644
--- a/contrib/gstyle/gstyle-rename-popover.c
+++ b/contrib/gstyle/gstyle-rename-popover.c
@@ -96,7 +96,7 @@ entry_validation (GstyleRenamePopover *self)
{
g_signal_emit_by_name (self, "renamed", txt);
g_signal_emit_by_name (self, "closed");
- gtk_widget_hide (GTK_WIDGET (self));
+ gtk_popover_popdown (GTK_POPOVER (self));
}
else
gtk_widget_set_sensitive (GTK_WIDGET (self->button), FALSE);
diff --git a/libide/preferences/ide-preferences-font-button.c
b/libide/preferences/ide-preferences-font-button.c
index adeb90f..c1de4a7 100644
--- a/libide/preferences/ide-preferences-font-button.c
+++ b/libide/preferences/ide-preferences-font-button.c
@@ -63,7 +63,7 @@ ide_preferences_font_button_show (IdePreferencesFontButton *self)
g_object_set (self->chooser, "font", font, NULL);
g_free (font);
- gtk_widget_show (GTK_WIDGET (self->popover));
+ gtk_popover_popup (self->popover);
}
static void
@@ -287,7 +287,7 @@ ide_preferences_font_button_clicked (IdePreferencesFontButton *self,
g_object_get (self->chooser, "font", &font, NULL);
g_settings_set_string (self->settings, self->key, font);
- gtk_widget_hide (GTK_WIDGET (self->popover));
+ gtk_popover_popdown (self->popover);
}
static void
@@ -299,7 +299,7 @@ ide_preferences_font_button_font_activated (IdePreferencesFontButton *self,
g_assert (GTK_IS_FONT_CHOOSER (chooser));
g_settings_set_string (self->settings, self->key, font);
- gtk_widget_hide (GTK_WIDGET (self->popover));
+ gtk_popover_popdown (self->popover);
}
static void
diff --git a/libide/runner/ide-run-button.c b/libide/runner/ide-run-button.c
index d16f043..f4a75a3 100644
--- a/libide/runner/ide-run-button.c
+++ b/libide/runner/ide-run-button.c
@@ -207,7 +207,7 @@ ide_run_button_row_activated (IdeRunButton *self,
/* First change the run action to the selected handler. */
run_manager = ide_context_get_run_manager (context);
ide_run_manager_set_handler (run_manager, id);
- gtk_widget_hide (GTK_WIDGET (self->popover));
+ gtk_popover_popdown (self->popover);
/* Now run the action */
ide_widget_action (GTK_WIDGET (self), "run-manager", "run-with-handler", g_variant_new_string (id));
diff --git a/libide/search/ide-omni-search-entry.c b/libide/search/ide-omni-search-entry.c
index 26841d4..88033c9 100644
--- a/libide/search/ide-omni-search-entry.c
+++ b/libide/search/ide-omni-search-entry.c
@@ -117,7 +117,7 @@ ide_omni_search_entry_hide_popover (IdeOmniSearchEntry *self,
}
gtk_entry_set_text (GTK_ENTRY (self), "");
- gtk_widget_hide (GTK_WIDGET (self->popover));
+ gtk_popover_popdown (self->popover);
if (!leave_entry)
{
diff --git a/libide/transfers/ide-transfers-button.c b/libide/transfers/ide-transfers-button.c
index ef900c5..2a1b170 100644
--- a/libide/transfers/ide-transfers-button.c
+++ b/libide/transfers/ide-transfers-button.c
@@ -267,7 +267,7 @@ ide_transfers_button_clear (GSimpleAction *action,
g_assert (G_IS_SIMPLE_ACTION (action));
- gtk_widget_hide (GTK_WIDGET (self->popover));
+ gtk_popover_popdown (self->popover);
if (NULL != (context = ide_widget_get_context (GTK_WIDGET (self))) &&
NULL != (transfer_manager = ide_context_get_transfer_manager (context)))
diff --git a/libide/tree/ide-tree-node.c b/libide/tree/ide-tree-node.c
index e246627..e96fc13 100644
--- a/libide/tree/ide-tree-node.c
+++ b/libide/tree/ide-tree-node.c
@@ -786,7 +786,7 @@ ide_tree_node_show_popover_timeout_cb (gpointer data)
gtk_popover_set_relative_to (popreq->popover, GTK_WIDGET (tree));
gtk_popover_set_pointing_to (popreq->popover, &rect);
- gtk_widget_show (GTK_WIDGET (popreq->popover));
+ gtk_popover_popup (popreq->popover);
cleanup:
g_object_unref (popreq->self);
diff --git a/libide/workbench/ide-omni-bar.c b/libide/workbench/ide-omni-bar.c
index 2fc636f..2e79272 100644
--- a/libide/workbench/ide-omni-bar.c
+++ b/libide/workbench/ide-omni-bar.c
@@ -525,7 +525,7 @@ multipress_pressed_cb (GtkGestureMultiPress *gesture,
g_assert (IDE_IS_OMNI_BAR (self));
- gtk_widget_show (GTK_WIDGET (self->popover));
+ gtk_popover_popup (self->popover);
style_context = gtk_widget_get_style_context (GTK_WIDGET (self));
state_flags = gtk_style_context_get_state (style_context);
diff --git a/libide/workbench/ide-perspective-menu-button.c b/libide/workbench/ide-perspective-menu-button.c
index 546be84..bdddd4b 100644
--- a/libide/workbench/ide-perspective-menu-button.c
+++ b/libide/workbench/ide-perspective-menu-button.c
@@ -302,7 +302,7 @@ ide_perspective_menu_button_row_activated (IdePerspectiveMenuButton *self,
if (id != NULL && IDE_IS_WORKBENCH (workbench))
{
ide_workbench_set_visible_perspective_name (IDE_WORKBENCH (workbench), id);
- gtk_widget_hide (GTK_WIDGET (self->popover));
+ gtk_popover_popdown (self->popover);
}
}
diff --git a/plugins/color-picker/gb-color-picker-prefs-palette-row.c
b/plugins/color-picker/gb-color-picker-prefs-palette-row.c
index 0ba77e3..f6cb0c2 100644
--- a/plugins/color-picker/gb-color-picker-prefs-palette-row.c
+++ b/plugins/color-picker/gb-color-picker-prefs-palette-row.c
@@ -183,7 +183,7 @@ gb_color_picker_prefs_palette_row_edit (GbColorPickerPrefsPaletteRow *self)
gtk_popover_set_relative_to (GTK_POPOVER (popover), GTK_WIDGET (self));
g_signal_connect_swapped (popover, "closed", G_CALLBACK (contextual_popover_closed_cb), self);
g_signal_connect_swapped (popover, "renamed", G_CALLBACK (rename_popover_entry_renamed_cb), self);
- gtk_widget_show (popover);
+ gtk_popover_popup (GTK_POPOVER (popover));
}
static void
@@ -232,7 +232,7 @@ popover_button_rename_clicked_cb (GbColorPickerPrefsPaletteRow *self,
self->is_editing = TRUE;
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_IS_EDITING]);
- gtk_widget_hide (self->popover_menu);
+ gtk_popover_popdown (GTK_POPOVER (self->popover_menu));
g_signal_emit_by_name (self, "edit");
}
@@ -250,7 +250,7 @@ popover_button_remove_clicked_cb (GbColorPickerPrefsPaletteRow *self,
id = g_variant_get_string (self->target, NULL);
g_signal_emit_by_name (self, "closed", id);
- gtk_widget_hide (self->popover_menu);
+ gtk_popover_popdown (GTK_POPOVER (self->popover_menu));
}
static gboolean
@@ -264,7 +264,7 @@ event_box_button_pressed_cb (GbColorPickerPrefsPaletteRow *self,
if (event->type == GDK_BUTTON_PRESS && event->button == GDK_BUTTON_SECONDARY)
{
- gtk_widget_show (self->popover_menu);
+ gtk_popover_popup (GTK_POPOVER (self->popover_menu));
return GDK_EVENT_STOP;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]