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 693803 - Click state initialization in mouse test area
Click state initialization in mouse test area
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Mouse
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-14 14:58 UTC by Ondrej Holy
Modified: 2013-02-22 14:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initialize click state (905 bytes, patch)
2013-02-14 14:58 UTC, Ondrej Holy
reviewed Details | Review
initialize click state (890 bytes, patch)
2013-02-15 13:39 UTC, Ondrej Holy
committed Details | Review

Description Ondrej Holy 2013-02-14 14:58:58 UTC
Created attachment 236071 [details] [review]
initialize click state

Mouse test area is in a bad state and causes critical error after reopening when it has been closed in clicked state.
Comment 1 Bastien Nocera 2013-02-14 15:28:05 UTC
Review of attachment 236071 [details] [review]:

::: panels/mouse/gnome-mouse-test.c
@@ +335,3 @@
 	gtk_widget_override_background_color (WID ("button_drawing_area"), GTK_STATE_FLAG_NORMAL, &color);
+
+	double_click_state = DOUBLE_CLICK_TEST_OFF;

What about button_state?

I would personally set it in gnome_mouse_test_init() and reset it in _dispose(). Or better, start making all this into a proper widget with private variables in a struct, instead of using semi-global variables.
Comment 2 Ondrej Holy 2013-02-15 13:39:42 UTC
Created attachment 236244 [details] [review]
initialize click state

Move initialization into gnome_mouse_test_init and initialize button_state also.
Comment 3 Ondrej Holy 2013-02-15 13:41:39 UTC
(In reply to comment #1)
> Review of attachment 236071 [details] [review]:
> 
> I would personally set it in gnome_mouse_test_init() and reset it in
> _dispose(). Or better, start making all this into a proper widget with private
> variables in a struct, instead of using semi-global variables.

It'll be nice to fix the bug firstly, I can make all panel as proper widget later.
Comment 4 Bastien Nocera 2013-02-15 13:43:02 UTC
Review of attachment 236244 [details] [review]:

Looks good.