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

« back to all changes in this revision

Viewing changes to Disks/src/applet-disks.c

  • Committer: Matthieu Baerts
  • Date: 2012-10-09 13:51:52 UTC
  • mfrom: (1.1.25)
  • Revision ID: matttbe@gmail.com-20121009135152-0nu6caskzsh8al66
Tags: 3.1.0-0ubuntu1
* New upstream release. (LP: #1064130)
 - Even if there are a lot of changes, this is a 'bug-fix' version.
   Changes are big mainly because the translations have been updated and
   a lot of GCC warnings (from -Wall and -Wextra) have been fixed.
 - Note that due to the recent rewrite of indicator-messages,
    Messaging-Menu has been rewritten too to directly load the .so file
    Now it's just easy to add a new indicator applet and this is why
    Printers-Menu (indicator-printers) and Sync-Menu (indicator-sync)
    applets have been added just by modifying the name of the .so file.
* Upstream ChangeLog (detailed changes since the last version):
 - All:
  + Graph: iRadius parameter is no longer needed
  + Notifications: removed unused registrations to a few signals
    (on click, on middle click, on build menu, etc.)
  + Code cleaning: removed a few useless g_print (or used cd_debug instead)
  + Code cleaning: fixed a lot of GCC's warnings when using -Wall
  + po: updated the translations
  + po: Added Lithuanian and Hebrew languages
 - Cairo-Penguin: its menu wasn't displayed when clicking on the character
 - Dock-Rendering:
  + Slide view: fixed the arrow color when the sub-dock is on a side of
    the screen
  + Slide view: renamed the files + fixed the position of the sub-dock when
    the parent dock's alignment is not centered
 - Doncky: fixed a lot (and a lot) memory leaks and warnings during the
    compilation
 - GMenu: for those having a big lag when opening the menu for the first
   time: it's now possible to load all icons at startup (hidden option)
 - GVFS:
  + No longer added the home directory when listing vfs-root
  + Fixed a few memory leaks
  + Renamed '/' by 'File System' (name used by other DE)
  + Removed an useless strcmp
 - Indicators:
  + Added support of the new Indicator (3-0.4)
    (needed for the new version of indicator-messaging)
  + Added Printers-Menu and Sync-Menu (they just load the right .so file)
 - Mail:
  + Fixed a few memory leaks and removed useless variables' initialisations
  + Set '/' as a default path if none is defined in conf
 - Messaging-Menu:
  + This applet was broken on Ubuntu Quantal due to the recent changes in
    the messagin-menu deamon. Now we use Indicator-applet3 to manage the
    applet. The code is now shorter, it should be safer and it's no longer
    needed to sync the code between indicator-messages and this
    Messaging-Menu applet
  + Removed the link to ido (it's not needed)
 - musicPlayer:
  + Prevent displaying quicklist, since the applet already provides all the
    common actions for any player
  + mpris2: some players doesn't support (well) the 'trackid'
    (e.g. Audacious or Pithos)
  + cover: used a loop instead of checking all names one by one
 - Powermanager:
  + UPower: displayed the details of all batteries
    (and not only the first one)
    + Connected to 'device-added' and 'device-removed' signals if the user
      adds or removes a battery (and avoid wrong informations)
 - Recent-Events:
  + Dialog: no longer added removed files
  + Dialog: Applications: Used the translated name
  + Recent files: added deleted files to the hashtable to prevent useless
    g_file_test
 - Shortcuts:
  + Bookmarks: moved Home to the bookmarks list (like most files managers)
  + Added the disk space progress bar on the Home folder, since /home is
    not listed by gvfs except if /home is on another partition
 - showDesktop:
  + Checked the XRandr version with the core function to avoid crash
    if XRandr 1.2 is not available
 - Stack:
  + Used 'g_uri_unescape_string' instead of 'g_filename_from_uri' to
    support all uri an not only 'file://'
 - Status-Notifier: if the item doesn't have info for the title, the ID is
   shown but this string is cut (12 chars)
 - Switcher: changed the 'render' notification order to draw the desklet
   after the desklet manager
* debian/rules:
 - Removed all unstable applets
* debian/cairo-dock-plug-ins.install:
 - Removed appmenu-registrar which was needed for the unstable'Global-Menu'
   applet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
                {
237
237
                        pSize = g_list_nth_data (myData.lParts, i);
238
238
                        status = statvfs(myConfig.cParts[i], &buffer);
 
239
                        if (status < 0)
 
240
                                cd_warning ("Not able to use statvfs");
239
241
                        *pSize = 1. - (double) buffer.f_bfree / (double) buffer.f_blocks;
240
242
                }
241
243
        }
259
261
                        gsize i;
260
262
                        CDDiskSpeedData* pSpeed;
261
263
                        long long unsigned uReadBlocks, uWriteBlocks;
262
 
                        gboolean bFound;
263
 
                        for (;;)
 
264
                        // for (;;)
 
265
                        while (TRUE)
264
266
                        {
265
267
                                if (!fgets(buff,BUFFSIZE-1,fd))
266
268
                                {
276
278
                                        &uReadBlocks,
277
279
                                        &uWriteBlocks 
278
280
                                        );
279
 
        
280
 
                                bFound = FALSE;
 
281
 
281
282
                                if (strlen (disk_name) == 3)
282
283
                                        for (i = 0; i < myData.iNumberDisks; i++)
283
284
                                        {
297
298
                                                         //~ cd_warning("%s %u %u", pSpeed->cName, pSpeed->uReadSpeed, pSpeed->uWriteSpeed);
298
299
                                                        
299
300
                                                        pSpeed->bAcquisitionOK = TRUE;
300
 
                                                        bFound = TRUE;
301
301
                                                        break;
302
302
                                                }
303
303
                                        }