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 526834 - Port gnome-screenshot to GIO + code cleanup
Port gnome-screenshot to GIO + code cleanup
Status: RESOLVED FIXED
Product: gnome-utils
Classification: Deprecated
Component: screenshot
trunk
Other Linux
: Normal normal
: ---
Assigned To: Jonathan Blandford
gnome-utils Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-07 22:39 UTC by Cosimo Cecchi
Modified: 2008-07-22 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gio port (70.91 KB, patch)
2008-04-07 22:39 UTC, Cosimo Cecchi
none Details | Review
add headers (7.31 KB, patch)
2008-04-07 22:39 UTC, Cosimo Cecchi
none Details | Review
gio port + headers v2 (75.90 KB, patch)
2008-07-22 13:13 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2008-04-07 22:39:03 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).
Comment 1 Cosimo Cecchi 2008-04-07 22:39:35 UTC
Created attachment 108822 [details] [review]
gio port
Comment 2 Cosimo Cecchi 2008-04-07 22:39:56 UTC
Created attachment 108823 [details] [review]
add headers
Comment 3 Emmanuele Bassi (:ebassi) 2008-05-10 19:24:11 UTC
I just tested the patch with gnome-utils trunk and it doesn't seem to work: no save dialog is opened.
Comment 4 André Klapper 2008-06-22 16:53:38 UTC
Cosimo, can you rework that patch? (Hmm, you probably don't have time)
Comment 5 Cosimo Cecchi 2008-06-22 17:01:59 UTC
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.
Comment 6 André Klapper 2008-07-14 12:38:56 UTC
<ebassi> if I get two confirmations, I'll apply it to trunk
<metalgod> ebassi: i'll do some tests on that patch 
Comment 7 Luis Medinas 2008-07-14 23:59:24 UTC
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.
Comment 8 Cosimo Cecchi 2008-07-22 13:13:46 UTC
Created attachment 115005 [details] [review]
gio port + headers v2

Patch updated to trunk.
Comment 9 Emmanuele Bassi (:ebassi) 2008-07-22 13:29:17 UTC
looks good, please commit to trunk.
Comment 10 Cosimo Cecchi 2008-07-22 15:01:53 UTC
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).
Comment 11 André Klapper 2008-07-22 15:34:12 UTC
Cool. I have updated http://live.gnome.org/GioPort accordingly.

Now if we can also get bug 542971 in? ;-)