http://code.google.com/p/tint2/issues/detail?id=430 Submitted By: David B. Cortarello (Nomius) Date: 18-05-2013 Initial Package Version: subversion trunk (revision 652) Description: Implemented middle click mouse button in the clock to execute tasks. * Implemented middle click mouse button over the clock by accepting the button 2 in the clock_action. * A new configuration parameter was created called clock_mclick_command, which works in the same way * clock_lclick_command and clock_rclick_command does. Index: trunk/src/clock/clock.c =================================================================== --- trunk/src/clock/clock.c (revision 652) +++ trunk/src/clock/clock.c (working copy) @@ -39,6 +41,7 @@ char *time_tooltip_format; char *time_tooltip_timezone; char *clock_lclick_command; +char *clock_mclick_command; char *clock_rclick_command; struct timeval time_clock; PangoFontDescription *time1_font_desc; @@ -61,6 +64,7 @@ time_tooltip_format = 0; time_tooltip_timezone = 0; clock_lclick_command = 0; + clock_mclick_command = 0; clock_rclick_command = 0; time1_font_desc = 0; time2_font_desc = 0; @@ -77,6 +81,7 @@ if (time2_timezone) g_free(time2_timezone); if (time_tooltip_timezone) g_free(time_tooltip_timezone); if (clock_lclick_command) g_free(clock_lclick_command); + if (clock_mclick_command) g_free(clock_mclick_command); if (clock_rclick_command) g_free(clock_rclick_command); if (clock_timeout) stop_timeout(clock_timeout); } @@ -254,6 +263,9 @@ case 1: command = clock_lclick_command; break; + case 2: + command = clock_mclick_command; + break; case 3: command = clock_rclick_command; break; Index: trunk/src/clock/clock.h =================================================================== --- trunk/src/clock/clock.h (revision 652) +++ trunk/src/clock/clock.h (working copy) @@ -33,6 +33,7 @@ extern PangoFontDescription *time1_font_desc; extern PangoFontDescription *time2_font_desc; extern char *clock_lclick_command; +extern char *clock_mclick_command; extern char *clock_rclick_command; extern int clock_enabled; Index: trunk/src/config.c =================================================================== --- trunk/src/config.c (revision 652) +++ trunk/src/config.c (working copy) @@ -396,6 +396,10 @@ if (strlen(value) > 0) clock_lclick_command = strdup(value); } + else if (strcmp(key, "clock_mclick_command") == 0) { + if (strlen(value) > 0) + clock_mclick_command = strdup(value); + } else if (strcmp(key, "clock_rclick_command") == 0) { if (strlen(value) > 0) clock_rclick_command = strdup(value);