[glide] Start to fix some bugs with theme choosssser
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Start to fix some bugs with theme choosssser
- Date: Sat, 5 Jun 2010 19:50:45 +0000 (UTC)
commit 2cda762439cecc176aa84b1dcddfe3c80fe24d6c
Author: Robert Carr <racarr Valentine localdomain>
Date: Fri Jun 4 17:49:39 2010 -0400
Start to fix some bugs with theme choosssser
libglide/glide-window.c | 66 +++++++++++++++++++++++-----------------------
1 files changed, 33 insertions(+), 33 deletions(-)
---
diff --git a/libglide/glide-window.c b/libglide/glide-window.c
index d36ba8e..eca27cf 100644
--- a/libglide/glide-window.c
+++ b/libglide/glide-window.c
@@ -427,37 +427,58 @@ glide_window_open_document (GlideWindow *window,
g_object_unref (p);
}
+void
+glide_window_new_text_action_activate (GtkAction *a,
+ gpointer user_data)
+{
+ GlideWindow *w = (GlideWindow *)user_data;
+ ClutterActor *text = glide_text_new ();
+ ClutterColor cc;
+
+ glide_theme_get_default_color (glide_document_get_theme (w->priv->document), &cc);
+
+ glide_text_set_color (GLIDE_TEXT (text), &cc);
+
+ glide_text_set_font_name (GLIDE_TEXT (text),
+ glide_theme_get_default_fontname (glide_document_get_theme (w->priv->document)));
+
+
+ glide_stage_manager_add_actor (w->priv->manager, GLIDE_ACTOR (text));
+ glide_undo_manager_append_insert (w->priv->undo_manager, GLIDE_ACTOR (text));
+
+}
+
+
static void
glide_window_theme_chooser_response (GlideThemeChooser *chooser,
gpointer user_data)
{
GlideWindow *w = (GlideWindow *)user_data;
GlideTheme *t = glide_theme_chooser_get_theme (chooser);
+ GlideDocument *d = glide_document_new ("New Document...");
+ GlideSlide *s;
+
+ glide_window_set_document (w, d);
+
+ s = glide_document_append_slide (w->priv->document);
glide_document_set_theme (w->priv->document, t);
// a little hacky.
glide_slide_set_background (glide_document_get_nth_slide (w->priv->document, 0), glide_theme_get_default_background (glide_document_get_theme (w->priv->document)));
+ glide_window_new_text_action_activate (NULL, w);
+
gtk_window_set_title (GTK_WINDOW (w), "Glide - (New Document)");
-
}
static void
glide_window_new_document_real (GlideWindow *w)
{
GtkWidget *chooser = glide_theme_chooser_new ();
- GlideDocument *d = glide_document_new ("New Document...");
- GlideSlide *s;
gtk_widget_show_all (chooser);
g_signal_connect (chooser, "response", G_CALLBACK (glide_window_theme_chooser_response), w);
-
- glide_window_set_document (w, d);
-
- s = glide_document_append_slide (w->priv->document);
-
- glide_window_set_document (w, d);
}
static void
@@ -995,26 +1016,6 @@ glide_window_new_shape_action_activate (GtkAction *a,
glide_undo_manager_append_insert (w->priv->undo_manager, GLIDE_ACTOR (shape));
}
-void
-glide_window_new_text_action_activate (GtkAction *a,
- gpointer user_data)
-{
- GlideWindow *w = (GlideWindow *)user_data;
- ClutterActor *text = glide_text_new ();
- ClutterColor cc;
-
- glide_theme_get_default_color (glide_document_get_theme (w->priv->document), &cc);
-
- glide_text_set_color (GLIDE_TEXT (text), &cc);
-
- glide_text_set_font_name (GLIDE_TEXT (text),
- glide_theme_get_default_fontname (glide_document_get_theme (w->priv->document)));
-
-
- glide_stage_manager_add_actor (w->priv->manager, GLIDE_ACTOR (text));
- glide_undo_manager_append_insert (w->priv->undo_manager, GLIDE_ACTOR (text));
-
-}
void
glide_window_add_slide_action_activate (GtkAction *a,
@@ -1371,11 +1372,10 @@ glide_window_init (GlideWindow *window)
gtk_window_maximize (GTK_WINDOW (window));
glide_window_new_document_real (window);
- glide_window_new_text_action_activate (NULL, window);
- glide_stage_manager_set_selection (window->priv->manager,
- GLIDE_ACTOR( glide_document_get_nth_slide (window->priv->document,
- glide_stage_manager_get_current_slide (window->priv->manager))));
+ // glide_stage_manager_set_selection (window->priv->manager,
+ // GLIDE_ACTOR( glide_document_get_nth_slide (window->priv->document,
+ // glide_stage_manager_get_current_slide (window->priv->manager))));
// g_signal_connect (window, "hide", G_CALLBACK (glide_window_hide), window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]