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

« back to all changes in this revision

Viewing changes to netspeed/src/applet-init.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-09-07 02:38:17 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100907023817-ish9a53i2wn0m7zg
Tags: 2.2.0~0rc1-0ubuntu1
* New Upstream Version (LP: #632054)
* Fixed a few bugs on LP:
 - LP: #616176 Dust Bin Hang and Incorrect Configuration
 - LP: #604034 Change terminal tab's name lost the color
 - LP: #582452 GMenu does not contain any applications
* Fixed a few bugs on glx-dock forum:
 - Fixed support of GMusicBrowser.
 - AlsaMixer has no emblem.
 - Status-Notifier doesn't be drawed into the dock.
* Updated translations
* debian/control:
 - Added cairo-dock-core as build-depends in order to prevent
   some builds errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        "Middle-click to (de)activate the network (needs NetworManager)"),
35
35
        "parAdOxxx_ZeRo");
36
36
 
37
 
 
38
37
static void _set_data_renderer (CairoDockModuleInstance *myApplet, gboolean bReload)
39
38
{
40
 
        CairoDataRendererAttribute *pRenderAttr = NULL;  // les attributs du data-renderer global.
 
39
        CairoDataRendererAttribute *pRenderAttr = NULL;  // les attributs generiques du data-renderer.
41
40
        if (myConfig.iDisplayType == CD_NETSPEED_GAUGE)
42
41
        {
43
42
                CairoGaugeAttribute attr;  // les attributs de la jauge.
72
71
        {
73
72
                /// A FAIRE...
74
73
        }
75
 
        if (pRenderAttr != NULL)
 
74
        if (pRenderAttr != NULL)  // attributs generiques.
76
75
        {
77
76
                pRenderAttr->iLatencyTime = myConfig.iCheckInterval * 1000 * myConfig.fSmoothFactor;
78
77
                pRenderAttr->iNbValues = 2;
79
78
                pRenderAttr->bUpdateMinMax = TRUE;
80
 
                //pRenderAttr->bWriteValues = TRUE;
 
79
                if (myConfig.iInfoDisplay == CAIRO_DOCK_INFO_ON_ICON)
 
80
                {
 
81
                        pRenderAttr->bWriteValues = TRUE;
 
82
                        pRenderAttr->format_value = (CairoDataRendererFormatValueFunc)cd_netspeed_format_value;
 
83
                        pRenderAttr->pFormatData = myApplet;
 
84
                }
 
85
                const gchar *labels[2] = {"UP", "DOWN"};
 
86
                pRenderAttr->cLabels = (gchar **)labels;
81
87
                if (! bReload)
82
88
                        CD_APPLET_ADD_DATA_RENDERER_ON_MY_ICON (pRenderAttr);
83
89
                else