all repos — tint2 @ 4c5408d5fd2b60759dca9b770636ccc0a9e5448f

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

allow to choose the number of blink for urgent task

git-svn-id: http://tint2.googlecode.com/svn/trunk@119 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
lorthiois@bbsoft.fr lorthiois@bbsoft.fr@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

4c5408d5fd2b60759dca9b770636ccc0a9e5448f

parent

533ab08523c49ed0707330709eb6822994e52049

5 files changed, 25 insertions(+), 3 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,3 +1,6 @@

+2009-06-20 +- 'urgent_nb_of_blink' allow to choose the number of blink + 2009-06-19 - change systray code. fixed issue 91.
M src/config.csrc/config.c

@@ -83,6 +83,7 @@

panel_config = calloc(1, sizeof(Panel)); // window manager's menu default value == false wm_menu = 0; + max_tick_urgent = 7; }

@@ -318,6 +319,8 @@ memcpy(&panel_config->area.pix.border, &a->pix.border, sizeof(Border));

} else if (strcmp (key, "wm_menu") == 0) wm_menu = atoi (value); + else if (strcmp (key, "urgent_nb_of_blink") == 0) + max_tick_urgent = (atoi (value) * 2) + 1; /* Battery */ #ifdef ENABLE_BATTERY
M src/panel.csrc/panel.c

@@ -47,6 +47,8 @@

Task *task_active; Task *task_drag; Task *task_urgent; +int tick_urgent; +int max_tick_urgent; Panel *panel1 = 0; int nb_panel;
M src/panel.hsrc/panel.h

@@ -47,6 +47,8 @@

extern Task *task_active; extern Task *task_drag; extern Task *task_urgent; +extern int tick_urgent; +extern int max_tick_urgent; typedef struct {
M src/tint.csrc/tint.c

@@ -390,6 +390,7 @@ // Demand attention

else if (at == server.atom._NET_WM_STATE) { if (window_is_urgent (win)) { task_urgent = tsk; + tick_urgent = 0; time_precision = 1; } }

@@ -510,8 +511,11 @@ time_clock.tv_sec -= time_clock.tv_sec % time_precision;

// urgent task if (task_urgent) { - task_urgent->area.is_active = !task_urgent->area.is_active; - task_urgent->area.redraw = 1; + if (tick_urgent < max_tick_urgent) { + task_urgent->area.is_active = !task_urgent->area.is_active; + task_urgent->area.redraw = 1; + tick_urgent++; + } } // update battery

@@ -547,8 +551,16 @@

load_config: i = 0; init_config(); - if (c != -1) + if (c != -1) { i = config_read_file (optarg); + c = getopt (argc, argv, "j:"); + if (c != -1) { + // usage: tint2 [-c] <config_file> -j <jpeg_file> for internal use + printf("jpeg file %s\n", optarg); + cleanup(); + exit(0); + } + } if (!i) i = config_read (); if (!i) {