Re: GTKFileSelection
- From: Brian Thomason <brian thomason linspireinc com>
- To: muppet <scott asofyet org>
- Cc: gtk-devel-list gnome org
- Subject: Re: GTKFileSelection
- Date: Fri, 17 Sep 2004 17:04:23 -0700
GtkFileSelection uses the current directory at the time of the widget
creation. In the private function cmpl_init_state() the filesel's
internal completion state is initialized by calling
get_current_dir_utf8().
Worked like a charm on this one. I am currently having it check for the
existence of ~/.gtk-bookmarks, and use the first bookmark as the default
location to begin completion from. Would be nice if you guys started
doing that :-)
The filesel's current directory will also be changed after creation if
you call gtk_file_selection_set_filename() with a filename that
includes a directory path component. The docs for
gtk_file_selection_set_filename() say:
I'd also like to change the default behavior of GTKFileChooser as
well, which defaults to the Home directory.
the default implementation (gtkfilechooserdefault.c) has an internal
variable named current_folder. i bet if you put a watch on that in
gdb you can find where it gets set.
I'm having a hell of a time trying to work this one out the same way
though. I tried changing it when the bookmarks are being read, but this
has the unfortunate side effect of setting each and every time the user
opens another gtkfilechooser. I just want it to set it on the initial
construction of the widget.
It looks as if that's what you can do in gtk/gtkfilechooserwidget.c when
current_folder is assigned the value of the current directory, but
changing it there had no effect at all.
I don't have much experience with GDB so my attempts to setup a
watchpoint/breakpoint didn't work, or I would have used that approach as
well.
Thanks for your help thus far.
-Brian
--
I bring the rock, and provided it is fiscally responsible, I will
bring the funk as well. And that's fo-shizzle.
-- Saturday Night Live
--
This message contains information which may be confidential and privileged. Unless you are the
addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone
the message or any information contained in the message. If you have received the message in error,
please advise the sender and delete the message. Thank you.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]