~cairo-dock-team/ubuntu/precise/cairo-dock-plug-ins/984054

« back to all changes in this revision

Viewing changes to powermanager/src/powermanager-init.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-10 00:05:57 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100810000557-pfxoz5w7hbyclcqh
Tags: 2.2.0~0beta4-0ubuntu1
* New Upstream Version (LP: #614625)
* Fixed a few bugs on LP:
 - LP: #483963: Dustbin applet does not display trashes on all volumes
 - LP: #485159: Some apps have problem with Systray
 - LP: #500677: ~/.xsession-errors is too much used by CD
 - LP: #500979: Shortcuts: the order gets messed up
 - LP: #521531: Mail: crashes on Maildir
 - LP: #519915: GTG: create a new applet to control GTG
 - LP: #526138: GMenu doesn't handle desktop file exec strings properly
 - LP: #531317: CMake: Added an error if the prefix of 'cairo-dock-plugins'
                 is not the same 'cairo-dock-core'
 - LP: #531319: CMake: check the version of 'cairo-dock' when building
                 'cairo-dock-plugins'
 - LP: #537115: Click at the position where icon lavel was, the icon
                 and dock still receive the event
 - LP: #537943: Terminal applet shortkey behaviour
 - LP: #538637: Trash applet doesn't create .trashinfo files on XFCE
 - More details on the 'ChangeLog' file
* debian/rules:
 - Autotools has been replaced by CMake
 - cdbs is now used.
* debian/copyright:
 - Updated with the new applets
* debian/control:
 - Autotools has been replaced by CMake
 - Added libcurl4-gnutls-dev, libindicator-dev, libdbusmenu-glib-dev
   libido-0.1-dev, libical-dev, libdbusmenu-gtk-dev as Build-deps
 - Bump Standard-Version to 3.9.1
 - Wget is required for dnd2share applet
 - Added the exact realease for 'cairo-dock-dev' in order to prevent any
    build error if this package is not already available (thx to didrocks)
* debian/cairo-dock-plug-ins*.install:
 - All sonames are now installed into lib32 or lib64 (lib*)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "powermanager-init.h"
29
29
 
30
30
 
31
 
CD_APPLET_DEFINITION ("PowerManager",
 
31
CD_APPLET_DEFINITION (N_("PowerManager"),
32
32
        2, 0, 6,
33
 
        CAIRO_DOCK_CATEGORY_ACCESSORY,
34
 
        N_("A power manager for laptop's battery. It works with ACPI and DBus."),
 
33
        CAIRO_DOCK_CATEGORY_APPLET_SYSTEM,
 
34
        N_("A power manager for laptop batteries. Works with ACPI and DBus."),
35
35
        "Necropotame (Adrien Pilleboue)")
36
36
 
37
37
static void _set_data_renderer (CairoDockModuleInstance *myApplet, gboolean bReload)
38
38
{
39
 
        CairoDataRendererAttribute *pRenderAttr;  // les attributs du data-renderer global.
 
39
        CairoDataRendererAttribute *pRenderAttr = NULL;  // les attributs du data-renderer global.
40
40
        if (myConfig.iDisplayType == CD_POWERMANAGER_GAUGE)
41
41
        {
42
42
                CairoGaugeAttribute attr;  // les attributs de la jauge.
76
76
CD_APPLET_INIT_BEGIN
77
77
        
78
78
        if (myDesklet)
 
79
        {
79
80
                CD_APPLET_SET_DESKLET_RENDERER ("Simple");
 
81
                CD_APPLET_ALLOW_NO_CLICKABLE_DESKLET;
 
82
        }
80
83
        
81
84
        // on ne charge pas toutes les surfaces, ce qui economise de la memoire, et du temps au chargement, car ce n'est pas necessaire. En effet, on ne redessine que si il y'a changement. Or la batterie se vide lentement, et la recharge n'est pas non plus fulgurante, donc au total on redesine reellement l'icone 1 fois toutes les 5 minutes peut-etre, ce qui ne justifie pas de pre-charger les surfaces.
82
85
        
132
135
 
133
136
 
134
137
CD_APPLET_RELOAD_BEGIN
135
 
        if (myDesklet)
136
 
                CD_APPLET_SET_DESKLET_RENDERER ("Simple");
137
 
        
138
138
        cairo_dock_free_emblem (myData.pEmblem);
139
139
        myData.pEmblem = CD_APPLET_MAKE_EMBLEM (MY_APPLET_SHARE_DATA_DIR"/charge.svg");
140
140
        cairo_dock_set_emblem_position (myData.pEmblem, CAIRO_DOCK_EMBLEM_MIDDLE);
141
141
        
142
142
        if (CD_APPLET_MY_CONFIG_CHANGED)
143
143
        {
 
144
                if (myDesklet && CD_APPLET_MY_CONTAINER_TYPE_CHANGED)  // we are now in a desklet, set a renderer.
 
145
                {
 
146
                        CD_APPLET_SET_DESKLET_RENDERER ("Simple");
 
147
                        CD_APPLET_ALLOW_NO_CLICKABLE_DESKLET;
 
148
                }
 
149
                
144
150
                _set_data_renderer (myApplet, TRUE);
145
151
                
146
152
                if(myData.checkLoop != 0)  // la frequence peut avoir change.