~ubuntu-branches/ubuntu/quantal/cairo-dock-plug-ins/quantal-201208191523

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2011-04-20 20:46:51 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110420204651-ftnpzesj6uc7qeul
Tags: 2.3.0~1-0ubuntu1
* New Upstream Version (LP: #723995)
* Upstream short ChangeLog (since 2.3.0~0rc1):
 - Updated translations
 - Updated the integration of the new versions of kwin and compiz
    (Switcher, ShowDesktop, etc.)
 - Removed a lot of useless g_print
 - Updated a few plug-ins to fit with the new version of the API (gldit)
 - Fixed a few bugs
 - Updated MeMenu, MessagingMenu and Status-Notifier to works
    with the latest version of dbusmenu, etc.
* Switch to dpkg-source 3.0 (quilt) format
* debian/cairo-dock-plug-ins.install:
 - Added new files (interfaces for python, ruby, vala and mono)
* debian/control:
 - Added new dependences for new applets (sensors and zeitgeist)
    and new interfaces (python, valac, ruby and mono)
 - Updated the version of cairo-dock build-dependences
* debian/rules:
 - Added a new CMake flag to install python interface in debian/tmp
* Updated debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
446
446
                        myData.iNbDischargeMeasures ++;
447
447
                        cd_debug ("fDischargeMeanRate : %.2f (%d)\n", myData.fDischargeMeanRate, myData.iNbDischargeMeasures);
448
448
                        
449
 
                        if (fabs (myData.fLastDischargeMeanRate - myData.fDischargeMeanRate) > 30)
 
449
                        if (fabs (myConfig.fLastDischargeMeanRate - myData.fDischargeMeanRate) > 30)  // l'ecart avec la valeur stockee en conf est devenue grande, on met a jour cette derniere.
450
450
                        {
451
 
                                myData.fLastDischargeMeanRate = myData.fDischargeMeanRate;
 
451
                                myConfig.fLastDischargeMeanRate = myData.fDischargeMeanRate;
452
452
                                cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,
453
 
                                        G_TYPE_DOUBLE, "Configuration", "discharge rate", myData.fDischargeMeanRate,
 
453
                                        G_TYPE_DOUBLE, "Configuration", "discharge rate", myConfig.fLastDischargeMeanRate,
454
454
                                        G_TYPE_INVALID);
455
455
                        }
456
456
                }
459
459
                        myData.fChargeMeanRate = (myData.fChargeMeanRate * myData.iNbChargeMeasures + fPresentRate) / (myData.iNbChargeMeasures + 1);
460
460
                        myData.iNbChargeMeasures ++;
461
461
                        cd_debug ("fChargeMeanRate : %.2f (%d)\n", myData.fChargeMeanRate, myData.iNbChargeMeasures);
462
 
                        if (fabs (myData.fLastChargeMeanRate - myData.fChargeMeanRate) > 30)
 
462
                        if (fabs (myConfig.fLastChargeMeanRate - myData.fChargeMeanRate) > 30)  // l'ecart avec la valeur stockee en conf est devenue grande, on met a jour cette derniere.
463
463
                        {
464
 
                                myData.fLastChargeMeanRate = myData.fChargeMeanRate;
 
464
                                myConfig.fLastChargeMeanRate = myData.fChargeMeanRate;
465
465
                                cairo_dock_update_conf_file (CD_APPLET_MY_CONF_FILE,
466
 
                                        G_TYPE_DOUBLE, "Configuration", "charge rate", myData.fChargeMeanRate,
 
466
                                        G_TYPE_DOUBLE, "Configuration", "charge rate", myConfig.fLastChargeMeanRate,
467
467
                                        G_TYPE_INVALID);
468
468
                        }
469
469
                }