[gnome-initial-setup] gnome-initial-setup: Add a way to enable the GTK+ assistant
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] gnome-initial-setup: Add a way to enable the GTK+ assistant
- Date: Tue, 17 Jul 2012 00:45:36 +0000 (UTC)
commit d407721f4d8cddf1ed0806f41702063a11e7119c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Jul 16 20:20:03 2012 -0400
gnome-initial-setup: Add a way to enable the GTK+ assistant
It is triggered by the "enable-animations" GTK+ setting.
gnome-initial-setup/gnome-initial-setup.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index 7e8ffb5..19b375e 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -129,6 +129,8 @@ main (int argc, char *argv[])
SetupData *setup;
gchar *filename;
GError *error;
+ gboolean enable_animations;
+ GType assistant_type;
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -161,7 +163,16 @@ main (int argc, char *argv[])
"window-position", GTK_WIN_POS_CENTER_ALWAYS,
NULL);
- setup->assistant = g_object_new (GIS_TYPE_ASSISTANT_CLUTTER, NULL);
+ g_object_get (gtk_settings_get_default (),
+ "gtk-enable-animations", &enable_animations,
+ NULL);
+
+ if (enable_animations)
+ assistant_type = GIS_TYPE_ASSISTANT_CLUTTER;
+ else
+ assistant_type = GIS_TYPE_ASSISTANT_GTK;
+
+ setup->assistant = g_object_new (assistant_type, NULL);
gtk_container_add (GTK_CONTAINER (setup->main_window), GTK_WIDGET (setup->assistant));
gtk_widget_show (GTK_WIDGET (setup->assistant));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]