Hi All,
I have attached a patch that uses GtkFileChooserDialog instead of GtkFileSelection when you click browse in the export dialog.
I realize after reading the roadmap that the export dialog is due for an upgrade to gtkmm. However, I figured that it wouldn't hurt to have this in anyway until then.
Otherwise, thanks for a great piece of software.
On 3/28/06, Osei Poku <opoku@...1221...> wrote:
Hi All,
I have attached a patch that uses GtkFileChooserDialog instead of GtkFileSelection when you click browse in the export dialog.
Heh, just today someone on jabber complained about the old file selector in export :)
The patch works, but I don't like that it displays the dialog in folded form, and I need to click "Browse for other folders" to unfold it. I have just clicked "Browse" button, which means I want to browse, so why do I have to say it again?
So, can you change the patch so it produces the fialog fully open?
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org
On 06/03/29 at 00:56 -0400, bulia byak wrote:
On 3/28/06, Osei Poku <opoku@...1221...> wrote:
Hi All,
I have attached a patch that uses GtkFileChooserDialog instead of GtkFileSelection when you click browse in the export dialog.
Heh, just today someone on jabber complained about the old file selector in export :)
The patch works, but I don't like that it displays the dialog in folded form, and I need to click "Browse for other folders" to unfold it. I have just clicked "Browse" button, which means I want to browse, so why do I have to say it again?
So, can you change the patch so it produces the fialog fully open?
According to this link, that behaviour is not yet possible. Sorry :)
http://mail.gnome.org/archives/gtk-list/2005-August/msg00199.html
Osei Poku wrote:
So, can you change the patch so it produces the fialog fully open?
According to this link, that behaviour is not yet possible. Sorry :)
http://mail.gnome.org/archives/gtk-list/2005-August/msg00199.html
Hi, all,
Actually, if you look at the SaveAs dialog, you can see that the file browser is already expanded. As a workaround for the problem, we wrote this little bit of code at line 1193 in src/dialog/filedialog.cpp, which recursively descends into the private widget tree of the dialog to find the expander widgets:
void findExpanderWidgets(Gtk::Container *parent, std::vector<Gtk::Expander *> &result) { if (!parent) return; std::vector<Gtk::Widget *> children = parent->get_children(); for (unsigned int i=0; i<children.size() ; i++) { Gtk::Widget *child = children[i]; GtkWidget *wid = child->gobj(); if (GTK_IS_EXPANDER(wid)) result.push_back((Gtk::Expander *)child); else if (GTK_IS_CONTAINER(wid)) findExpanderWidgets((Gtk::Container *)child, result); }
}
Then this code in the constructor at line 1288 calls it. You notice that we're only looking for the first one, anyway. It then easily pops the silly thing open and everyone is happy. :-)
//Let's do more customization std::vector<Gtk::Expander *> expanders; findExpanderWidgets(cont, expanders); //g_message("Found %d expander widgets\n", expanders.size()); if (expanders.size() >=1 ) { //Always show the file list Gtk::Expander *expander = expanders[0]; expander->set_expanded(true); }
Obviously, the guys who wrote the new Gtk dialog want to change the way people use file dialogs. Little hacks like this can ease the transition for luddites like me. ^^
Hope this helps.
bob
Bob Jamison wrote:
bob
Oops. Never mind. You mean the FileChooserButton.
But, on the other hand, Wouldn't a FileChooser (not dialog) be a more consistent panel to have on that dialog? If people don't remember, the split between export and file dialogs comes from the legacy code of having native file dialogs, over which we had no control.
In fact, a FileChooserDialog has in its API the ability to add an "extra widget", which could easily be the contents of the existing export dialog. It would likely result in smaller and simpler code.
Just an idea...
bob
On 06/03/29 at 05:29 -0600, Bob Jamison wrote:
Bob Jamison wrote:
In fact, a FileChooserDialog has in its API the ability to add an "extra widget", which could easily be the contents of the existing export dialog. It would likely result in smaller and simpler code.
Just an idea...
I just heard that my patch has been commited.
I havent forgotten about this. Just been busy with other stuff. I wrote some code but there were problems with the layout that I didnt have time to debug and so I had to put it off until later.
I will get back to this soon :)
On 3/29/06, bulia byak wrote:
Heh, just today someone on jabber complained about the old file selector in export :)
The patch works, but I don't like that it displays the dialog in folded form, and I need to click "Browse for other folders" to unfold it. I have just clicked "Browse" button, which means I want to browse, so why do I have to say it again?
Hmmm, would it hurt having this dialog in folded form as integrated part of Export palette? Dialog over another one is generally not a great idea according to HIG (though Export As Bitmap is not a true dialog).
Alexandre
participants (4)
-
Alexandre Prokoudine
-
Bob Jamison
-
bulia byak
-
Osei Poku