[evolution-patches][Shell] Fixes for bug#323853



hi guys,
	these patches are for #323853.  pls review them for me.

regards,

jerry
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/filter/ChangeLog,v
retrieving revision 1.433
diff -u -p -r1.433 ChangeLog
--- ChangeLog	8 Feb 2006 11:44:27 -0000	1.433
+++ ChangeLog	24 Feb 2006 09:37:49 -0000
@@ -1,3 +1,10 @@
+2006-02-24  Shi Pu <shi pu sun com>
+
+	** Fixes Bug #323853
+
+	* filter-file.c: (filename_changed), (get_widget):
+	Replace GnomeFileEntry by GtkFileChooserButton.
+
 2006-01-27  Kjartan Maraas  <kmaraas gnome org>
 
 	* filter-element.c: (filter_element_get_type): Remove unused code
Index: filter-file.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-file.c,v
retrieving revision 1.24
diff -u -p -r1.24 filter-file.c
--- filter-file.c	17 Dec 2005 17:28:29 -0000	1.24
+++ filter-file.c	24 Feb 2006 09:37:49 -0000
@@ -31,7 +31,7 @@
 #include <gtk/gtk.h>
 
 #include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-file-entry.h>
+#include <gtk/gtkfilechooserbutton.h>
 
 #include <libedataserver/e-sexp.h>
 
@@ -269,13 +269,16 @@ xml_decode (FilterElement *fe, xmlNodePt
 }
 
 static void
-entry_changed (GtkEntry *entry, FilterElement *fe)
+filename_changed (GtkWidget *widget, FilterElement *fe)
 {
 	FilterFile *file = (FilterFile *) fe;
 	const char *new;
 	
-	new = gtk_entry_get_text (entry);
-	
+#ifdef USE_GTKFILECHOOSER
+	new = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+#else
+	new = gtk_entry_get_text (GTK_ENTRY (widget));
+#endif
 	g_free (file->path);
 	file->path = g_strdup (new);
 }
@@ -284,19 +287,26 @@ static GtkWidget *
 get_widget (FilterElement *fe)
 {
 	FilterFile *file = (FilterFile *) fe;
-	GtkWidget *fileentry, *entry;
-	
-	fileentry = gnome_file_entry_new (NULL, _("Choose a file"));
-	g_object_set (G_OBJECT (fileentry), "use_filechooser", TRUE, NULL);
-	gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (fileentry), file->path);
-	gnome_file_entry_set_modal (GNOME_FILE_ENTRY (fileentry), TRUE);
+	GtkWidget *filewidget, *entry;
+
+#ifdef USE_GTKFILECHOOSER
+	filewidget = gtk_file_chooser_button_new (NULL, _("Choose a file"));
+	g_object_set (G_OBJECT (filewidget), "use_filechooser", TRUE, NULL);
+	gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewidget), file->path);
+	g_signal_connect (GTK_FILE_CHOOSER_BUTTON (filewidget), "selection-changed", 
+			G_CALLBACK (filename_changed), fe);
+#else
+	filewidget = gnome_file_entry_new (NULL, _("Choose a file"));
+	g_object_set (G_OBJECT (filewidget), "use_filechooser", TRUE, NULL);
+	gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (filewidget), file->path);
+	gnome_file_entry_set_modal (GNOME_FILE_ENTRY (filewidget), TRUE);
 	
-	entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (fileentry));
+	entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (filewidget));
 	gtk_entry_set_text (GTK_ENTRY (entry), file->path);
 	
-	g_signal_connect (entry, "changed", G_CALLBACK (entry_changed), fe);
-	
-	return fileentry;
+	g_signal_connect (entry, "changed", G_CALLBACK (filename_changed), fe);
+#endif	
+	return filewidget;
 }
 
 static void
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3809
diff -u -p -r1.3809 ChangeLog
--- ChangeLog	24 Feb 2006 05:08:51 -0000	1.3809
+++ ChangeLog	24 Feb 2006 09:33:56 -0000
@@ -1,3 +1,25 @@
+2006-02-24  Shi Pu <shi pu sun com>
+
+	** Fixes Bug #323853
+
+	* em-composer-prefs.c: (sig_edit_cb), (sig_add_script_response):
+	* em-mailer-prefs.c: (notify_sound_changed),
+	(em_mailer_prefs_construct):
+	* em-mailer-prefs.h:
+	* em-popup.c: (emp_apps_open_in):
+	* mail-config.glade:
+	Replace GnomeFileEntry by GtkFileChooserButton.
+
 2006-02-24  Sankar P  <psankar novell com>
 	
 	* em-account-editor.c: (emae_check_complete)
@@ -22,6 +44,7 @@
 	CAMEL_MESSAGE_DATE_CURRENT for Date:, try the date from Received:
 	then. If that doesn't work either, use current date.
 
 2006-02-20  Srinivasa Ragavan <sragavan novell com>
 
 	** Fixes bug #322160 and committed for PRSuman.
@@ -46,6 +69,7 @@ t2006-02-20  Parthasarathi Susarla <spar
 	* em-folder-browser.c: (emfb_activate): Uncommented the code to set
 	the preview pane position.
 
 2006-02-15  Parthasarathi Susarla <sparthasarathi novell com>
 	
 	* mail-mt.c: (do_op_status):
@@ -60,6 +84,7 @@ t2006-02-20  Parthasarathi Susarla <spar
 	not empty, check combo box of authmech, to pick up the authmech
 	information.
 
 2006-02-13  Karsten Bräckelmann  <guenther rudersport de>
  
 	* em-account-editor.c: Fix the Account Editor / Security option to
Index: em-composer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-composer-prefs.c,v
retrieving revision 1.32
diff -u -p -r1.32 em-composer-prefs.c
--- em-composer-prefs.c	25 Nov 2005 15:13:32 -0000	1.32
+++ em-composer-prefs.c	24 Feb 2006 09:38:05 -0000
@@ -57,7 +57,7 @@
 #include <gtk/gtkimage.h>
 #include <gtk/gtkstock.h>
 
-#include <libgnomeui/gnome-file-entry.h>
+#include <gtk/gtkfilechooserbutton.h>
 #include <libgnomeui/gnome-color-picker.h>
 
 #include <gtkhtml/gtkhtml.h>
@@ -319,8 +319,8 @@ sig_edit_cb (GtkWidget *widget, EMCompos
 		/* signature script */
 		GtkWidget *entry;
 		
-		entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script");
-		gnome_file_entry_set_filename ((GnomeFileEntry *) entry, sig->filename);
+		entry = glade_xml_get_widget (prefs->sig_script_gui, "filechooserbutton_add_script");
+		gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (entry), sig->filename);
 		
 		entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
 		gtk_entry_set_text (GTK_ENTRY (entry), sig->name);
@@ -383,8 +383,8 @@ sig_add_script_response (GtkWidget *widg
 	int argc;
 	
 	if (button == GTK_RESPONSE_ACCEPT) {
-		entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script");
-		script = gnome_file_entry_get_full_path((GnomeFileEntry *)entry, FALSE);
+		entry = glade_xml_get_widget (prefs->sig_script_gui, "filechooserbutton_add_script");
+		script = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (entry));
 		
 		entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
 		name = gtk_entry_get_text (GTK_ENTRY (entry));
Index: em-mailer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.c,v
retrieving revision 1.35
diff -u -p -r1.35 em-mailer-prefs.c
--- em-mailer-prefs.c	9 Feb 2006 07:54:01 -0000	1.35
+++ em-mailer-prefs.c	24 Feb 2006 09:38:05 -0000
@@ -37,7 +37,7 @@
 
 #include <libgnomeui/gnome-color-picker.h>
 #include <libgnomeui/gnome-font-picker.h>
-#include <libgnomeui/gnome-file-entry.h>
+#include <gtk/gtkfilechooserbutton.h>
 
 #include <glade/glade.h>
 
@@ -662,10 +662,8 @@ static void
 notify_sound_changed (GtkWidget *widget, EMMailerPrefs *prefs)
 {
 	const char *filename;
-	GtkWidget *entry;
-	
-	entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prefs->notify_sound_file));
-	filename = gtk_entry_get_text (GTK_ENTRY (entry));
+
+	filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prefs->notify_sound_file));
 	gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/notify/sound", filename, NULL);
 }
 
@@ -806,10 +804,10 @@ em_mailer_prefs_construct (EMMailerPrefs
 	if (locked)
 		gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_play_sound, FALSE);
 	
-	prefs->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound"));
+	prefs->notify_sound_file = GTK_FILE_CHOOSER_BUTTON (glade_xml_get_widget (gui, "fileNotifyPlaySoundButton"));
 	buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
-	gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), buf ? buf : "");
-	g_signal_connect (gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed",
+	gtk_file_chooser_set_filename (GTK_FILE_CHOOSER_BUTTON (prefs->notify_sound_file), buf ? buf : "");
+	g_signal_connect (GTK_FILE_CHOOSER_BUTTON (prefs->notify_sound_file), "selection-changed",
 			  G_CALLBACK (notify_sound_changed), prefs);
 	if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL))
 		gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_sound_file, FALSE);
Index: em-mailer-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.h,v
retrieving revision 1.13
diff -u -p -r1.13 em-mailer-prefs.h
--- em-mailer-prefs.h	8 Feb 2006 11:51:32 -0000	1.13
+++ em-mailer-prefs.h	24 Feb 2006 09:38:05 -0000
@@ -38,7 +38,7 @@ struct _GdkPixbuf;
 struct _GtkWidget;
 struct _GladeXML;
 struct _GnomeColorPicker;
-struct _GnomeFileEntry;
+struct _GtkFileChooserbutton;
 struct _GnomeFontPicker;
 struct _GConfClient;
 struct _GtkButton;
@@ -87,7 +87,7 @@ struct _EMMailerPrefs {
 	struct _GtkToggleButton *notify_not;
 	struct _GtkToggleButton *notify_beep;
 	struct _GtkToggleButton *notify_play_sound;
-	struct _GnomeFileEntry *notify_sound_file;
+	struct _GtkFileChooserButton *notify_sound_file;
 	
 	/* HTML Mail tab */
 	struct _GnomeFontPicker *font_variable;
Index: mail-config.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.glade,v
retrieving revision 1.169
diff -u -p -r1.169 mail-config.glade
--- mail-config.glade	11 Feb 2006 22:30:36 -0000	1.169
+++ mail-config.glade	24 Feb 2006 09:38:08 -0000
@@ -5475,7 +5475,7 @@ For example: &quot;Work&quot; or &quot;P
 				  <property name="yalign">0.5</property>
 				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="mnemonic_widget">txtNotifyPlaySound</property>
+				  <property name="mnemonic_widget">fileNotifyPlaySoundButton</property>
 				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 				  <property name="width_chars">-1</property>
 				  <property name="single_line_mode">False</property>
@@ -5489,28 +5489,13 @@ For example: &quot;Work&quot; or &quot;P
 			      </child>
 
 			      <child>
-				<widget class="GnomeFileEntry" id="fileNotifyPlaySound">
-				  <property name="visible">True</property>
-				  <property name="max_saved">10</property>
-				  <property name="browse_dialog_title" translatable="yes">Select sound file</property>
-				  <property name="directory_entry">False</property>
-				  <property name="modal">False</property>
-				  <property name="use_filechooser">True</property>
-				  <property name="filechooser_action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
-
-				  <child internal-child="entry">
-				    <widget class="GtkEntry" id="txtNotifyPlaySound">
-				      <property name="visible">True</property>
-				      <property name="can_focus">True</property>
-				      <property name="editable">True</property>
-				      <property name="visibility">True</property>
-				      <property name="max_length">0</property>
-				      <property name="text" translatable="yes"></property>
-				      <property name="has_frame">True</property>
-				      <property name="invisible_char">*</property>
-				      <property name="activates_default">False</property>
-				    </widget>
-				  </child>
+				<widget class="GtkFileChooserButton" id="fileNotifyPlaySoundButton">
+				  <property name="title" translatable="yes">Select A File</property>
+				  <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+				  <property name="local_only">False</property>
+				  <property name="show_hidden">False</property>
+				  <property name="do_overwrite_confirmation">False</property>
+				  <property name="width_chars">-1</property>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
@@ -8746,7 +8731,7 @@ for display purposes only. </property>
 		      <property name="yalign">0.5</property>
 		      <property name="xpad">0</property>
 		      <property name="ypad">0</property>
-		      <property name="mnemonic_widget">combo-entry2</property>
+		      <property name="mnemonic_widget">filechooserbutton_add_script</property>
 		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 		      <property name="width_chars">-1</property>
 		      <property name="single_line_mode">False</property>
@@ -8784,34 +8769,20 @@ for display purposes only. </property>
 		  </child>
 
 		  <child>
-		    <widget class="GnomeFileEntry" id="fileentry_add_script_script">
-		      <property name="visible">True</property>
-		      <property name="history_id">evolution_script_signature</property>
-		      <property name="max_saved">10</property>
-		      <property name="directory_entry">False</property>
-		      <property name="modal">False</property>
-		      <property name="use_filechooser">True</property>
-		      <property name="filechooser_action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
-
-		      <child internal-child="entry">
-			<widget class="GtkEntry" id="combo-entry2">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="visibility">True</property>
-			  <property name="max_length">0</property>
-			  <property name="text" translatable="yes"></property>
-			  <property name="has_frame">True</property>
-			  <property name="invisible_char">*</property>
-			  <property name="activates_default">False</property>
-			</widget>
-		      </child>
+		    <widget class="GtkFileChooserButton" id="filechooserbutton_add_script">
+		      <property name="title" translatable="yes">Select A File</property>
+		      <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+		      <property name="local_only">True</property>
+		      <property name="show_hidden">False</property>
+		      <property name="do_overwrite_confirmation">False</property>
+		      <property name="width_chars">-1</property>
 		    </widget>
 		    <packing>
 		      <property name="left_attach">1</property>
 		      <property name="right_attach">2</property>
 		      <property name="top_attach">1</property>
 		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
 		      <property name="y_options"></property>
 		    </packing>
 		  </child>
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1568
diff -u -p -r1.1568 ChangeLog
--- shell/ChangeLog	20 Feb 2006 23:46:15 -0000	1.1568
+++ shell/ChangeLog	28 Feb 2006 07:50:59 -0000
@@ -1,3 +1,12 @@
+2006-02-28  Nancy Cai <nancy cai sun com>
+
+	Fixes #323853
+
+	* e-shell-importer.c: (filename_changed), (item_selected),
+	(importer_file_page_new), (prepare_file_page):
+	replacing GnomeFileEntry by GtkFileButton, which can import task files
+	with none UTF-8 filenames.
+
 2006-02-21  Tor Lillqvist  <tml novell com>
 
 	* main.c (main): On Win32, finally call link_shutdown() (from
Index: shell/e-shell-importer.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-importer.c,v
retrieving revision 1.85
diff -u -p -r1.85 e-shell-importer.c
--- shell/e-shell-importer.c	18 Dec 2005 04:33:14 -0000	1.85
+++ shell/e-shell-importer.c	28 Feb 2006 07:50:59 -0000
@@ -40,6 +40,8 @@
 #include <libgnomeui/gnome-druid-page-standard.h>
 #include <libgnomeui/gnome-file-entry.h>
 
+#include <gtk/gtkfilechooserbutton.h>
+
 #include "misc/e-gui-utils.h"
 
 #include "e-util/e-dialog-utils.h"
@@ -177,7 +179,7 @@ create_help (const char *name)
 /* Importing functions */
 
 static void
-filename_changed (GtkEntry *entry,
+filename_changed (GtkWidget *widget,
 		  ImportData *data)
 {
 	ImportDialogFilePage *page;
@@ -186,7 +188,11 @@ filename_changed (GtkEntry *entry,
 
 	page = data->filepage;
 
-	filename = gtk_entry_get_text (entry);
+#ifdef USE_GTKFILECHOOSER
+	filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+#else
+	filename = gtk_entry_get_text ((GtkEntry *) gnome_file_entry_get_entry ((GnomeFileEntry *)widget));
+#endif
 
 	fileok = filename && filename[0] && g_file_test(filename, G_FILE_TEST_IS_REGULAR);
 	if (fileok) {
@@ -239,7 +245,7 @@ item_selected (GtkWidget *item,
 	       ImportData *data)
 {
 	data->filepage->importer = g_object_get_data((GObject *)item, "importer");
-	filename_changed((GtkEntry *)gnome_file_entry_gtk_entry((GnomeFileEntry *)data->filepage->filename), data);
+	filename_changed(data->filepage->filename, data);
 }
 
 #if 0
@@ -287,11 +293,16 @@ importer_file_page_new (ImportData *data
 			  GTK_FILL, 0, 0, 0);
 	gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
 
+#ifdef USE_GTKFILECHOOSER
+	page->filename = gtk_file_chooser_button_new (_("Select a file"), GTK_FILE_CHOOSER_ACTION_OPEN);
+	g_signal_connect (GTK_FILE_CHOOSER_BUTTON (page->filename), "selection-changed", G_CALLBACK (filename_changed), data);
+#else
 	page->filename = gnome_file_entry_new ("Evolution_Importer_FileName", _("Select a file"));
 	g_object_set (G_OBJECT (page->filename), "use_filechooser", TRUE, NULL);
 	entry = gnome_file_entry_gtk_entry((GnomeFileEntry *)page->filename);
 	g_signal_connect (entry, "changed", G_CALLBACK (filename_changed), data);
 	gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
+#endif
 
 	gtk_table_attach (GTK_TABLE (table), page->filename, 1, 2, 
 			  row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
@@ -546,7 +557,7 @@ prepare_file_page (GnomeDruidPage *dpage
 	ImportDialogFilePage *page = data->filepage;
 
 	if (page->target != NULL) {
-		filename_changed((GtkEntry *)gnome_file_entry_gtk_entry((GnomeFileEntry *)data->filepage->filename), data);
+		filename_changed(data->filepage->filename, data);
 		return FALSE;
 	}
 
@@ -571,7 +582,7 @@ prepare_file_page (GnomeDruidPage *dpage
 	data->filepage->menu = menu;
 	gtk_option_menu_set_menu((GtkOptionMenu *)data->filepage->filetype, menu);
 
-	filename_changed((GtkEntry *)gnome_file_entry_gtk_entry((GnomeFileEntry *)data->filepage->filename), data);
+	filename_changed(data->filepage->filename, data);
 
 	return FALSE;
 }
Index: components/html-editor/ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.528
diff -u -p -r1.528 ChangeLog
--- components/html-editor/ChangeLog	7 Feb 2006 13:37:03 -0000	1.528
+++ components/html-editor/ChangeLog	21 Feb 2006 08:36:26 -0000
@@ -1,3 +1,14 @@
+2006-02-21  Shi Pu <shi pu sun com>
+	
+	See bug #323853
+
+	* body.c: (changed_template), (body_properties):
+	* cell.c: (set_bg_pixmap), (cell_widget), (set_ui):
+	* gtkhtml-editor-properties.glade:
+	* image.c: (get_location), (image_set_ui), (image_widget):
+	* table.c: (table_widget), (set_ui):
+	replace GnomeFileEntry and GnomePixmapEntry by GtkFileChooserButton.
+
 2006-02-07  Andre Klapper  <a9016009 gmx de>
 	* GNOME_GtkHTML_Editor.xml.in: 
 	* GNOME_GtkHTML_Editor-emacs.xml.in: 
Index: components/html-editor/body.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/body.c,v
retrieving revision 1.55
diff -u -p -r1.55 body.c
--- components/html-editor/body.c	14 Oct 2005 12:13:50 -0000	1.55
+++ components/html-editor/body.c	21 Feb 2006 08:36:26 -0000
@@ -185,7 +185,7 @@ changed_template (GtkWidget *w, GtkHTMLE
 	filename = (body_templates [template].bg_pixmap ?
 		    g_build_filename (ICONDIR, body_templates [template].bg_pixmap, NULL) :
 		    g_strdup (""));
-	gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->pixmap_entry))),
+	gtk_file_chooser_set_filename (GTK_FILE_CHOOSER ((d->pixmap_entry)),
 			    filename);
 	g_free (filename);
 
@@ -273,18 +273,18 @@ body_properties (GtkHTMLControlData *cd,
 
 	gtk_box_pack_start (GTK_BOX (main_vbox), editor_hig_vbox (_("Colors"), t1), FALSE, FALSE, 0);
 
-	data->pixmap_entry = gnome_pixmap_entry_new ("background_image", _("Background Image"), FALSE);
+	data->pixmap_entry = gtk_file_chooser_button_new (_("Background Image"), GTK_FILE_CHOOSER_ACTION_OPEN);
 	if (cd->html->engine->bgPixmapPtr) {
 		HTMLImagePointer *ip = (HTMLImagePointer *) cd->html->engine->bgPixmapPtr;
 		gchar *filename = gtk_html_filename_from_uri (ip->url);
 		
-		gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (data->pixmap_entry))),
+		gtk_file_chooser_set_filename (GTK_FILE_CHOOSER ((data->pixmap_entry)),
 				    filename);
 		g_free (filename);
 	}
 
 
-	atk_object_set_name (gtk_widget_get_accessible (gnome_file_entry_gnome_entry (GNOME_FILE_ENTRY (data->pixmap_entry))), _("Background Image File Path"));
+	atk_object_set_name (gtk_widget_get_accessible (GTK_FILE_CHOOSER (data->pixmap_entry)), _("Background Image File Path"));
 
 	t1 = gtk_table_new (2, 2, FALSE);
 	gtk_table_set_col_spacings (GTK_TABLE (t1), 6);
@@ -319,8 +319,8 @@ body_properties (GtkHTMLControlData *cd,
         g_signal_connect (data->combo [0], "color_changed", G_CALLBACK (color_changed), data);
         g_signal_connect (data->combo [1], "color_changed", G_CALLBACK (color_changed), data);
         g_signal_connect (data->combo [2], "color_changed", G_CALLBACK (color_changed), data);
-	g_signal_connect (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (data->pixmap_entry)),
-			  "changed", G_CALLBACK (entry_changed), data);
+	g_signal_connect (GTK_FILE_CHOOSER_BUTTON (data->pixmap_entry),
+			  "selection-changed", G_CALLBACK (entry_changed), data);
 
 	return main_vbox;
 }
Index: components/html-editor/cell.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/cell.c,v
retrieving revision 1.40
diff -u -p -r1.40 cell.c
--- components/html-editor/cell.c	11 Sep 2005 04:04:18 -0000	1.40
+++ components/html-editor/cell.c	21 Feb 2006 08:36:26 -0000
@@ -170,7 +170,7 @@ set_bg_pixmap (HTMLTableCell *cell, GtkH
 	const char *file;
 	char *url = NULL;
 
-	file = gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->entry_bg_pixmap))));
+	file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (d->entry_bg_pixmap));
 	url = gtk_html_filename_to_uri (file);
 
 	html_engine_table_cell_set_bg_pixmap (d->cd->html->engine, cell, url);
@@ -367,8 +367,8 @@ cell_widget (GtkHTMLEditCellProperties *
 	gtk_box_pack_start (GTK_BOX (glade_xml_get_widget (xml, "bg_color_hbox")), d->combo_bg_color, FALSE, FALSE, 0);
 
 	d->entry_bg_pixmap = glade_xml_get_widget (xml, "entry_cell_bg_pixmap");
-	g_signal_connect (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->entry_bg_pixmap)),
-			    "changed", G_CALLBACK (changed_bg_pixmap), d);
+	g_signal_connect (GTK_FILE_CHOOSER_BUTTON (d->entry_bg_pixmap),
+			    "selection-changed", G_CALLBACK (changed_bg_pixmap), d);
 
 	d->option_halign = glade_xml_get_widget (xml, "option_cell_halign");
 	g_signal_connect (gtk_option_menu_get_menu (GTK_OPTION_MENU (d->option_halign)), "selection-done",
@@ -402,7 +402,7 @@ cell_widget (GtkHTMLEditCellProperties *
 	g_signal_connect (d->spin_rspan, "value_changed", G_CALLBACK (changed_rspan), d);
 
 	gtk_widget_show_all (cell_page);
-	gnome_pixmap_entry_set_preview (GNOME_PIXMAP_ENTRY (d->entry_bg_pixmap), FALSE);
+	gtk_file_chooser_set_preview_widget_active (GTK_FILE_CHOOSER (d->entry_bg_pixmap), FALSE);
 
 	return cell_page;
 }
@@ -421,7 +421,7 @@ set_ui (GtkHTMLEditCellProperties *d)
 	if (d->cell->have_bgPixmap) {
 		char *filename = gtk_html_filename_from_uri (d->cell->bgPixmap->url);
 
-		gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->entry_bg_pixmap))),
+		gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (d->entry_bg_pixmap),
 				    filename);
 		g_free (filename);
 	}
Index: components/html-editor/gtkhtml-editor-properties.glade
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/gtkhtml-editor-properties.glade,v
retrieving revision 1.34
diff -u -p -r1.34 gtkhtml-editor-properties.glade
--- components/html-editor/gtkhtml-editor-properties.glade	14 Sep 2005 12:10:32 -0000	1.34
+++ components/html-editor/gtkhtml-editor-properties.glade	21 Feb 2006 08:36:27 -0000
@@ -768,49 +768,23 @@
 		      </child>
 
 		      <child>
-			<widget class="GnomePixmapEntry" id="entry_table_bg_pixmap">
-			  <property name="visible">True</property>
-			  <property name="max_saved">10</property>
-			  <property name="modal">False</property>
-			  <property name="do_preview">False</property>
-			  <property name="use_filechooser">False</property>
+			<widget class="GtkFileChooserButton" id="entry_table_bg_pixmap">
+			  <property name="title" translatable="yes">Select A File</property>
+			  <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+			  <property name="local_only">False</property>
+			  <property name="show_hidden">False</property>
+			  <property name="do_overwrite_confirmation">False</property>
+			  <property name="width_chars">-1</property> 
+			  
+			  <child>
+			    <widget class="GtkFileChooserButton" id="fileentry1">
+			      <property name="title" translatable="yes">Select A File</property>
+			      <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+			      <property name="local_only">False</property>
+			      <property name="show_hidden">False</property>
+			      <property name="do_overwrite_confirmation">False</property>
+			      <property name="width_chars">-1</property>
 
-			  <child internal-child="entry">
-			    <widget class="GtkEntry" id="entry7">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="editable">True</property>
-			      <property name="visibility">True</property>
-			      <property name="max_length">0</property>
-			      <property name="text" translatable="yes"></property>
-			      <property name="has_frame">True</property>
-			      <property name="invisible_char" translatable="yes">*</property>
-			      <property name="activates_default">False</property>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GnomeFileEntry" id="fileentry1">
-			      <property name="visible">True</property>
-			      <property name="history_id">Table Background Image</property>
-			      <property name="max_saved">10</property>
-			      <property name="directory_entry">True</property>
-			      <property name="modal">False</property>
-			      <property name="use_filechooser">False</property>
-
-			      <child internal-child="entry">
-				<widget class="GtkEntry" id="combo-entry1">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="editable">True</property>
-				  <property name="visibility">True</property>
-				  <property name="max_length">0</property>
-				  <property name="text" translatable="yes"></property>
-				  <property name="has_frame">True</property>
-				  <property name="invisible_char" translatable="yes">*</property>
-				  <property name="activates_default">False</property>
-				</widget>
-			      </child>
 			    </widget>
 			  </child>
 			</widget>
@@ -1796,49 +1770,23 @@
 		      </child>
 
 		      <child>
-			<widget class="GnomePixmapEntry" id="entry_cell_bg_pixmap">
-			  <property name="visible">True</property>
-			  <property name="max_saved">10</property>
-			  <property name="modal">False</property>
-			  <property name="do_preview">False</property>
-			  <property name="use_filechooser">False</property>
+			<widget class="GtkFileChooserButton" id="entry_cell_bg_pixmap">
+			  <property name="title" translatable="yes">Select A File</property>
+			  <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+			  <property name="local_only">False</property>
+			  <property name="show_hidden">False</property>
+			  <property name="do_overwrite_confirm">False</property>
+			  <property name="width_chars">-1</property>
+
+			  <child>
+			    <widget class="GtkFileChooserButton" id="entry2">
+			      <property name="title" translatable="yes">Select A File</property>
+			      <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+			      <property name="local_only">False</property>
+			      <property name="show_hidden">False</property>
+			      <property name="do_overwrite_confirmation">False</property>
+			      <property name="width_chars">-1</property>
 
-			  <child internal-child="entry">
-			    <widget class="GtkEntry" id="entry8">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="editable">True</property>
-			      <property name="visibility">True</property>
-			      <property name="max_length">0</property>
-			      <property name="text" translatable="yes"></property>
-			      <property name="has_frame">True</property>
-			      <property name="invisible_char" translatable="yes">*</property>
-			      <property name="activates_default">False</property>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GnomeFileEntry" id="entry2">
-			      <property name="visible">True</property>
-			      <property name="history_id">Cell Background Image</property>
-			      <property name="max_saved">10</property>
-			      <property name="directory_entry">False</property>
-			      <property name="modal">False</property>
-			      <property name="use_filechooser">False</property>
-
-			      <child internal-child="entry">
-				<widget class="GtkEntry" id="combo-entry2">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="editable">True</property>
-				  <property name="visibility">True</property>
-				  <property name="max_length">0</property>
-				  <property name="text" translatable="yes"></property>
-				  <property name="has_frame">True</property>
-				  <property name="invisible_char" translatable="yes">*</property>
-				  <property name="activates_default">False</property>
-				</widget>
-			      </child>
 			    </widget>
 			  </child>
 			</widget>
@@ -2753,49 +2701,23 @@
 		      </child>
 
 		      <child>
-			<widget class="GnomePixmapEntry" id="pentry_image_location">
-			  <property name="visible">True</property>
-			  <property name="max_saved">10</property>
-			  <property name="modal">False</property>
-			  <property name="do_preview">False</property>
-			  <property name="use_filechooser">False</property>
+			<widget class="GtkFileChooserButton" id="pentry_image_location">
+			  <property name="title" translatable="yes">Select A File</property>
+			  <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+			  <property name="local_only">False</property>
+			  <property name="show_hidden">False</property>
+			  <property name="do_overwrite_confirmation">False</property>
+			  <property name="width_chars">-1</property>
+			  
+			  <child>
+			    <widget class="GtkFileChooserButton" id="entry4">
+			      <property name="title" translatable="yes">Select A File</property>
+			      <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+			      <property name="local_only">False</property>
+			      <property name="show_hidden">False</property>
+			      <property name="do_overwrite_confirmation">False</property>
+			      <property name="width_chars">-1</property>
 
-			  <child internal-child="entry">
-			    <widget class="GtkEntry" id="entry9">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="editable">True</property>
-			      <property name="visibility">True</property>
-			      <property name="max_length">0</property>
-			      <property name="text" translatable="yes"></property>
-			      <property name="has_frame">True</property>
-			      <property name="invisible_char" translatable="yes">*</property>
-			      <property name="activates_default">False</property>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GnomeFileEntry" id="entry4">
-			      <property name="visible">True</property>
-			      <property name="history_id">insert_image</property>
-			      <property name="max_saved">10</property>
-			      <property name="directory_entry">False</property>
-			      <property name="modal">False</property>
-			      <property name="use_filechooser">False</property>
-
-			      <child internal-child="entry">
-				<widget class="GtkEntry" id="entry_image_location">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="editable">True</property>
-				  <property name="visibility">True</property>
-				  <property name="max_length">0</property>
-				  <property name="text" translatable="yes"></property>
-				  <property name="has_frame">True</property>
-				  <property name="invisible_char" translatable="yes">*</property>
-				  <property name="activates_default">False</property>
-				</widget>
-			      </child>
 			    </widget>
 			  </child>
 			</widget>
@@ -4068,49 +3990,24 @@
 			  </child>
 
 			  <child>
-			    <widget class="GnomePixmapEntry" id="pixmapentry2">
-			      <property name="visible">True</property>
-			      <property name="max_saved">10</property>
-			      <property name="modal">False</property>
-			      <property name="do_preview">False</property>
-			      <property name="use_filechooser">False</property>
-
-			      <child internal-child="entry">
-				<widget class="GtkEntry" id="entry10">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="editable">True</property>
-				  <property name="visibility">True</property>
-				  <property name="max_length">0</property>
-				  <property name="text" translatable="yes"></property>
-				  <property name="has_frame">True</property>
-				  <property name="invisible_char" translatable="yes">*</property>
-				  <property name="activates_default">False</property>
-				</widget>
-			      </child>
+			    <widget class="GtkFileChooserButton" id="pixmapentry2">
+			      <property name="title" translatable="yes">Select A File</property>
+			      <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+			      <property name="local_only">False</property>
+			      <property name="show_hidden">False</property>
+			      <property name="do_overwrite_confirmation">False</property>
+			      <property name="width_chars">-1</property>
 
 			      <child>
-				<widget class="GnomeFileEntry" id="entry6">
-				  <property name="visible">True</property>
-				  <property name="max_saved">10</property>
-				  <property name="directory_entry">False</property>
-				  <property name="modal">False</property>
-				  <property name="use_filechooser">False</property>
-
-				  <child internal-child="entry">
-				    <widget class="GtkEntry" id="combo-entry4">
-				      <property name="visible">True</property>
-				      <property name="can_focus">True</property>
-				      <property name="editable">True</property>
-				      <property name="visibility">True</property>
-				      <property name="max_length">0</property>
-				      <property name="text" translatable="yes"></property>
-				      <property name="has_frame">True</property>
-				      <property name="invisible_char" translatable="yes">*</property>
-				      <property name="activates_default">False</property>
-				    </widget>
-				  </child>
-				</widget>
+				<widget class="GtkFileChooserButton" id="entry6">
+				  <property name="title" translatable="yes">Select A File</property>
+				  <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+				  <property name="local_only">False</property>
+				  <property name="show_hidden">False</property>
+				  <property name="do_overwrite_confirmation">False</property>
+				  <property name="width_chars">-1</property>
+			  
+			  	</widget>
 			      </child>
 			    </widget>
 			    <packing>
Index: components/html-editor/image.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/image.c,v
retrieving revision 1.64
diff -u -p -r1.64 image.c
--- components/html-editor/image.c	11 Sep 2005 04:04:18 -0000	1.64
+++ components/html-editor/image.c	21 Feb 2006 08:36:27 -0000
@@ -108,13 +108,11 @@ get_location (GtkHTMLEditImageProperties
 	gchar *file;
 	gchar *url;
 
-	file = gnome_pixmap_entry_get_filename (GNOME_PIXMAP_ENTRY (d->pentry));
+	file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (d->pentry));
 	if (file) {
 		url = gtk_html_filename_to_uri (file);
 	} else {
-		GtkWidget *entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->pentry));
-
-		url = gtk_html_filename_to_uri (gtk_entry_get_text (GTK_ENTRY (entry)));
+		url = gtk_html_filename_to_uri (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (d->pentry)));
 	}
 
 	if (!url)
@@ -283,7 +281,7 @@ image_set_ui (GtkHTMLEditImageProperties
 			if (ip->url) {
 				gchar *filename = gtk_html_filename_from_uri (ip->url);
 				
-				gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->pentry))), filename);
+				gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (d->pentry), filename);
 				g_free (filename);
 			}
 		}
@@ -391,12 +389,12 @@ image_widget (GtkHTMLEditImageProperties
 	g_signal_connect (d->entry_alt, "changed", G_CALLBACK (alt_changed), d);
 
 	d->pentry = glade_xml_get_widget (xml, "pentry_image_location");
-	gnome_pixmap_entry_set_pixmap_subdir (GNOME_PIXMAP_ENTRY (d->pentry), g_get_home_dir ());
-	g_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->pentry))),
-			    "changed", G_CALLBACK (pentry_changed), d);
+	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (d->pentry), g_get_home_dir ());
+	g_signal_connect (GTK_OBJECT (GTK_FILE_CHOOSER_BUTTON (d->pentry)),
+			    "selection-changed", G_CALLBACK (pentry_changed), d);
 
 	gtk_widget_show_all (d->page);
-	gnome_pixmap_entry_set_preview (GNOME_PIXMAP_ENTRY (d->pentry), FALSE);
+	gtk_file_chooser_set_preview_active (GTK_FILE_CHOOSER (d->pentry), FALSE);
 
 	editor_check_stock ();
 	button = gtk_button_new_from_stock (GTKHTML_STOCK_TEST_URL);
Index: components/html-editor/table.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/table.c,v
retrieving revision 1.54
diff -u -p -r1.54 table.c
--- components/html-editor/table.c	11 Sep 2005 04:32:56 -0000	1.54
+++ components/html-editor/table.c	21 Feb 2006 08:36:27 -0000
@@ -246,8 +246,8 @@ table_widget (GtkHTMLEditTableProperties
 	gtk_box_pack_start (GTK_BOX (glade_xml_get_widget (xml, "bg_color_hbox")), d->combo_bg_color, FALSE, FALSE, 0);
 
 	d->entry_bg_pixmap = glade_xml_get_widget (xml, "entry_table_bg_pixmap");
-	g_signal_connect (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->entry_bg_pixmap)),
-			  "changed", G_CALLBACK (changed_bg_pixmap), d);
+	g_signal_connect (GTK_FILE_CHOOSER_BUTTON (d->entry_bg_pixmap),
+			  "selection-changed", G_CALLBACK (changed_bg_pixmap), d);
 
 	d->spin_spacing = glade_xml_get_widget (xml, "spin_spacing");
 	g_signal_connect (d->spin_spacing, "value_changed", G_CALLBACK (changed_spacing), d);
@@ -280,7 +280,7 @@ table_widget (GtkHTMLEditTableProperties
 	UPPER_FIX (rows);
 
 	gtk_widget_show_all (table_page);
-	gnome_pixmap_entry_set_preview (GNOME_PIXMAP_ENTRY (d->entry_bg_pixmap), FALSE);
+	gtk_file_chooser_set_preview_widget_active (GTK_FILE_CHOOSER (d->entry_bg_pixmap), FALSE);
 
 	return table_page;
 }
@@ -301,7 +301,7 @@ set_ui (GtkHTMLEditTableProperties *d)
 		if (d->table->bgPixmap) {
 			gchar *filename = gtk_html_filename_from_uri (d->table->bgPixmap->url);
 
-			gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (d->entry_bg_pixmap))),
+			gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (d->entry_bg_pixmap),
 					    filename);
 			g_free (filename);
 		}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]