Re: [evolution-patches] Patch for #ifdef'ed GtkFileChooser support




i suppose the mail bit looks ok.

i'm really not looking forward to this, as this is the only gnome app i use, and this is a really awful change for the worse.

On Fri, 2004-07-23 at 00:21 +0200, Carlos Garnacho wrote:
On Thu, 2004-07-22 at 10:04 +0800, Not Zed wrote:
> 
> This seems to change an awful lot of unrelated logic.  And also
> unecessarily changes a lot of widget types to the more specific type
> for no reason whatsoever, since it still has the stupid glib casts
> anyway.
> 
> Any reason for this?

make_safe_filename() in addressbook/gui/widgets/eab-gui-util.c returned
the whole path to the file, which was OK with the GtkFileSelection API,
but with GtkFileChooser we must use gtk_file_chooser_set_current_folder
() and gtk_file_chooser_set_current_name(), so I made it to return only
the filename for being more suitable for both widgets.

e_msg_composer_select_file() in composer/e-msg-composer-select-file.[ch]
is used both for selecting a file and for saving to a file, so I had to
pass it a save_mode parameter to show the correct GtkFileChooserDialog.
composer/e-msg-composer.c uses that function, so I had to change it too.

Regarding to the use of more specific widget types, I don't understand,
I've changed the GtkFileSelection widgets to GtkWidget (and it's more
generic) for reusing this variable in both modes.

I'm attaching a improved patch:

- adds the "use_filechooser" property to all the GnomeFileEntries (for
those which are in glade files, I've added the property directly in the
glade file, if the gtk version is < 2.4.0, libglade will only warn
through console, is that fine for you?)

- fixes a couple of wrong/unused casts

	Please, let me know if there are still issues

		Carlos

> 
> On Wed, 2004-07-21 at 11:19 +0200, Carlos Garnacho wrote: 
> > Hi,
> > 
> > I've attached a patch for using GtkFileChooser if the Gtk+ version that
> > evo has been compiled against is >= 2.4.0, if not, it will use
> > GtkFileSelection. Seems OK to you?
> > 
> >         Carlos
> > 
> -- 
> 
> Michael Zucchi <notzed ximian com>
> "born to die, live to work, it's
> all downhill from here"
> Novell's Evolution and Free
> Software Developer
--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer


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