Don't spam gtk_widget_add_events() against GtkEventBox: it already has events in...
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Fri, 5 Dec 2014 22:07:33 +0000 (00:07 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Fri, 5 Dec 2014 22:07:33 +0000 (00:07 +0200)
plugins/kbled/kbled.c
plugins/netstat/statusicon.c
plugins/separator.c
plugins/space.c
plugins/volume/volume.c
plugins/volumealsa/volumealsa.c
plugins/xkb/xkb-plugin.c

index 9caab60..34165e0 100644 (file)
@@ -129,7 +129,6 @@ static GtkWidget *kbled_constructor(LXPanel *panel, config_setting_t *settings)
                             panel_get_icon_size(panel),
                             0, 0, panel_get_height(panel));
     lxpanel_plugin_set_data(p, kl, kbled_destructor);
-    gtk_widget_add_events(p, GDK_BUTTON_PRESS_MASK);
 
     /* Then allocate three images for the three indications, but make them visible only when the configuration requests. */
     for (i = 0; i < 3; i++)
index d2047ef..0b4fa31 100644 (file)
@@ -34,7 +34,6 @@ struct statusicon *create_statusicon(LXPanel *panel, GtkWidget *box,
     newicon->main = gtk_event_box_new();
 
     gtk_widget_set_has_window(newicon->main, FALSE);
-    gtk_widget_add_events(newicon->main, GDK_BUTTON_PRESS_MASK);
     //gtk_widget_set_size_request(newicon->main, 24, 24);
     gtk_box_pack_start(GTK_BOX(box), newicon->main, TRUE, TRUE, 0);
 
index 24bc4f3..0a7b792 100644 (file)
@@ -28,7 +28,6 @@ static GtkWidget *separator_constructor(LXPanel *panel, config_setting_t *settin
     /* Allocate top level widget and set into Plugin widget pointer. */
     instance = gtk_event_box_new();
     gtk_widget_set_has_window(instance, FALSE);
-    gtk_widget_add_events(instance, GDK_BUTTON_PRESS_MASK);
 
     /* Allocate separator as a child of top level. */
     sep = panel_separator_new(panel);
index 2b84196..0202759 100644 (file)
@@ -53,7 +53,6 @@ static GtkWidget *space_constructor(LXPanel *panel, config_setting_t *settings)
     p = gtk_event_box_new();
     lxpanel_plugin_set_data(p, sp, g_free);
     gtk_widget_set_has_window(p,FALSE);
-    gtk_widget_add_events(p, GDK_BUTTON_PRESS_MASK);
 
     /* Apply the configuration and show the widget. */
     space_apply_configuration(p);
index b45e60c..9a2f51e 100644 (file)
@@ -266,7 +266,6 @@ _error:
     lxpanel_plugin_set_data(p, vol, volume_destructor);
     vol->panel = panel;
 
-    gtk_widget_add_events(p, GDK_BUTTON_PRESS_MASK);
     g_signal_connect(p, "scroll-event", G_CALLBACK(on_mouse_scroll), vol);
     gtk_widget_set_size_request(p, panel_get_icon_size(panel), panel_get_icon_size(panel));
 
index 12a2412..8bbce30 100644 (file)
@@ -652,7 +652,6 @@ static GtkWidget *volumealsa_constructor(LXPanel *panel, config_setting_t *setti
     vol->plugin = p = gtk_event_box_new();
     vol->settings = settings;
     lxpanel_plugin_set_data(p, vol, volumealsa_destructor);
-    gtk_widget_add_events(p, GDK_BUTTON_PRESS_MASK);
     gtk_widget_set_tooltip_text(p, _("Volume control"));
 
     /* Allocate icon as a child of top level. */
index b796124..c109c69 100644 (file)
@@ -262,7 +262,6 @@ static GtkWidget *xkb_constructor(LXPanel *panel, config_setting_t *settings)
     /* Allocate top level widget and set into Plugin widget pointer. */
     p_xkb->p_plugin = p = gtk_event_box_new();
     lxpanel_plugin_set_data(p, p_xkb, xkb_destructor);
-    gtk_widget_add_events(p, GDK_BUTTON_PRESS_MASK);
 
     /* Create a horizontal box as the child of the button. */
     GtkWidget * hbox = gtk_hbox_new(FALSE, 0);