1
/***************************************************************************
2
adm_encdivx.cpp - description
4
begin : Sun Jul 14 2002
5
copyright : (C) 2002 by mean
6
email : fixounet@free.fr
9
Derived from MLdonkey systray code
10
http://savannah.nongnu.org/cvs/?group=mldonkey
11
***************************************************************************/
13
/***************************************************************************
15
* This program is free software; you can redistribute it and/or modify *
16
* it under the terms of the GNU General Public License as published by *
17
* the Free Software Foundation; either version 2 of the License, or *
18
* (at your option) any later version. *
20
***************************************************************************/
30
#include "ADM_toolkit_gtk/toolkit_gtk_include.h"
31
#include <ADM_assert.h>
33
#include "ADM_toolkit_gtk/ADM_gladeSupport.h"
39
static GdkPixbuf **pixbuf=NULL;
41
extern GdkPixbuf *create_pixbuf (const gchar *filename);
50
setPercent(int percent);
51
setStatus(int working);
54
static char *animated[]={
55
"film1.png","film3.png","film5.png","film7.png","film9.png",
56
"film11.png","film13.png","film15.png","film17.png","film19.png",
57
"film21.png","film23.png"};
58
ADM_tray::ADM_tray(char *name)
64
int nb=sizeof(animated)/sizeof(char *);
67
pixbuf=new GdkPixbuf*[nb];
70
pixbuf[i]=create_pixbuf(animated[i]);
73
printf("Failed to create <%s>\n",animated[i]);
79
sys=adm_new_systray(pixbuf,nb,name);
87
adm_delete_systray(sys);
90
uint8_t ADM_tray::setPercent(int percent)
93
sprintf(percentS,"%d %%",percent);
96
adm_changeIcon_systray();
97
adm_change_tooltip(sys,percentS);
101
uint8_t ADM_tray::setStatus(int working)