GNOME Bugzilla – Bug 526834
Port gnome-screenshot to GIO + code cleanup
Last modified: 2008-07-22 15:34:12 UTC
Hi, attached patch ports gnome-screenshot to GIO. I almost completely rewrote screenshot-xfer.c and some parts of gnome-screenshot.c to be async and work well for remote locations. I also removed some misc cruft I found around and replaced the gnome-egg-xfer-dialog we were using before with a *very* simple transfer dialog, to which i plan to give some more love (if needed) after merging this, before 2.24. Finally I made a (separate) patch to add GPL headers to all the files (previously only some had the headers).
Created attachment 108822 [details] [review] gio port
Created attachment 108823 [details] [review] add headers
I just tested the patch with gnome-utils trunk and it doesn't seem to work: no save dialog is opened.
Cosimo, can you rework that patch? (Hmm, you probably don't have time)
Andre, the patch has always worked here and still applies to trunk. I talked to ebassi on IRC some days ago about this and I think this will be merged into trunk in time for 2.24.
<ebassi> if I get two confirmations, I'll apply it to trunk <metalgod> ebassi: i'll do some tests on that patch
Emmanuele and Cosimo I tested the patch and the first one just needs to remove the configure.in part which is on the current svn trunk. The save dialog in gnome-screenshot is working. So i think this patch can have a go.
Created attachment 115005 [details] [review] gio port + headers v2 Patch updated to trunk.
looks good, please commit to trunk.
Committed to trunk. 2008-07-22 Cosimo Cecchi <cosimoc@gnome.org> * Makefile.am: * gnome-screenshot.c: (error_dialog_response_cb), (save_callback), (try_to_save), (screenshot_dialog_response_cb), (run_dialog), (finish_prepare_screenshot), (check_file_done), (build_uri), (try_check_file), (prepare_screenshot), (prepare_screenshot_timeout), (expand_initial_tilde), (load_options), (screenshooter_init_stock_icons), (main): * screenshot-dialog.c: (screenshot_dialog_new), (screenshot_dialog_focus_entry), (screenshot_dialog_get_uri): * screenshot-dialog.h: * screenshot-save.c: (screenshot_sanitize_filename): * screenshot-shadow.c: * screenshot-shadow.h: * screenshot-xfer.c: (do_run_overwrite_confirm_dialog), (transfer_dialog_response_cb), (transfer_progress_dialog_new), (transfer_progress_dialog_start), (run_overwrite_confirm_dialog), (transfer_progress_dialog_update), (transfer_job_done), (transfer_progress_cb), (get_file_size), (transfer_file), (screenshot_xfer_uri): * screenshot-xfer.h: Port gnome-screenshot to GIO, clean up some code and add licence headers (#526834).
Cool. I have updated http://live.gnome.org/GioPort accordingly. Now if we can also get bug 542971 in? ;-)