From 19a24512ebf7a7a061973bd76a34effa2452f89d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Fri, 29 Mar 2013 14:47:53 +0000 Subject: [PATCH] disabled left click on the color cell (did not find how to disable the row moving when clicking on the color col) --- src/ui_sensorlist.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ui_sensorlist.c b/src/ui_sensorlist.c index 033c96a..4f45c07 100644 --- a/src/ui_sensorlist.c +++ b/src/ui_sensorlist.c @@ -226,6 +226,9 @@ static int on_clicked(GtkWidget *widget, GdkEventButton *event, gpointer data) struct ui_psensor *ui = (struct ui_psensor *)data; GtkTreeView *view = ui->ui_sensorlist->treeview; + if (event->button != 3) + return FALSE; + struct psensor *sensor = get_sensor_at_pos(view, event->x, event->y, @@ -242,8 +245,7 @@ static int on_clicked(GtkWidget *widget, GdkEventButton *event, gpointer data) config_set_sensor_color(sensor->id, sensor->color); } - } else if (coli >= 0 && coli != COL_ENABLED - && event->button == 3) { + } else if (coli >= 0 && coli != COL_ENABLED) { menu = create_sensor_popup(ui, sensor); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, @@ -252,7 +254,7 @@ static int on_clicked(GtkWidget *widget, GdkEventButton *event, gpointer data) } } - return FALSE; + return TRUE; } static void -- 2.7.4