[arch-commits] Commit in tint2/repos (12 files)

Bartłomiej Piotrowski bpiotrowski at nymeria.archlinux.org
Wed Sep 25 18:19:34 UTC 2013


    Date: Wednesday, September 25, 2013 @ 20:19:34
  Author: bpiotrowski
Revision: 97618

archrelease: copy trunk to community-i686, community-x86_64

Added:
  tint2/repos/community-i686/PKGBUILD
    (from rev 97617, tint2/trunk/PKGBUILD)
  tint2/repos/community-i686/add-power-now-support.patch
    (from rev 97617, tint2/trunk/add-power-now-support.patch)
  tint2/repos/community-i686/fix_defunct_processes.patch
    (from rev 97617, tint2/trunk/fix_defunct_processes.patch)
  tint2/repos/community-i686/middle_click_on_clock.patch
    (from rev 97617, tint2/trunk/middle_click_on_clock.patch)
  tint2/repos/community-x86_64/PKGBUILD
    (from rev 97617, tint2/trunk/PKGBUILD)
  tint2/repos/community-x86_64/add-power-now-support.patch
    (from rev 97617, tint2/trunk/add-power-now-support.patch)
  tint2/repos/community-x86_64/fix_defunct_processes.patch
    (from rev 97617, tint2/trunk/fix_defunct_processes.patch)
  tint2/repos/community-x86_64/middle_click_on_clock.patch
    (from rev 97617, tint2/trunk/middle_click_on_clock.patch)
Deleted:
  tint2/repos/community-i686/PKGBUILD
  tint2/repos/community-i686/add-power-now-support.patch
  tint2/repos/community-x86_64/PKGBUILD
  tint2/repos/community-x86_64/add-power-now-support.patch

----------------------------------------------+
 /PKGBUILD                                    |  100 +++++++++++++++++++++++++
 /add-power-now-support.patch                 |   38 +++++++++
 community-i686/PKGBUILD                      |   43 ----------
 community-i686/add-power-now-support.patch   |   19 ----
 community-i686/fix_defunct_processes.patch   |   31 +++++++
 community-i686/middle_click_on_clock.patch   |   75 ++++++++++++++++++
 community-x86_64/PKGBUILD                    |   43 ----------
 community-x86_64/add-power-now-support.patch |   19 ----
 community-x86_64/fix_defunct_processes.patch |   31 +++++++
 community-x86_64/middle_click_on_clock.patch |   75 ++++++++++++++++++
 10 files changed, 350 insertions(+), 124 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD	2013-09-25 18:19:17 UTC (rev 97617)
+++ community-i686/PKGBUILD	2013-09-25 18:19:34 UTC (rev 97618)
@@ -1,43 +0,0 @@
-# $Id$
-# Maintainer:  Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
-# Contributor: Blue Peppers <bluepeppers at archlinux.us>
-# Contributor: Stefan Husmann< stefan-husmann at t-online.de>
-
-pkgname=tint2
-pkgver=0.11
-pkgrel=5
-pkgdesc="A basic, good-looking task manager for WMs"
-arch=('i686' 'x86_64')
-url="http://code.google.com/p/tint2/"
-license=('GPL2')
-conflicts=('ttm-svn' 'tint')
-replaces=('tint')
-depends=('gtk2' 'imlib2')
-optdepends=('pygtk: for using tint2conf')
-makedepends=('pygtk' 'cmake')
-provides=('tint')
-source=("http://$pkgname.googlecode.com/files/$pkgname-${pkgver}.tar.bz2"
-        'add-power-now-support.patch')
-md5sums=('6fc5731e7425125fa84a2add5cef4bff'
-         '6cfcad028f1bd2f69812167f5395f890')
-
-build() {
-  cd "$srcdir/$pkgname-${pkgver}"
-
-  # add support for power_now battery attribute (fixes FS#21954)
-  patch -Np0 -i ../add-power-now-support.patch
-
-  # python2 fix
-  sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' src/tint2conf/tintwizard.py
-  sed -i 's_python _python2 _' src/tint2conf/main.c
-
-  [ -d build ] || mkdir build
-  cd build
-  cmake -DCMAKE_INSTALL_PREFIX=/usr ../
-  make 
-}
-
-package() {
-  cd "$srcdir/$pkgname-${pkgver}/build"
-  make DESTDIR="$pkgdir" install
-}

Copied: tint2/repos/community-i686/PKGBUILD (from rev 97617, tint2/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2013-09-25 18:19:34 UTC (rev 97618)
@@ -0,0 +1,50 @@
+# $Id$
+# Maintainer:  Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
+# Contributor: Blue Peppers <bluepeppers at archlinux.us>
+# Contributor: Stefan Husmann< stefan-husmann at t-online.de>
+
+pkgname=tint2
+pkgver=0.11
+pkgrel=6
+pkgdesc='Basic, good-looking task manager for WMs'
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/tint2/"
+license=('GPL2')
+conflicts=('ttm-svn' 'tint')
+replaces=('tint')
+depends=('gtk2' 'imlib2')
+optdepends=('pygtk: for tint2wizard')
+makedepends=('pygtk' 'cmake')
+provides=('tint')
+source=(http://tint2.googlecode.com/files/tint2-$pkgver.tar.bz2
+        add-power-now-support.patch
+        fix_defunct_processes.patch
+        middle_click_on_clock.patch)
+md5sums=('6fc5731e7425125fa84a2add5cef4bff'
+         '6cfcad028f1bd2f69812167f5395f890'
+         'b3d052ac5ada81c56e36133b1ecdee8c'
+         'f7918d29a87422aab6fb9d922867d8f8')
+
+prepare() {
+  cd $pkgname-$pkgver
+
+  patch -Np0 -i ../add-power-now-support.patch
+  patch -Np0 -i ../fix_defunct_processes.patch
+  patch -Np0 -i ../middle_click_on_clock.patch
+
+  # python2 fix
+  sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' src/tint2conf/tintwizard.py
+  sed -i 's_python _python2 _' src/tint2conf/main.c
+}
+
+build() {
+  cd $pkgname-$pkgver
+
+  cmake -DCMAKE_INSTALL_PREFIX=/usr .
+  make 
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}

Deleted: community-i686/add-power-now-support.patch
===================================================================
--- community-i686/add-power-now-support.patch	2013-09-25 18:19:17 UTC (rev 97617)
+++ community-i686/add-power-now-support.patch	2013-09-25 18:19:34 UTC (rev 97618)
@@ -1,19 +0,0 @@
-diff -rup ../tint2-0.11.orig/src/battery/battery.c ./src/battery/battery.c
---- ../tint2-0.11.orig/src/battery/battery.c	2010-12-02 23:56:11.313403140 +0100
-+++ ./src/battery/battery.c	2010-12-02 23:57:22.266956142 +0100
-@@ -184,8 +184,14 @@ void init_battery()
- 		}
- 		g_free(path2);
- 	}
--	if (path_energy_now && path_energy_full) {
-+
-+	path_current_now = g_build_filename(battery_dir, "power_now", NULL);
-+	if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
-+		g_free(path_current_now);
- 		path_current_now = g_build_filename(battery_dir, "current_now", NULL);
-+	}
-+
-+	if (path_energy_now && path_energy_full) {
- 		path_status = g_build_filename(battery_dir, "status", NULL);
- 
- 		// check file

Copied: tint2/repos/community-i686/add-power-now-support.patch (from rev 97617, tint2/trunk/add-power-now-support.patch)
===================================================================
--- community-i686/add-power-now-support.patch	                        (rev 0)
+++ community-i686/add-power-now-support.patch	2013-09-25 18:19:34 UTC (rev 97618)
@@ -0,0 +1,19 @@
+diff -rup ../tint2-0.11.orig/src/battery/battery.c ./src/battery/battery.c
+--- ../tint2-0.11.orig/src/battery/battery.c	2010-12-02 23:56:11.313403140 +0100
++++ ./src/battery/battery.c	2010-12-02 23:57:22.266956142 +0100
+@@ -184,8 +184,14 @@ void init_battery()
+ 		}
+ 		g_free(path2);
+ 	}
+-	if (path_energy_now && path_energy_full) {
++
++	path_current_now = g_build_filename(battery_dir, "power_now", NULL);
++	if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
++		g_free(path_current_now);
+ 		path_current_now = g_build_filename(battery_dir, "current_now", NULL);
++	}
++
++	if (path_energy_now && path_energy_full) {
+ 		path_status = g_build_filename(battery_dir, "status", NULL);
+ 
+ 		// check file

Copied: tint2/repos/community-i686/fix_defunct_processes.patch (from rev 97617, tint2/trunk/fix_defunct_processes.patch)
===================================================================
--- community-i686/fix_defunct_processes.patch	                        (rev 0)
+++ community-i686/fix_defunct_processes.patch	2013-09-25 18:19:34 UTC (rev 97618)
@@ -0,0 +1,31 @@
+http://code.google.com/p/tint2/issues/detail?id=430
+Submitted By: David B. Cortarello (Nomius) <dcortarello at gmail dot com>
+Date: 18-05-2013
+Initial Package Version: subversion trunk (revision 652)
+Description: Fix zombie (defunct) processes created in clock_action.
+This patch provides the following bugfixes:
+   * This patch uses waitpid with WNOHANG to eliminate all zombie processes created by tint2 (in particular by the clock -right or left- click). This is done by a small hack in the update_clocks_min, called to "redraw" that area.
+
+--- src/clock/clock.c	(revision 652)
++++ src/clock/clock.c	(working copy)
+@@ -23,6 +23,8 @@
+ #include <cairo-xlib.h>
+ #include <pango/pangocairo.h>
+ #include <stdlib.h>
++#include <sys/types.h>
++#include <sys/wait.h>
+ 
+ #include "window.h"
+ #include "server.h"
+@@ -98,6 +103,10 @@
+ 	// remember old_sec because after suspend/hibernate the clock should be updated directly, and not
+ 	// on next minute change
+ 	time_t old_sec = time_clock.tv_sec;
++
++	// Little hack to wait executed commands in clock_action avoiding zombies
++	waitpid(-1, NULL, WNOHANG);
++
+ 	gettimeofday(&time_clock, 0);
+ 	if (time_clock.tv_sec % 60 == 0 || time_clock.tv_sec - old_sec > 60) {
+ 		int i;
+

Copied: tint2/repos/community-i686/middle_click_on_clock.patch (from rev 97617, tint2/trunk/middle_click_on_clock.patch)
===================================================================
--- community-i686/middle_click_on_clock.patch	                        (rev 0)
+++ community-i686/middle_click_on_clock.patch	2013-09-25 18:19:34 UTC (rev 97618)
@@ -0,0 +1,75 @@
+http://code.google.com/p/tint2/issues/detail?id=430
+Submitted By: David B. Cortarello (Nomius) <dcortarello at gmail dot com>
+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: src/clock/clock.c
+===================================================================
+--- src/clock/clock.c	(revision 652)
++++ 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: src/clock/clock.h
+===================================================================
+--- src/clock/clock.h	(revision 652)
++++ 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: src/config.c
+===================================================================
+--- src/config.c	(revision 652)
++++ 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);
+

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2013-09-25 18:19:17 UTC (rev 97617)
+++ community-x86_64/PKGBUILD	2013-09-25 18:19:34 UTC (rev 97618)
@@ -1,43 +0,0 @@
-# $Id$
-# Maintainer:  Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
-# Contributor: Blue Peppers <bluepeppers at archlinux.us>
-# Contributor: Stefan Husmann< stefan-husmann at t-online.de>
-
-pkgname=tint2
-pkgver=0.11
-pkgrel=5
-pkgdesc="A basic, good-looking task manager for WMs"
-arch=('i686' 'x86_64')
-url="http://code.google.com/p/tint2/"
-license=('GPL2')
-conflicts=('ttm-svn' 'tint')
-replaces=('tint')
-depends=('gtk2' 'imlib2')
-optdepends=('pygtk: for using tint2conf')
-makedepends=('pygtk' 'cmake')
-provides=('tint')
-source=("http://$pkgname.googlecode.com/files/$pkgname-${pkgver}.tar.bz2"
-        'add-power-now-support.patch')
-md5sums=('6fc5731e7425125fa84a2add5cef4bff'
-         '6cfcad028f1bd2f69812167f5395f890')
-
-build() {
-  cd "$srcdir/$pkgname-${pkgver}"
-
-  # add support for power_now battery attribute (fixes FS#21954)
-  patch -Np0 -i ../add-power-now-support.patch
-
-  # python2 fix
-  sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' src/tint2conf/tintwizard.py
-  sed -i 's_python _python2 _' src/tint2conf/main.c
-
-  [ -d build ] || mkdir build
-  cd build
-  cmake -DCMAKE_INSTALL_PREFIX=/usr ../
-  make 
-}
-
-package() {
-  cd "$srcdir/$pkgname-${pkgver}/build"
-  make DESTDIR="$pkgdir" install
-}

Copied: tint2/repos/community-x86_64/PKGBUILD (from rev 97617, tint2/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2013-09-25 18:19:34 UTC (rev 97618)
@@ -0,0 +1,50 @@
+# $Id$
+# Maintainer:  Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
+# Contributor: Blue Peppers <bluepeppers at archlinux.us>
+# Contributor: Stefan Husmann< stefan-husmann at t-online.de>
+
+pkgname=tint2
+pkgver=0.11
+pkgrel=6
+pkgdesc='Basic, good-looking task manager for WMs'
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/tint2/"
+license=('GPL2')
+conflicts=('ttm-svn' 'tint')
+replaces=('tint')
+depends=('gtk2' 'imlib2')
+optdepends=('pygtk: for tint2wizard')
+makedepends=('pygtk' 'cmake')
+provides=('tint')
+source=(http://tint2.googlecode.com/files/tint2-$pkgver.tar.bz2
+        add-power-now-support.patch
+        fix_defunct_processes.patch
+        middle_click_on_clock.patch)
+md5sums=('6fc5731e7425125fa84a2add5cef4bff'
+         '6cfcad028f1bd2f69812167f5395f890'
+         'b3d052ac5ada81c56e36133b1ecdee8c'
+         'f7918d29a87422aab6fb9d922867d8f8')
+
+prepare() {
+  cd $pkgname-$pkgver
+
+  patch -Np0 -i ../add-power-now-support.patch
+  patch -Np0 -i ../fix_defunct_processes.patch
+  patch -Np0 -i ../middle_click_on_clock.patch
+
+  # python2 fix
+  sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' src/tint2conf/tintwizard.py
+  sed -i 's_python _python2 _' src/tint2conf/main.c
+}
+
+build() {
+  cd $pkgname-$pkgver
+
+  cmake -DCMAKE_INSTALL_PREFIX=/usr .
+  make 
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}

Deleted: community-x86_64/add-power-now-support.patch
===================================================================
--- community-x86_64/add-power-now-support.patch	2013-09-25 18:19:17 UTC (rev 97617)
+++ community-x86_64/add-power-now-support.patch	2013-09-25 18:19:34 UTC (rev 97618)
@@ -1,19 +0,0 @@
-diff -rup ../tint2-0.11.orig/src/battery/battery.c ./src/battery/battery.c
---- ../tint2-0.11.orig/src/battery/battery.c	2010-12-02 23:56:11.313403140 +0100
-+++ ./src/battery/battery.c	2010-12-02 23:57:22.266956142 +0100
-@@ -184,8 +184,14 @@ void init_battery()
- 		}
- 		g_free(path2);
- 	}
--	if (path_energy_now && path_energy_full) {
-+
-+	path_current_now = g_build_filename(battery_dir, "power_now", NULL);
-+	if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
-+		g_free(path_current_now);
- 		path_current_now = g_build_filename(battery_dir, "current_now", NULL);
-+	}
-+
-+	if (path_energy_now && path_energy_full) {
- 		path_status = g_build_filename(battery_dir, "status", NULL);
- 
- 		// check file

Copied: tint2/repos/community-x86_64/add-power-now-support.patch (from rev 97617, tint2/trunk/add-power-now-support.patch)
===================================================================
--- community-x86_64/add-power-now-support.patch	                        (rev 0)
+++ community-x86_64/add-power-now-support.patch	2013-09-25 18:19:34 UTC (rev 97618)
@@ -0,0 +1,19 @@
+diff -rup ../tint2-0.11.orig/src/battery/battery.c ./src/battery/battery.c
+--- ../tint2-0.11.orig/src/battery/battery.c	2010-12-02 23:56:11.313403140 +0100
++++ ./src/battery/battery.c	2010-12-02 23:57:22.266956142 +0100
+@@ -184,8 +184,14 @@ void init_battery()
+ 		}
+ 		g_free(path2);
+ 	}
+-	if (path_energy_now && path_energy_full) {
++
++	path_current_now = g_build_filename(battery_dir, "power_now", NULL);
++	if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
++		g_free(path_current_now);
+ 		path_current_now = g_build_filename(battery_dir, "current_now", NULL);
++	}
++
++	if (path_energy_now && path_energy_full) {
+ 		path_status = g_build_filename(battery_dir, "status", NULL);
+ 
+ 		// check file

Copied: tint2/repos/community-x86_64/fix_defunct_processes.patch (from rev 97617, tint2/trunk/fix_defunct_processes.patch)
===================================================================
--- community-x86_64/fix_defunct_processes.patch	                        (rev 0)
+++ community-x86_64/fix_defunct_processes.patch	2013-09-25 18:19:34 UTC (rev 97618)
@@ -0,0 +1,31 @@
+http://code.google.com/p/tint2/issues/detail?id=430
+Submitted By: David B. Cortarello (Nomius) <dcortarello at gmail dot com>
+Date: 18-05-2013
+Initial Package Version: subversion trunk (revision 652)
+Description: Fix zombie (defunct) processes created in clock_action.
+This patch provides the following bugfixes:
+   * This patch uses waitpid with WNOHANG to eliminate all zombie processes created by tint2 (in particular by the clock -right or left- click). This is done by a small hack in the update_clocks_min, called to "redraw" that area.
+
+--- src/clock/clock.c	(revision 652)
++++ src/clock/clock.c	(working copy)
+@@ -23,6 +23,8 @@
+ #include <cairo-xlib.h>
+ #include <pango/pangocairo.h>
+ #include <stdlib.h>
++#include <sys/types.h>
++#include <sys/wait.h>
+ 
+ #include "window.h"
+ #include "server.h"
+@@ -98,6 +103,10 @@
+ 	// remember old_sec because after suspend/hibernate the clock should be updated directly, and not
+ 	// on next minute change
+ 	time_t old_sec = time_clock.tv_sec;
++
++	// Little hack to wait executed commands in clock_action avoiding zombies
++	waitpid(-1, NULL, WNOHANG);
++
+ 	gettimeofday(&time_clock, 0);
+ 	if (time_clock.tv_sec % 60 == 0 || time_clock.tv_sec - old_sec > 60) {
+ 		int i;
+

Copied: tint2/repos/community-x86_64/middle_click_on_clock.patch (from rev 97617, tint2/trunk/middle_click_on_clock.patch)
===================================================================
--- community-x86_64/middle_click_on_clock.patch	                        (rev 0)
+++ community-x86_64/middle_click_on_clock.patch	2013-09-25 18:19:34 UTC (rev 97618)
@@ -0,0 +1,75 @@
+http://code.google.com/p/tint2/issues/detail?id=430
+Submitted By: David B. Cortarello (Nomius) <dcortarello at gmail dot com>
+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: src/clock/clock.c
+===================================================================
+--- src/clock/clock.c	(revision 652)
++++ 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: src/clock/clock.h
+===================================================================
+--- src/clock/clock.h	(revision 652)
++++ 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: src/config.c
+===================================================================
+--- src/config.c	(revision 652)
++++ 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);
+




More information about the arch-commits mailing list