GNOME Bugzilla – Bug 695902
Mouse test area as a proper widget
Last modified: 2013-05-24 13:22:49 UTC
Created attachment 238968 [details] [review] mouse test area as a proper widget There is a patch making a proper widget from mouse test area to avoid using global variables. It was discussed in Bug 693803.
Created attachment 240017 [details] [review] mouse preferences as a proper widget Same changes also for mouse preferences.
Review of attachment 238968 [details] [review]: A few fixes needed. ::: panels/mouse/gnome-mouse-test.c @@ +189,3 @@ { + gint double_click_time; + static guint32 double_click_timestamp = 0; A static isn't helping remove global variables ;) @@ +239,3 @@ static gboolean +button_drawing_area_draw_event (GtkWidget *widget, + cairo_t *cr, Please align those. @@ +323,3 @@ + + if (d->mouse_settings != NULL) { + g_object_unref (d->mouse_settings); Use g_clear_object(). @@ +366,3 @@ + "/org/gnome/control-center/mouse/gnome-mouse-test.ui", + &error); + if (error != NULL) { You can remove the NULL checks, they shouldn't happen.
Review of attachment 240017 [details] [review]: Looks good to commit after those few changes. ::: panels/mouse/gnome-mouse-properties.c @@ +285,3 @@ + + if (d->mouse_settings != NULL) { + g_object_unref (d->mouse_settings); g_clear_object(). @@ +289,3 @@ + } + if (d->touchpad_settings != NULL) { + g_object_unref (d->touchpad_settings); g_clear_object(). @@ +324,3 @@ + "/org/gnome/control-center/mouse/gnome-mouse-properties.ui", + &error); + if (error != NULL) { As per other patch, feel free to remove this.
Thank you for reviews. (In reply to comment #2) > Review of attachment 238968 [details] [review]: > @@ +239,3 @@ > static gboolean > +button_drawing_area_draw_event (GtkWidget *widget, > + cairo_t *cr, There is mode line in header with tab-width 8, so it is aligned accordingly.
Created attachment 245214 [details] [review] mouse test area as a proper widget
Created attachment 245215 [details] [review] mouse preferences as a proper widget
Review of attachment 245215 [details] [review]: Looks good.
Review of attachment 245214 [details] [review]: Looks good.