~ubuntu-branches/ubuntu/hardy/avidemux/hardy

« back to all changes in this revision

Viewing changes to avidemux/ADM_tray/ADM_tray.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-12-15 17:13:20 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061215171320-w79pvpehxx2fr217
Tags: 1:2.3.0-0.0ubuntu1
* Merge from debian-multimedia.org, remaining Ubuntu change:
  - desktop file,
  - no support for ccache and make -j.
* Closes Ubuntu: #69614.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#include "ADM_gui2/support.h"
41
41
 
42
42
static int nbTray=0;
 
43
static  GdkPixbuf   **pixbuf=NULL;
43
44
 
44
45
extern GdkPixbuf        *create_pixbuf                  (const gchar     *filename);
45
46
/*
54
55
        setStatus(int working);
55
56
 
56
57
};*/
57
 
 
 
58
static char *animated[]={
 
59
    "film1.png","film3.png","film5.png","film7.png","film9.png",
 
60
    "film11.png","film13.png","film15.png","film17.png","film19.png",
 
61
    "film21.png","film23.png"};
58
62
ADM_tray::ADM_tray(char *name)
59
63
{
60
64
        ADM_assert(!nbTray);
61
65
        nbTray++;
62
66
 
63
67
 
64
 
  GtkWidget   *img;
65
 
  GdkPixbuf   *pixbuf;
66
 
 
67
 
  pixbuf=create_pixbuf("systray.xpm");
68
 
  sys=adm_new_systray(pixbuf,name);
69
 
 
70
 
  
 
68
  int nb=sizeof(animated)/sizeof(char *);
 
69
  if(!pixbuf)
 
70
  {
 
71
      pixbuf=new GdkPixbuf*[nb];
 
72
      for(int i=0;i<nb;i++)
 
73
      {
 
74
        pixbuf[i]=create_pixbuf(animated[i]);
 
75
        if(!pixbuf[i])
 
76
        {
 
77
          printf("Failed to create <%s>\n",animated[i]);
 
78
          ADM_assert(0);
 
79
        }
 
80
      }
 
81
 
 
82
  }
 
83
  sys=adm_new_systray(pixbuf,nb,name);
71
84
 
72
85
}
73
86
ADM_tray::~ADM_tray()
83
96
char percentS[40];
84
97
        sprintf(percentS,"%d %%",percent);
85
98
        if(sys)
 
99
        {
 
100
                adm_changeIcon_systray();
86
101
                adm_change_tooltip(sys,percentS);
 
102
        }
87
103
        return 1;
88
104
}
89
105
uint8_t ADM_tray::setStatus(int working)