GNOME Bugzilla – Bug 668610
Should show calibration success
Last modified: 2012-07-16 16:25:30 UTC
> - calibration seems to complete fine, but doesn't give any indication > whether it actually succeeded or did anything at all. Maybe we should > put a "Last calibration: " label next to the calibrate button (and maybe > change it to "Just now" and make it green right after the calibration?)
I would prefer to avoid using the panel for this. Let's just show a checkmark at the end of the process. I've mocked up something fancy, but a static symbol will do. http://jimmac.fedorapeople.org/gnome3/tablet-calibration-ok.webm
Created attachment 218082 [details] [review] Proposed patch Proposed patch to show a large green tick for 0.5 second when calibration is successful. Screencast here: http://people.redhat.com/ofourdan/gnome3/show-calibration-success-bug-669610.webm
Created attachment 218687 [details] [review] Updated patch Updated patch: - Do not use a new gtk_main() loop but gtk_main_iteration(); as gtk+ itself does (in GtkWidget's gtk_widget_show_now()) - While showing the final success tick, Don't handle signals that may cause reentrency on the finish() routine - Print the help lines and points when showing the final tick, to mimic the mock-up - Increase the showing time to 750ms (not really sure what correct value would be, 0.5s seems too short, 1sec definitely too long...)
Created attachment 218688 [details] [review] Updated patch
Review of attachment 218688 [details] [review]: ::: panels/wacom/calibrator/gui_gtk.c @@ +504,3 @@ + g_timeout_add(END_TIME, (GSourceFunc) draw_success_end_wait_callback , &flag); + while (!flag) + gtk_main_iteration (); Do not use gtk_main_iteration().
(In reply to comment #5) > Review of attachment 218688 [details] [review]: > Do not use gtk_main_iteration(). I don't know what else to use. We want the tick to be shown for a short period of time once the whole calibration process is completed, sleeping in the calib_area_finish() function is not suitable and we want gtk events to be processed. What would you suggest?
g_timeout_add() and hide the window then. If you want to be sure that the arrow is shown for a certain time, queue a redraw, and schedule the timeout once you've drawn the arrow.
Yes that would work unless the program calls gtk_main_quit() from the finish callback. That's what the test-calibrator does, so without that forced iteration loop the tick does not show in the test-calibrator program. But I guess we don't really care about the test-calibrator anyway so it's safe to avoid that pause.
(In reply to comment #8) > Yes that would work unless the program calls gtk_main_quit() from the finish > callback. That needs to be fixed then. > That's what the test-calibrator does, so without that forced iteration loop the > tick does not show in the test-calibrator program. > > But I guess we don't really care about the test-calibrator anyway so it's safe > to avoid that pause.
Created attachment 218699 [details] Screenshot of a successful calibration
Patch will be reworked to: - Use a symbolic icon instead of a tick character (as asked by jimmac) - Icon to use is emblem-ok-symbolic from gnome-icon-theme-symbolic master - Hide other information while the check-mark is shown (as asked by jimmac) - integrate the success notification in the finish callback mechanism so that gtk_main_iteration() is avoided
Created attachment 218897 [details] [review] Updated patch Updated patch as per comment #11
Created attachment 218898 [details] Screenshot of a successful calibration
Review of attachment 218897 [details] [review]: Sorry that patch is broken, the timeout never ends. I shall post a new one shortly.
(In reply to comment #8) > Yes that would work unless the program calls gtk_main_quit() from the finish > callback. > > That's what the test-calibrator does, so without that forced iteration loop the > tick does not show in the test-calibrator program. > > But I guess we don't really care about the test-calibrator anyway so it's safe > to avoid that pause. We actually care enough about the test-calibrator as it's the only way to see the calibrator UI without the hardware. When I use it, I see the symbolic checkmark being drawn on top of the timeout circle during the whole calibration. Please make sure both the embedded calibrator and the stand-alone one work.
Created attachment 218903 [details] [review] Updated patch Patch implementation as per comment #11 (In reply to comment #15) > We actually care enough about the test-calibrator as it's the only way to see > the calibrator UI without the hardware. When I use it, I see the symbolic > checkmark being drawn on top of the timeout circle during the whole > calibration. Please make sure both the embedded calibrator and the stand-alone > one work. The test-calibrator works just fine here with this patch, not sure which version (of the patch) you tried.
Created attachment 218919 [details] Screenshot of a successful calibration Updated screenshot
Created attachment 218920 [details] [review] Updated patch Updated patch to load the symbolic icon only when needed and use the new gtk_icon API gtk_icon_info_load_symbolic() to render the icon with the appropriate white color which matches the mockup from jimmac.
Created attachment 218921 [details] [review] Updated patch Calibration can be successful even if we fail to load the icon to show success. Update patch, sorry for the noise...
Created attachment 218922 [details] [review] Updated patch
Review of attachment 218922 [details] [review]: Looks good.