summaryrefslogtreecommitdiff
path: root/endless
diff options
context:
space:
mode:
authorP. F. Chimento <philip.chimento@gmail.com>2013-12-05 13:25:44 -0800
committerP. F. Chimento <philip.chimento@gmail.com>2013-12-05 13:25:44 -0800
commit60d88b79dcec7ffd9f11f4428aa19178400d7657 (patch)
tree1e387bdb0e0dd1023e8da0e2560b9a8dcd75d88e /endless
parentad771d5c90c36970ff7e60ee631c19753d67a41d (diff)
parentfcb47b2412341aa61cf8756443e4521199519807 (diff)
Merge pull request #428 from endlessm/issues/417
#417 Removed PStack from sdk
Diffstat (limited to 'endless')
-rw-r--r--endless/eospagemanager-private.h3
-rw-r--r--endless/eospagemanager.c32
-rw-r--r--endless/eoswindow.c19
3 files changed, 25 insertions, 29 deletions
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);