After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 128692 - gok should use the new gtk+ 2.3 file chooser
gok should use the new gtk+ 2.3 file chooser
Status: RESOLVED FIXED
Product: gok
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: David Bolter
David Bolter
Depends on: 126727 129020
Blocks:
 
 
Reported: 2003-12-06 19:31 UTC by Jan Arne Petersen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch replaces GtkFileSelection with GtkFileChooser. (8.24 KB, patch)
2003-12-06 19:32 UTC, Jan Arne Petersen
none Details | Review

Description Jan Arne Petersen 2003-12-06 19:31:56 UTC
gok should use the new GtkFileChooser because it supports for example file
filtering.
Comment 1 Jan Arne Petersen 2003-12-06 19:32:29 UTC
Created attachment 22159 [details] [review]
This patch replaces GtkFileSelection with GtkFileChooser.
Comment 2 David Bolter 2003-12-07 01:20:52 UTC
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?
Comment 3 Jan Arne Petersen 2003-12-07 12:39:20 UTC
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)
Comment 4 David Bolter 2003-12-08 00:14:50 UTC
I wonder which is safer?  Can you choose one and apply?  Thanks!
Comment 5 Jan Arne Petersen 2003-12-08 00:32:44 UTC
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.
Comment 6 David Bolter 2003-12-08 15:13:09 UTC
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       \
Comment 7 bill.haneman 2003-12-08 17:09:11 UTC
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.
Comment 8 bill.haneman 2003-12-08 17:16:05 UTC
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.
Comment 9 Luis Villa 2003-12-09 04:36:45 UTC
Adding the PATCH keyword so that these show up. Thanks a lot, jpetersen.
Comment 10 bill.haneman 2003-12-09 16:15:07 UTC
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).
Comment 11 bill.haneman 2003-12-11 11:04:55 UTC
OK to commit this patch now, Jan, since 126727 is fixed.

Thanks!
Comment 12 Vincent Untz 2003-12-11 19:44:11 UTC
Note that the line:
gtk_window_set_default_size (GTK_WINDOW (fchooser), 600, 400);
should be removed. See comments in bug #128636.
Comment 13 bill.haneman 2003-12-11 19:53:25 UTC
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!
Comment 14 bill.haneman 2003-12-11 20:08:23 UTC
gtk_ file chooser bug is 129020, by the way.
Comment 15 bill.haneman 2003-12-11 20:11:55 UTC
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).
Comment 16 Federico Mena Quintero 2004-02-14 01:28:51 UTC
Bug #129020 got fixed, by the way.