[glide] Insert a clutter stage in theme chooser
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Insert a clutter stage in theme chooser
- Date: Sat, 5 Jun 2010 22:30:16 +0000 (UTC)
commit 701602d0472c8a7e682e498423e3c8b42d9dba3d
Author: Robert Carr <racarr Valentine localdomain>
Date: Sat Jun 5 16:51:36 2010 -0400
Insert a clutter stage in theme chooser
libglide/glide-theme-chooser-priv.h | 6 +++---
libglide/glide-theme-chooser.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 3 deletions(-)
---
diff --git a/libglide/glide-theme-chooser-priv.h b/libglide/glide-theme-chooser-priv.h
index 4569c2e..7c69776 100644
--- a/libglide/glide-theme-chooser-priv.h
+++ b/libglide/glide-theme-chooser-priv.h
@@ -28,9 +28,9 @@ struct _GlideThemeChooserPrivate
{
GList *themes;
- GtkWidget *preview;
- GtkWidget *tree_view;
-
+ GtkWidget *embed;
+ ClutterActor *stage;
+
GlideTheme *theme;
};
diff --git a/libglide/glide-theme-chooser.c b/libglide/glide-theme-chooser.c
index 820f675..889cb0d 100644
--- a/libglide/glide-theme-chooser.c
+++ b/libglide/glide-theme-chooser.c
@@ -33,6 +33,8 @@
#include <girepository.h>
+#include <clutter-gtk/clutter-gtk.h>
+
#define GLIDE_THEME_CHOOSER_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GLIDE_TYPE_THEME_CHOOSER, GlideThemeChooserPrivate))
G_DEFINE_TYPE(GlideThemeChooser, glide_theme_chooser, GTK_TYPE_WINDOW);
@@ -90,10 +92,40 @@ glide_theme_chooser_set_property (GObject *object,
}
}
+static void
+glide_theme_chooser_setup_stage (GlideThemeChooser *chooser)
+{
+ ClutterActor *stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (chooser->priv->embed));
+ ClutterColor black = {0x00, 0x00, 0x00, 0xff};
+
+ clutter_actor_set_size (stage, 600, 400);
+ clutter_stage_set_color (CLUTTER_STAGE (stage), &black);
+
+ clutter_actor_show_all (stage);
+
+ chooser->priv->stage = stage;
+}
+
+static GtkWidget *
+glide_theme_chooser_make_clutter_embed (GlideThemeChooser *chooser)
+{
+ GtkWidget *embed = gtk_clutter_embed_new ();
+
+ chooser->priv->embed = embed;
+ glide_theme_chooser_setup_stage (chooser);
+
+ gtk_widget_set_size_request (embed, 600, 400);
+
+ return embed;
+}
+
static GtkWidget *
glide_theme_chooser_make_top_hbox (GlideThemeChooser *chooser)
{
GtkWidget *ret = gtk_hbox_new (FALSE, 0);
+ GtkWidget *embed = glide_theme_chooser_make_clutter_embed (chooser);
+
+ gtk_box_pack_start (GTK_BOX (ret), embed, FALSE, 0, 0);
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]