GNOME Bugzilla – Bug 128692
gok should use the new gtk+ 2.3 file chooser
Last modified: 2004-12-22 21:47:04 UTC
gok should use the new GtkFileChooser because it supports for example file filtering.
Created attachment 22159 [details] [review] This patch replaces GtkFileSelection with GtkFileChooser.
Jan, Thanks for the patch! It looks good except I wonder about your modification: - if (response == GTK_RESPONSE_CANCEL) + if (response != GTK_RESPONSE_OK) I don't think that is appropriate -- could you comment?
If you close the dialog with Alt+F4, Esc or the close button (in the frame), gtk_dialog_run returns GTK_RESPONSE_DELETE_EVENT. In my opinion this case should be handled like a click on the "Cancel" Button (GTK_RESPONSE_CANCEL). So this line should be if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT) or (because there are only 3 possible responses) if (response != GTK_RESPONSE_OK)
I wonder which is safer? Can you choose one and apply? Thanks!
I don't have a cvs account yet. Can you please commit it. At the moment both solutions are equivalent. So you can choose which you like most.
Bill, I'll go ahead and commit this okay? Is it alright to make gtk+ 2.3 a new gok req? gtk+-2.0 >= 2.3.0 \
no please don't commit this patch now! gtk+ 2.3 totally breaks GOK at the moment, we should not depend on 2.3 until the gtk+ problems are fixed.
marking dependency on 126727 since this prevents adding a gtk+-2.3 dependency (practical reasons). We'd like GOK-HEAD to remain more-or-less operational.
Adding the PATCH keyword so that these show up. Thanks a lot, jpetersen.
Jan - I second Luis' thanks (and David's!) It's a good patch, which we should IMO apply as soon as we get the gtk+ issue fixed up. Alternatively we could apply to HEAD and leave the gnome_2_4 branch as-is, but some users will probably want the newer GOK features (lots has been added since 2.4).
OK to commit this patch now, Jan, since 126727 is fixed. Thanks!
Note that the line: gtk_window_set_default_size (GTK_WINDOW (fchooser), 600, 400); should be removed. See comments in bug #128636.
thanks Vincent. BTW, the fileselector looks really bad without the set_default_size call; it requires hand-resizing. That's bad for GOK. So for the moment I am putting the set_default_size calls back (I had removed them from the patch) until we can fix the gtk+ issue. And thanks again Jan!
gtk_ file chooser bug is 129020, by the way.
adding 129020 as a dependency, even though this bug is fixed, so that this bugzilla report will get updates when 129020 is fixed (so we can remove the hard-coding of the chooser size in gok-page-feedbacks.c).
Bug #129020 got fixed, by the way.