[glide] Destroy the theme chooser after we have created our document
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Destroy the theme chooser after we have created our document
- Date: Sat, 5 Jun 2010 19:51:05 +0000 (UTC)
commit 70a643be4b18482cc06153b1bc2d23b1fee0c9ff
Author: Robert Carr <racarr Valentine localdomain>
Date: Sat Jun 5 15:41:29 2010 -0400
Destroy the theme chooser after we have created our document
libglide/glide-document.c | 8 ++++----
libglide/glide-window.c | 2 ++
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libglide/glide-document.c b/libglide/glide-document.c
index a13ae69..d9ba115 100644
--- a/libglide/glide-document.c
+++ b/libglide/glide-document.c
@@ -40,6 +40,8 @@
#include "glide.h"
+#include "glide-dirs.h"
+
G_DEFINE_TYPE(GlideDocument, glide_document, G_TYPE_OBJECT)
#define GLIDE_DOCUMENT_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GLIDE_TYPE_DOCUMENT, GlideDocumentPrivate))
@@ -254,17 +256,15 @@ static void
glide_document_make_working_dir (GlideDocument *d)
{
gchar *wdir, *rdir;
- wdir = g_strdup_printf("%s/glide-%ld", g_get_tmp_dir(), time(NULL));
+ wdir = glide_dirs_make_temp_dir ();
rdir = g_strdup_printf("%s/resources", wdir);
- g_mkdir(wdir, 0700);
g_mkdir(rdir, 0700);
if (d->priv->working_path)
g_free (d->priv->working_path);
- d->priv->working_path = g_strdup (wdir);
+ d->priv->working_path = wdir;
- g_free (wdir);
g_free (rdir);
}
diff --git a/libglide/glide-window.c b/libglide/glide-window.c
index eca27cf..a355666 100644
--- a/libglide/glide-window.c
+++ b/libglide/glide-window.c
@@ -470,6 +470,8 @@ glide_window_theme_chooser_response (GlideThemeChooser *chooser,
gtk_window_set_title (GTK_WINDOW (w), "Glide - (New Document)");
+
+ gtk_widget_destroy (GTK_WIDGET (chooser));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]