~matttbe/ubuntu/quantal/cairo-dock/lp1013171

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-packages.c

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane, Matthieu Baerts (matttbe)
  • Date: 2011-10-11 10:53:26 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20111011105326-8s3yzoeu3wr15k9p
Tags: 2.4.0~2-0ubuntu1
[ Matthieu Baerts (matttbe) ]
* New upstream bug fix release. (LP: #859982)
* Upstream (short) ChangeLog (2.4.0~0beta2 -> 2.4.0~1):
 - Improved support of the new Gnome 3 session
    (to avoid conflicts with the new Gnome-Panel).
 - Code cleaned and re-organised a few functions
    (e.g. with cairo-dock-overlay, cairo-dock.c, etc.)
 - Updating translations
 - Improved the support of XFCE and LXDE environments
 - Removed invalid launcher desktop files
 - Used a default icon if the path set by the user is wrong
 - Fixed the possibility to sticky a desklet (bug due to a Xorg update)
 - GUI: fixed the list-entry widget
 - Fixed support of the Widget Layer in Compiz >= 0.9
 - Compiz type filter: replaced type=utility by type=Utility
 - Fixed a small refresh bug in cairo mode
    (with icons that are always visible)
 - Improved the placement of icons when avoiding the mouse
    (when something is being dropped onto the dock)
 - Updated the default theme in order to use new applications
 - Gauge implementation: Rewritten to use CairoDockImageBuffer
    and fixed the problem with png images
 - Graphs: Improved the drawing and added more precisions
 - Improved the 'lock' option description
 - GUI simple: fixed a bad update of the parameters
    when switching back to the previous value
 - Fixed the path of the preview for the default view
 - Help: Fixed the problem with tips
 - Default-theme: .conf files: fixed lintian warnings
 - Fixed a few warnings at the compilation
 - Removed a few useless output messages
 - Fixed these LP bugs:
  + Cairo-dock corrupts Kdenlive monitor display LP: #729970
  + Can't play videos in kaffeine LP: #475375
 - And fixed a lot of tiny bugs, please have a look to bzr logs.
* Upstream (short) ChangeLog (2.4.0~1 -> 2.4.0~2):
 - Fixed a bug with the detection of compiz plugins
 - doc: used the right version
 - Fixed a possible crash with an empty dock LP: #861725
 - FlyingContainer: draw the icon correctly
* debian/patches:
 - Removed 01-musicPlayer_with_banshee: now in upstream
* debian/copyright:
 - Updated and fixed lintian warnings: old-fsf-address-in-copyright-file
* debian/rules and debian/cairo-dock-data.install:
 - Added support of the new Gnome 3 session.
* debian/control:
 - Fixed lintian warning: description-synopsis-starts-with-article
 - Fixed lintian error: version-substvar-for-external-package
* debian/cairo-dock-data.lintian-overrides:
 - Removed old warnings (fixed)
 - Added binary-without-manpage (custom scripts used)
* debian/cairo-dock-core.install and debian/cairo-dock-dev.install:
 - Fixed a lintian warning: non-dev-pkg-with-shlib-symlink
* debian/patches/01-improved-cairo-dock-session.patch:
 - Improved the launch of our Cairo-Dock session (by removing Unity
    Compiz plugin and by launching the dock with a short delay)
 - Fixed lintian error: shell-script-fails-syntax-check
    (it seems I made wrong manipulation with vim...)
* debian/patches/02-manpage-not-compressed-with-max-compression.patch:
 - Fixed this lintian error: manpage-not-compressed-with-max-compression

Show diffs side-by-side

added added

removed removed

Lines of Context:
417
417
                return ;
418
418
        g_free (pPackage->cPackagePath);
419
419
        g_free (pPackage->cAuthor);
 
420
        g_free (pPackage->cHint);
420
421
        g_free (pPackage->cDisplayedName);
421
422
        g_free (pPackage);
422
423
}
514
515
        CairoDockPackage *pPackage;
515
516
        CairoDockPackageType iType;
516
517
        double fSize;
517
 
        int iCreationDate, iLastModifDate, iLocalDate, iSobriety, iCategory;
 
518
        int iCreationDate, iLastModifDate, iLocalDate, iSobriety;
518
519
        int last_modif, creation_date;
 
520
        gchar *cHint;
519
521
        guint i;
520
522
        for (i = 0; i < length; i ++)
521
523
        {
523
525
                iCreationDate = g_key_file_get_integer (pKeyFile, cPackageName, "creation", NULL);
524
526
                iLastModifDate = g_key_file_get_integer (pKeyFile, cPackageName, "last modif", NULL);
525
527
                iSobriety = g_key_file_get_integer (pKeyFile, cPackageName, "sobriety", NULL);
526
 
                iCategory = g_key_file_get_integer (pKeyFile, cPackageName, "category", NULL);
 
528
                cHint = g_key_file_get_string (pKeyFile, cPackageName, "hint", NULL);
 
529
                if (cHint && *cHint == '\0')
 
530
                {
 
531
                        g_free (cHint);
 
532
                        cHint = NULL;
 
533
                }
527
534
                fSize = g_key_file_get_double (pKeyFile, cPackageName, "size", NULL);
528
535
                cAuthor = g_key_file_get_string (pKeyFile, cPackageName, "author", NULL);
529
536
                if (cAuthor && *cAuthor == '\0')
586
593
                                g_free (pSamePackage->cDisplayedName);
587
594
                                pSamePackage->cDisplayedName = (cName ? cName : g_strdup (cPackageName));
588
595
                                pSamePackage->cAuthor = cAuthor;  // et l'auteur original.
 
596
                                pSamePackage->cHint = cHint;  // et le hint.
589
597
                                g_free (cPackageName);
590
598
                                continue;
591
599
                        }
592
600
                        
593
 
                        pPackage = pSamePackage;
 
601
                        pPackage = pSamePackage;  // we'll update the characteristics of the package with the one from the server.
594
602
                        g_free (pPackage->cPackagePath);
595
603
                        g_free (pPackage->cAuthor);
 
604
                        g_free (pPackage->cHint);
596
605
                        g_free (pPackage->cDisplayedName);
597
606
                }
598
607
                else  // package encore jamais telecharge.
618
627
                pPackage->cAuthor = cAuthor;
619
628
                pPackage->cDisplayedName = (cName ? cName : g_strdup (cPackageName));
620
629
                pPackage->iSobriety = iSobriety;
621
 
                pPackage->iCategory = iCategory;
 
630
                pPackage->cHint = cHint;
622
631
                pPackage->iCreationDate = iCreationDate;
623
632
                pPackage->iLastModifDate = iLastModifDate;
624
633
                g_free (cPackageName);
763
772
        gchar *cPackagePath = NULL;
764
773
        
765
774
        //g_print ("iType : %d\n", iType);
766
 
        if (cUserPackagesDir != NULL && /*iType != CAIRO_DOCK_DISTANT_PACKAGE && iType != CAIRO_DOCK_NEW_PACKAGE && */iType != CAIRO_DOCK_UPDATED_PACKAGE)
 
775
        if (cUserPackagesDir != NULL && iType != CAIRO_DOCK_UPDATED_PACKAGE)
767
776
        {
768
777
                cPackagePath = g_strdup_printf ("%s/%s", cUserPackagesDir, cPackageName);
769
778
                
837
846
}
838
847
 
839
848
 
840
 
void cairo_dock_init_package_manager (gchar *cPackageServerAdress)
 
849
void cairo_dock_set_packages_server (gchar *cPackageServerAdress)
841
850
{
842
851
        s_cPackageServerAdress = cPackageServerAdress;
843
 
        
844
 
        //\___________________ On initialise le gestionnaire de download.
845
 
        curl_global_init (CURL_GLOBAL_DEFAULT);  /// merge with init
846
852
}
847
853
 
848
854
 
917
923
        // register
918
924
        gldi_register_manager (GLDI_MANAGER(&myConnectionMgr));
919
925
}
920
 
 
921
 
 
922