summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--endless/eospagemanager-private.h3
-rw-r--r--endless/eospagemanager.c32
-rw-r--r--endless/eoswindow.c19
-rw-r--r--test/smoke-tests/frame-rate-tests/gtk.js11
5 files changed, 31 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac
index 7eea226..0458a57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ GTK_REQUIREMENT="gtk+-3.0 >= 3.10"
# These go into the pkg-config file as Requires: and Requires.private:
# (Generally, use Requires.private: instead of Requires:)
EOS_REQUIRED_MODULES=
-EOS_REQUIRED_MODULES_PRIVATE="$GLIB_REQUIREMENT $GOBJECT_REQUIREMENT $GIO_REQUIREMENT $GTK_REQUIREMENT pstack"
+EOS_REQUIRED_MODULES_PRIVATE="$GLIB_REQUIREMENT $GOBJECT_REQUIREMENT $GIO_REQUIREMENT $GTK_REQUIREMENT"
AC_SUBST(EOS_REQUIRED_MODULES)
AC_SUBST(EOS_REQUIRED_MODULES_PRIVATE)
diff --git a/endless/eospagemanager-private.h b/endless/eospagemanager-private.h
index 5a01637..c39a118 100644
--- a/endless/eospagemanager-private.h
+++ b/endless/eospagemanager-private.h
@@ -8,11 +8,10 @@
#include "eospagemanager.h"
#include <gtk/gtk.h>
-#include <pstack.h>
G_BEGIN_DECLS
-PStackTransitionType eos_page_manager_get_pstack_transition_type (EosPageManager *self);
+GtkStackTransitionType eos_page_manager_get_gtk_stack_transition_type (EosPageManager *self);
G_END_DECLS
diff --git a/endless/eospagemanager.c b/endless/eospagemanager.c
index 9a6d0b1..d8b7ea5 100644
--- a/endless/eospagemanager.c
+++ b/endless/eospagemanager.c
@@ -5,7 +5,6 @@
#include "eospagemanager-private.h"
#include <gtk/gtk.h>
-#include <pstack.h>
#include <string.h>
@@ -262,9 +261,8 @@ static void
set_visible_page_from_info (EosPageManager *self,
EosPageManagerPageInfo *info)
{
- /* FIXME when porting to GtkStack */
- PStack *stack = P_STACK (self->priv->stack);
- p_stack_set_visible_child (stack, info->page);
+ GtkStack *stack = GTK_STACK (self->priv->stack);
+ gtk_stack_set_visible_child (stack, info->page);
self->priv->visible_page_info = info;
@@ -906,7 +904,7 @@ eos_page_manager_init (EosPageManager *self)
gtk_widget_set_has_window (self_widget, FALSE);
/* TODO replace with GtkStack */
- self->priv->stack = p_stack_new ();
+ self->priv->stack = gtk_stack_new ();
gtk_widget_set_parent (self->priv->stack, self_widget);
}
@@ -1603,7 +1601,7 @@ eos_page_manager_get_transition_duration (EosPageManager *self)
{
g_return_val_if_fail (EOS_IS_PAGE_MANAGER (self), 0);
- return p_stack_get_transition_duration (P_STACK (self->priv->stack));
+ return gtk_stack_get_transition_duration (GTK_STACK (self->priv->stack));
}
/**
@@ -1620,7 +1618,7 @@ eos_page_manager_set_transition_duration (EosPageManager *self,
{
g_return_if_fail (EOS_IS_PAGE_MANAGER (self));
- p_stack_set_transition_duration (P_STACK (self->priv->stack), duration);
+ gtk_stack_set_transition_duration (GTK_STACK (self->priv->stack), duration);
g_object_notify (G_OBJECT (self), "transition-duration");
}
@@ -1657,7 +1655,7 @@ eos_page_manager_set_transition_type (EosPageManager *self,
g_return_if_fail (EOS_IS_PAGE_MANAGER (self));
self->priv->transition_type = transition_type;
- PStackTransitionType pstack_transition;
+ GtkStackTransitionType gtk_stack_transition;
switch (transition_type)
{
case EOS_PAGE_MANAGER_TRANSITION_TYPE_NONE:
@@ -1666,25 +1664,25 @@ eos_page_manager_set_transition_type (EosPageManager *self,
case EOS_PAGE_MANAGER_TRANSITION_TYPE_SLIDE_LEFT:
case EOS_PAGE_MANAGER_TRANSITION_TYPE_SLIDE_UP:
case EOS_PAGE_MANAGER_TRANSITION_TYPE_SLIDE_DOWN:
- pstack_transition = (PStackTransitionType)self->priv->transition_type;
+ gtk_stack_transition = (GtkStackTransitionType)self->priv->transition_type;
break;
default:
- pstack_transition = P_STACK_TRANSITION_TYPE_NONE;
+ gtk_stack_transition = GTK_STACK_TRANSITION_TYPE_NONE;
break;
}
- p_stack_set_transition_type (P_STACK (self->priv->stack),
- pstack_transition);
+ gtk_stack_set_transition_type (GTK_STACK (self->priv->stack),
+ gtk_stack_transition);
g_object_notify (G_OBJECT (self), "transition-type");
}
/*
- * eos_page_manager_get_pstack_transition_type:
+ * eos_page_manager_get_gtk_stack_transition_type:
* @self: the page manager
*
- * Gets the internal pstack transition type used to animate the page manager.
+ * Gets the internal gtk_stack transition type used to animate the page manager.
*/
-PStackTransitionType
-eos_page_manager_get_pstack_transition_type (EosPageManager *self)
+GtkStackTransitionType
+eos_page_manager_get_gtk_stack_transition_type (EosPageManager *self)
{
- return p_stack_get_transition_type (P_STACK (self->priv->stack));
+ return gtk_stack_get_transition_type (GTK_STACK (self->priv->stack));
}
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index cd0fe68..6258d8b 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -11,7 +11,6 @@
#include "eosmainarea-private.h"
#include <gtk/gtk.h>
-#include <pstack.h>
/**
* SECTION:window
@@ -213,10 +212,10 @@ static void
sync_stack_animation (EosWindow *self)
{
EosPageManager *pm = EOS_PAGE_MANAGER (self->priv->page_manager);
- p_stack_set_transition_type (P_STACK (self->priv->background_stack),
- eos_page_manager_get_pstack_transition_type (pm));
- p_stack_set_transition_duration (P_STACK (self->priv->background_stack),
- eos_page_manager_get_transition_duration (pm));
+ gtk_stack_set_transition_type (GTK_STACK (self->priv->background_stack),
+ eos_page_manager_get_gtk_stack_transition_type (pm));
+ gtk_stack_set_transition_duration (GTK_STACK (self->priv->background_stack),
+ eos_page_manager_get_transition_duration (pm));
}
// Helper to generate frame css override
@@ -269,8 +268,8 @@ update_page_background (EosWindow *self)
gtk_widget_get_name (self->priv->next_background),
next_background_css_props);
override_background_css (self, background_css);
- p_stack_set_visible_child (P_STACK (self->priv->background_stack),
- self->priv->next_background);
+ gtk_stack_set_visible_child (GTK_STACK (self->priv->background_stack),
+ self->priv->next_background);
// Swap our background frames for next animation
GtkWidget *temp = self->priv->next_background;
self->priv->next_background = self->priv->current_background;
@@ -334,8 +333,8 @@ update_page (EosWindow *self)
update_page_left_topbar (self);
update_page_center_topbar (self);
update_page_background (self);
- p_stack_set_transition_type (P_STACK (self->priv->background_stack),
- P_STACK_TRANSITION_TYPE_NONE);
+ gtk_stack_set_transition_type (GTK_STACK (self->priv->background_stack),
+ GTK_STACK_TRANSITION_TYPE_NONE);
if (self->priv->current_page)
{
@@ -631,7 +630,7 @@ eos_window_init (EosWindow *self)
self->priv->overlay = gtk_overlay_new ();
gtk_container_add (GTK_CONTAINER (self), self->priv->overlay);
- self->priv->background_stack = p_stack_new ();
+ self->priv->background_stack = gtk_stack_new ();
gtk_container_add (GTK_CONTAINER (self->priv->overlay), self->priv->background_stack);
gchar *background_name1 = g_strdup_printf (BACKGROUND_FRAME_NAME_TEMPLATE, 1);
diff --git a/test/smoke-tests/frame-rate-tests/gtk.js b/test/smoke-tests/frame-rate-tests/gtk.js
index 8af1376..9ebc14c 100644
--- a/test/smoke-tests/frame-rate-tests/gtk.js
+++ b/test/smoke-tests/frame-rate-tests/gtk.js
@@ -2,17 +2,16 @@
const Lang = imports.lang;
const Gtk = imports.gi.Gtk;
-const PLib = imports.gi.PLib;
const GObject = imports.gi.GObject;
const Endless = imports.gi.Endless;
const TEST_APPLICATION_ID = "com.frametest";
-let TRANSITION1 = PLib.StackTransitionType.SLIDE_LEFT;
-let TRANSITION2 = PLib.StackTransitionType.SLIDE_RIGHT;
+let TRANSITION1 = Gtk.StackTransitionType.SLIDE_LEFT;
+let TRANSITION2 = Gtk.StackTransitionType.SLIDE_RIGHT;
if (ARGV[0] === "crossfade") {
- TRANSITION1 = PLib.StackTransitionType.CROSSFADE;
- TRANSITION2 = PLib.StackTransitionType.CROSSFADE;
+ TRANSITION1 = Gtk.StackTransitionType.CROSSFADE;
+ TRANSITION2 = Gtk.StackTransitionType.CROSSFADE;
}
let BACKGROUND1_NAME = "page1_1080";
@@ -49,7 +48,7 @@ const TestApplication = new Lang.Class ({
this._stack.set_visible_child(this._page1);
}));
- this._stack = new PLib.Stack();
+ this._stack = new Gtk.Stack();
this._stack.add(this._page1);
this._stack.add(this._page2);