[gthumb] Revert "Purged gnomevfs from the web album tool"
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Revert "Purged gnomevfs from the web album tool"
- Date: Thu, 14 May 2009 16:28:44 -0400 (EDT)
commit cf1c6387ea518dabbf079d873b495053f5d4b66b
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Thu May 14 16:23:22 2009 -0400
Revert "Purged gnomevfs from the web album tool"
This reverts commit 7d02933a9d4159bf4082692b51bd12b57199e418.
---
src/dlg-web-exporter.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/dlg-web-exporter.c b/src/dlg-web-exporter.c
index 76c8e29..a2a2dbb 100644
--- a/src/dlg-web-exporter.c
+++ b/src/dlg-web-exporter.c
@@ -30,6 +30,9 @@
#include <gtk/gtk.h>
#include <libgnome/gnome-url.h>
#include <libgnome/gnome-help.h>
+#include <libgnomevfs/gnome-vfs-directory.h>
+#include <libgnomevfs/gnome-vfs-ops.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
#include <glade/glade.h>
#include "catalog-web-exporter.h"
@@ -864,8 +867,8 @@ theme_dialog__sel_changed_cb (GtkTreeSelection *selection,
ThemeDialogData *tdata = p;
gboolean theme_selected;
GtkTreeIter iter;
+ char *utf8_name;
char *theme, *path;
- FileData *fd;
theme_selected = gtk_tree_selection_get_selected (selection, NULL, &iter);
@@ -874,9 +877,10 @@ theme_dialog__sel_changed_cb (GtkTreeSelection *selection,
gtk_tree_model_get (GTK_TREE_MODEL (tdata->list_store),
&iter,
- THEME_NAME_COLUMN, &theme,
+ THEME_NAME_COLUMN, &utf8_name,
-1);
+ theme = gnome_vfs_escape_string (utf8_name);
path = g_build_path (G_DIR_SEPARATOR_S,
g_get_home_dir (),
".gnome2",
@@ -898,13 +902,8 @@ theme_dialog__sel_changed_cb (GtkTreeSelection *selection,
GdkPixbuf *image = NULL;
filename = build_uri (path, "preview.png", NULL);
- fd = file_data_new (filename);
- g_free (filename);
-
- if (file_data_has_local_path (fd, NULL)
- && path_is_file (fd->local_path)
- && ((image = gdk_pixbuf_new_from_file (fd->local_path, NULL)) != NULL)) {
-printf ("theme %s: %s\n",theme,fd->local_path);
+ if (path_is_file (filename)
+ && ((image = gdk_pixbuf_new_from_file (filename, NULL)) != NULL)) {
int w = gdk_pixbuf_get_width (image);
int h = gdk_pixbuf_get_height (image);
if (scale_keeping_ratio (&w, &h, MAX_PREVIEW_SIZE, MAX_PREVIEW_SIZE, FALSE)) {
@@ -917,11 +916,12 @@ printf ("theme %s: %s\n",theme,fd->local_path);
else
gtk_image_set_from_stock (GTK_IMAGE (tdata->wat_preview_image), GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_BUTTON);
- file_data_unref (fd);
+ g_free (filename);
if (image != NULL)
g_object_unref (image);
}
+ g_free (utf8_name);
g_free (path);
g_free (theme);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]