[glide] Now support undo manager business in the inspector
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Now support undo manager business in the inspector
- Date: Sun, 2 May 2010 08:10:45 +0000 (UTC)
commit 60c535acf3601bde28297b4580d9159c274fabb2
Author: Robert Carr <racarr Valentine localdomain>
Date: Sun May 2 00:33:53 2010 -0400
Now support undo manager business in the inspector
src/glide-inspector-actor.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/glide-inspector-actor.c b/src/glide-inspector-actor.c
index ab833b5..aa1a0b8 100644
--- a/src/glide-inspector-actor.c
+++ b/src/glide-inspector-actor.c
@@ -77,7 +77,11 @@ glide_inspector_actor_center_horizontally (GtkWidget *button,
gfloat x, y;
glide_inspector_actor_get_center_pos (CLUTTER_ACTOR (ins->priv->actor), &x, &y);
+ glide_undo_manager_start_actor_action (glide_actor_get_undo_manager (ins->priv->actor),
+ ins->priv->actor, "Center actor horizontally");
clutter_actor_set_x (CLUTTER_ACTOR (ins->priv->actor), x);
+ glide_undo_manager_end_actor_action (glide_actor_get_undo_manager (ins->priv->actor),
+ ins->priv->actor);
}
static void
@@ -88,7 +92,12 @@ glide_inspector_actor_center_vertically (GtkWidget *button,
gfloat x, y;
glide_inspector_actor_get_center_pos (CLUTTER_ACTOR (ins->priv->actor), &x, &y);
+ glide_undo_manager_start_actor_action (glide_actor_get_undo_manager (ins->priv->actor),
+ ins->priv->actor, "Center actor vertically");
clutter_actor_set_y (CLUTTER_ACTOR (ins->priv->actor), y);
+ glide_undo_manager_end_actor_action (glide_actor_get_undo_manager (ins->priv->actor),
+ ins->priv->actor);
+
}
static void
@@ -100,9 +109,13 @@ glide_inspector_actor_apply_geometry (GlideInspectorActor *ins)
height = gtk_spin_button_get_value (GTK_SPIN_BUTTON (ins->priv->height_spin));
x = gtk_spin_button_get_value (GTK_SPIN_BUTTON (ins->priv->x_spin));
y = gtk_spin_button_get_value (GTK_SPIN_BUTTON (ins->priv->y_spin));
-
+
+ glide_undo_manager_start_actor_action (glide_actor_get_undo_manager (ins->priv->actor),
+ ins->priv->actor, "Modify actor geometry");
clutter_actor_set_position (CLUTTER_ACTOR (ins->priv->actor), x, y);
clutter_actor_set_size (CLUTTER_ACTOR (ins->priv->actor), width, height);
+ glide_undo_manager_end_actor_action (glide_actor_get_undo_manager (ins->priv->actor),
+ ins->priv->actor);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]