Fixed clutter deprecations.
Removed clutter_actor_animate calls. Removed clutter_box_layout_set_vertical call. Removed clutter_bin_layout_add calls.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-DCLUTTER_VERSION_MIN_REQUIRED=CLUTTER_VERSION_1_10 \
|
|
||||||
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
|
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
|
||||||
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
|
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
|
||||||
-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
|
-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
|
||||||
|
|||||||
+39
-31
@@ -209,8 +209,8 @@ gcal_window_constructed (GObject *object)
|
|||||||
|
|
||||||
/* base */
|
/* base */
|
||||||
base_layout_manager = clutter_box_layout_new ();
|
base_layout_manager = clutter_box_layout_new ();
|
||||||
clutter_box_layout_set_vertical (CLUTTER_BOX_LAYOUT (base_layout_manager),
|
clutter_box_layout_set_orientation (CLUTTER_BOX_LAYOUT (base_layout_manager),
|
||||||
TRUE);
|
CLUTTER_ORIENTATION_VERTICAL);
|
||||||
base = clutter_actor_new ();
|
base = clutter_actor_new ();
|
||||||
clutter_actor_set_layout_manager (base, base_layout_manager);
|
clutter_actor_set_layout_manager (base, base_layout_manager);
|
||||||
clutter_actor_add_constraint (base,
|
clutter_actor_add_constraint (base,
|
||||||
@@ -221,8 +221,8 @@ gcal_window_constructed (GObject *object)
|
|||||||
|
|
||||||
/* body_actor */
|
/* body_actor */
|
||||||
body_layout_manager = clutter_box_layout_new ();
|
body_layout_manager = clutter_box_layout_new ();
|
||||||
clutter_box_layout_set_vertical (CLUTTER_BOX_LAYOUT (body_layout_manager),
|
clutter_box_layout_set_orientation (CLUTTER_BOX_LAYOUT (body_layout_manager),
|
||||||
TRUE);
|
CLUTTER_ORIENTATION_VERTICAL);
|
||||||
|
|
||||||
body_actor = clutter_actor_new ();
|
body_actor = clutter_actor_new ();
|
||||||
clutter_actor_set_layout_manager (body_actor, body_layout_manager);
|
clutter_actor_set_layout_manager (body_actor, body_layout_manager);
|
||||||
@@ -272,11 +272,14 @@ gcal_window_constructed (GObject *object)
|
|||||||
gtk_widget_show (holder);
|
gtk_widget_show (holder);
|
||||||
|
|
||||||
priv->notebook_actor = gtk_clutter_actor_new_with_contents (holder);
|
priv->notebook_actor = gtk_clutter_actor_new_with_contents (holder);
|
||||||
|
g_object_set (priv->notebook_actor,
|
||||||
|
"x-expand", TRUE,
|
||||||
|
"y-expand", TRUE,
|
||||||
|
"x-align", CLUTTER_ACTOR_ALIGN_FILL,
|
||||||
|
"y-align", CLUTTER_ACTOR_ALIGN_FILL,
|
||||||
|
NULL);
|
||||||
|
clutter_actor_add_child (priv->contents_actor, priv->notebook_actor);
|
||||||
|
|
||||||
clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (contents_layout_manager),
|
|
||||||
priv->notebook_actor,
|
|
||||||
CLUTTER_BIN_ALIGNMENT_FILL,
|
|
||||||
CLUTTER_BIN_ALIGNMENT_FILL);
|
|
||||||
context =
|
context =
|
||||||
gtk_widget_get_style_context (
|
gtk_widget_get_style_context (
|
||||||
gtk_clutter_actor_get_widget (
|
gtk_clutter_actor_get_widget (
|
||||||
@@ -284,22 +287,25 @@ gcal_window_constructed (GObject *object)
|
|||||||
gtk_style_context_add_class (context, "contents");
|
gtk_style_context_add_class (context, "contents");
|
||||||
|
|
||||||
/* sources view */
|
/* sources view */
|
||||||
holder = gcal_floating_container_new ();
|
holder = gtk_frame_new (NULL);
|
||||||
|
gtk_widget_show (holder);
|
||||||
context = gtk_widget_get_style_context (holder);
|
|
||||||
gtk_style_context_add_class (context, "sources-views");
|
|
||||||
|
|
||||||
gtk_widget_show_all (holder);
|
|
||||||
|
|
||||||
priv->sources_actor = gtk_clutter_actor_new_with_contents (holder);
|
priv->sources_actor = gtk_clutter_actor_new_with_contents (holder);
|
||||||
clutter_actor_set_margin_left (priv->sources_actor, 10);
|
g_object_set (priv->sources_actor,
|
||||||
clutter_actor_set_margin_top (priv->sources_actor, 10);
|
"margin-left", 10.0,
|
||||||
clutter_actor_set_opacity (priv->sources_actor, 0);
|
"margin-top", 10.0,
|
||||||
clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (contents_layout_manager),
|
"opacity", 0,
|
||||||
priv->sources_actor,
|
"x-expand", TRUE,
|
||||||
CLUTTER_BIN_ALIGNMENT_START,
|
"y-expand", TRUE,
|
||||||
CLUTTER_BIN_ALIGNMENT_START);
|
"x-align", CLUTTER_ACTOR_ALIGN_START,
|
||||||
|
"y-align", CLUTTER_ACTOR_ALIGN_START,
|
||||||
|
NULL);
|
||||||
|
clutter_actor_add_child (priv->contents_actor, priv->sources_actor);
|
||||||
|
|
||||||
clutter_actor_hide (priv->sources_actor);
|
clutter_actor_hide (priv->sources_actor);
|
||||||
|
clutter_actor_set_background_color (
|
||||||
|
priv->sources_actor,
|
||||||
|
clutter_color_get_static (CLUTTER_COLOR_ALUMINIUM_2));
|
||||||
|
|
||||||
context =
|
context =
|
||||||
gtk_widget_get_style_context (
|
gtk_widget_get_style_context (
|
||||||
@@ -616,24 +622,26 @@ gcal_window_sources_shown (GcalToolbar *main_toolbar,
|
|||||||
if (visible)
|
if (visible)
|
||||||
{
|
{
|
||||||
clutter_actor_show (priv->sources_actor);
|
clutter_actor_show (priv->sources_actor);
|
||||||
clutter_actor_animate (priv->sources_actor,
|
clutter_actor_save_easing_state (priv->sources_actor);
|
||||||
CLUTTER_LINEAR, 150,
|
clutter_actor_set_opacity (priv->sources_actor, 255);
|
||||||
"opacity", 255,
|
clutter_actor_restore_easing_state (priv->sources_actor);
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
clutter_actor_animate (priv->sources_actor,
|
clutter_actor_save_easing_state (priv->sources_actor);
|
||||||
CLUTTER_LINEAR, 150,
|
clutter_actor_set_opacity (priv->sources_actor, 0);
|
||||||
"opacity", 0,
|
clutter_actor_restore_easing_state (priv->sources_actor);
|
||||||
"signal-swapped::completed", clutter_actor_hide, priv->sources_actor,
|
|
||||||
NULL);
|
g_signal_connect (priv->sources_actor,
|
||||||
|
"transition-stopped::opacity",
|
||||||
|
G_CALLBACK (gcal_window_show_hide_actor_cb),
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gcal_window_add_event (GcalToolbar *main_toolbar,
|
gcal_window_add_event (GcalToolbar *main_toolbar,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GcalWindowPrivate *priv;
|
GcalWindowPrivate *priv;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user