aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-file.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-11-06 06:51:55 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-11-06 06:51:55 +0800
commitc7f67942ca864e5d158102eab7f26f6285a05b05 (patch)
tree2a14cae4df16ab9b0019edd6098abec3d75bd1e7 /filter/filter-file.c
parent394f4bee4a7a2fe5f12cb96b636aca99abd11184 (diff)
downloadgsoc2013-evolution-c7f67942ca864e5d158102eab7f26f6285a05b05.tar.gz
gsoc2013-evolution-c7f67942ca864e5d158102eab7f26f6285a05b05.tar.zst
gsoc2013-evolution-c7f67942ca864e5d158102eab7f26f6285a05b05.zip
Ported.
2002-11-05 Jeffrey Stedfast <fejj@ximian.com> * filter-filter.c: Ported. * filter-source.c (get_widget): Don't use e_utf8_to_gtk_string. * filter-option.c (xml_create): Don't use e_utf8_xml1_decode. * filter-input.c (xml_encode): Don't use e_utf8_xml1_encode. (xml_decode): Don't use e_utf8_xml1_decode. (entry_changed): Don't use e_utf8_gtk_entry_get_text. (get_widget): Don't use e_utf8_gtk_entry_set_text. * filter-file.c (xml_encode): Don't use e_utf8_xml1_encode shit. (xml_decode): Don't use e_utf8_xml1_decode. (entry_changed): Don't use e_utf8_gtk_entry_get_text. (get_widget): Don't use e_utf8_gtk_entry_set_text. svn path=/trunk/; revision=18570
Diffstat (limited to 'filter/filter-file.c')
-rw-r--r--filter/filter-file.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/filter/filter-file.c b/filter/filter-file.c
index 6cec675f14..b06dc3eddb 100644
--- a/filter/filter-file.c
+++ b/filter/filter-file.c
@@ -35,7 +35,6 @@
#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomeui/gnome-file-entry.h>
-#include <gal/widgets/e-unicode.h>
#include "filter-file.h"
#include "e-util/e-sexp.h"
@@ -214,7 +213,7 @@ xml_encode (FilterElement *fe)
{
FilterFile *file = (FilterFile *) fe;
xmlNodePtr cur, value;
- char *encstr, *type;
+ char *type;
type = file->type ? file->type : "file";
@@ -225,9 +224,7 @@ xml_encode (FilterElement *fe)
xmlSetProp (value, "type", type);
cur = xmlNewChild (value, NULL, type, NULL);
- encstr = e_utf8_xml1_encode (file->path);
- xmlNodeSetContent (cur, encstr);
- g_free (encstr);
+ xmlNodeSetContent (cur, file->path);
return value;
}
@@ -252,19 +249,13 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
n = node->childs;
if (!strcmp (n->name, type)) {
- char *decstr;
-
str = xmlNodeGetContent (n);
- if (str) {
-
- decstr = e_utf8_xml1_decode (str);
- xmlFree (str);
- } else
- decstr = g_strdup ("");
-
- d(printf (" '%s'\n", decstr));
+ if (str)
+ file->path = g_strdup (str);
+ else
+ file->path = g_strdup ("");
- file->path = decstr;
+ d(printf (" '%s'\n", file->path));
} else {
g_warning ("Unknown node type '%s' encountered decoding a %s\n", n->name, type);
}
@@ -276,12 +267,12 @@ static void
entry_changed (GtkEntry *entry, FilterElement *fe)
{
FilterFile *file = (FilterFile *) fe;
- char *new;
+ const char *new;
- new = e_utf8_gtk_entry_get_text (entry);
+ new = gtk_entry_get_text (entry);
g_free (file->path);
- file->path = new;
+ file->path = g_strdup (new);
}
static GtkWidget *
@@ -295,7 +286,7 @@ get_widget (FilterElement *fe)
gnome_file_entry_set_modal (GNOME_FILE_ENTRY (fileentry), TRUE);
entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (fileentry));
- e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), file->path);
+ gtk_entry_set_text (GTK_ENTRY (entry), file->path);
g_signal_connect (entry, "changed", entry_changed, fe);