~cairo-dock-team/ubuntu/quantal/cairo-dock-plug-ins/3.1.0

« back to all changes in this revision

Viewing changes to Indicator-applet/indicator-applet.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-10-02 20:10:47 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101002201047-2hbcvvydc67jrdfu
Tags: 2.2.0~4-0ubuntu1
* New Upstream Version (LP: #653702)
* Fixed a few bugs:
 - All .mo files aren't installed into the right directory (LP: #653336)
 - Dbus: Fixed a crash when exiting Cairo-Dock
 - Indicator: Some modifications needed for the latest
               version of libindicator
 - RSSreader: Prevented a crash if myDrawContext != NULL
 - Clock: Prevented a crash if myDrawContext != NULL
 - Switcher:
  - Prevented a crash if myDrawContext != NULL
  - Fixed a crash if the plugin is launched much time before the WM
 - musicPlayer:
  - Used the right image set from the config panel
  - MPRIS plugin: fixed a bug with the tracknumber
 - Systray: not drawn outside the screen.
 - tomboy: not popup a dialogue inside the screen
 - xfce-integration: displayed a window when logout applet is launched
* debian/control:
 - Updated the version of cairo-dock-dev and cairo-dock-core

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
                g_object_unref (pIndicator->pServiceProxy);
124
124
        g_print ("destroy menu...\n");
125
125
        if (pIndicator->pMenu)
126
 
                g_object_ref_sink (pIndicator->pMenu);
 
126
                g_object_unref (pIndicator->pMenu);
127
127
        g_print ("done.\n");
128
128
        g_free (pIndicator);
129
129
}
140
140
        if (cStatusIcon == NULL)
141
141
                return;
142
142
        
143
 
        gchar *cIconPath = cairo_dock_search_icon_s_path (cStatusIcon);
 
143
        const gchar *cIconName = cStatusIcon;
 
144
        gchar *tmp_icon_name = NULL;
 
145
        gchar *cIconPath = cairo_dock_search_icon_s_path (cIconName);  // on regarde si l'icone sera trouvee.
144
146
        gchar *cIconPathFallback = NULL;
 
147
        if (cIconPath == NULL)  // l'icone ne sera pas trouvee, on regarde si ce n'est pas une icone en carton d'Ubuntu.
 
148
        {
 
149
                gchar *str = g_strstr_len (cIconName, -1, "-panel");
 
150
                if (str)
 
151
                {
 
152
                        tmp_icon_name = g_strndup (cIconName, str - cIconName);
 
153
                        cIconName = tmp_icon_name;
 
154
                        cIconPath = cairo_dock_search_icon_s_path (cIconName);
 
155
                }
 
156
        }
145
157
        if (cIconPath == NULL)  // l'icone ne sera pas trouvee, on met une icone par defaut.
146
 
                cIconPathFallback = g_strdup_printf ("%s/%s.svg", myApplet->pModule->pVisitCard->cShareDataDir, cStatusIcon);
147
 
        
148
 
        g_print ("set %s\n", cIconPathFallback ? cIconPathFallback : cStatusIcon);
149
 
        CD_APPLET_SET_IMAGE_ON_MY_ICON (cIconPathFallback ? cIconPathFallback : cStatusIcon);
150
 
        
 
158
        {
 
159
                gboolean bAddSuffix = (!g_str_has_suffix (cIconName, ".png") && !g_str_has_suffix (cIconName, ".svg"));
 
160
                cIconPathFallback = g_strdup_printf ("%s/%s%s", myApplet->pModule->pVisitCard->cShareDataDir, cIconName, bAddSuffix ? ".svg" : "");
 
161
        }
 
162
        
 
163
        g_print ("set %s\n", cIconPathFallback ? cIconPathFallback : cIconName);
 
164
        CD_APPLET_SET_IMAGE_ON_MY_ICON (cIconPathFallback ? cIconPathFallback : cIconName);
 
165
        
 
166
        g_free (tmp_icon_name);
151
167
        g_free (cIconPath);
152
168
        g_free (cIconPathFallback);
153
169
}