~cairo-dock-team/ubuntu/natty/cairo-dock-plug-ins/2.3.0-2.1

« back to all changes in this revision

Viewing changes to mail/src/cd-mail-applet-init.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-10 00:05:57 UTC
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20100810000557-htcyq9gwo5f7r6ec
Tags: upstream-2.2.0~0beta4
ImportĀ upstreamĀ versionĀ 2.2.0~0beta4

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "cd-mail-applet-init.h"
31
31
 
32
32
 
33
 
CD_APPLET_PRE_INIT_BEGIN (N_("mail"),
 
33
CD_APPLET_DEFINE_BEGIN (N_("mail"),
34
34
        2, 0, 0,
35
 
        CAIRO_DOCK_CATEGORY_ACCESSORY,
 
35
        CAIRO_DOCK_CATEGORY_APPLET_INTERNET,
36
36
        N_("This applet is very useful to warn you when you get new e-mails\n"
37
37
        "It can check in any kind of mailbox (yahoo, gmail, etc)\n"
38
38
        "Left-click to launch the prefered mail application,\n"
39
39
        "Middle-click to refresh all the mailboxes."),
40
 
        "Tofe (Christophe Chapuis) & Fabounet (Fabrice Rey)")
 
40
        "Tofe (Christophe Chapuis) & Fabounet (Fabrice Rey)")
41
41
        CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
42
42
        pInterface->load_custom_widget = cd_mail_load_custom_widget;
43
43
        pInterface->save_custom_widget = cd_mail_save_custom_widget;
44
 
CD_APPLET_PRE_INIT_END
 
44
CD_APPLET_DEFINE_END
45
45
 
46
46
 
47
47
GLuint cd_mail_load_cube_calllist (void)
101
101
static void _load_theme (CairoDockModuleInstance *myApplet, GError **erreur)
102
102
{
103
103
        //\_______________ On charge le theme si necessaire, avec en priorite les images utilisateur.
 
104
        if (myConfig.cNoMailUserImage != NULL)
 
105
        {
 
106
                gchar *cPath = cairo_dock_search_icon_s_path (myConfig.cNoMailUserImage);
 
107
                if (! g_file_test (cPath, G_FILE_TEST_EXISTS))
 
108
                {
 
109
                        g_free (myConfig.cNoMailUserImage);
 
110
                        myConfig.cNoMailUserImage = NULL;
 
111
                }
 
112
                g_free (cPath);
 
113
        }
 
114
        if (myConfig.cHasMailUserImage != NULL)
 
115
        {
 
116
                gchar *cPath = cairo_dock_search_icon_s_path (myConfig.cHasMailUserImage);
 
117
                if (! g_file_test (cPath, G_FILE_TEST_EXISTS))
 
118
                {
 
119
                        g_free (myConfig.cHasMailUserImage);
 
120
                        myConfig.cHasMailUserImage = NULL;
 
121
                }
 
122
                g_free (cPath);
 
123
        }
104
124
        if (myConfig.cThemePath != NULL && (myConfig.cNoMailUserImage == NULL || myConfig.cHasMailUserImage == NULL))
105
125
        {
106
126
                GError *tmp_erreur = NULL;
190
210
                g_error_free (erreur);
191
211
                return;
192
212
        }
193
 
        
 
213
        /**
194
214
        //\_______________ On gere l'appli 'mail'
195
215
        if (myConfig.bStealTaskBarIcon)
196
 
                CD_APPLET_MANAGE_APPLICATION (myConfig.cMailClass ? myConfig.cMailClass : myConfig.cMailApplication);
 
216
                CD_APPLET_MANAGE_APPLICATION (myConfig.cMailClass ? myConfig.cMailClass : myConfig.cMailApplication);*/
197
217
        
198
218
        //\_______________ On initialise tous les comptes et on lance un timer pour chacun.
199
219
        cd_mail_init_accounts(myApplet);
219
239
        CD_APPLET_UNREGISTER_FOR_SCROLL_EVENT;
220
240
        CD_APPLET_UNREGISTER_FOR_UPDATE_ICON_EVENT;
221
241
        
222
 
        CD_APPLET_MANAGE_APPLICATION (NULL);
 
242
        ///CD_APPLET_MANAGE_APPLICATION (NULL);
223
243
CD_APPLET_STOP_END
224
244
 
225
245
 
226
246
CD_APPLET_RELOAD_BEGIN
227
247
 
228
 
        if (myDesklet)
229
 
        {
230
 
                CD_APPLET_SET_DESKLET_RENDERER ("Simple");
231
 
        }
232
 
 
233
248
        //\_______________ On recharge les donnees qui ont pu changer.
234
249
        if (CD_APPLET_MY_CONFIG_CHANGED )
235
250
        {
236
251
                CD_APPLET_UNREGISTER_FOR_UPDATE_ICON_EVENT;
237
252
                
238
 
                if (myConfig.bStealTaskBarIcon)
 
253
                /**if (myConfig.bStealTaskBarIcon)
239
254
                        CD_APPLET_MANAGE_APPLICATION (myConfig.cMailClass ? myConfig.cMailClass : myConfig.cMailApplication);
240
255
                else
241
 
                        CD_APPLET_MANAGE_APPLICATION (NULL);
 
256
                        CD_APPLET_MANAGE_APPLICATION (NULL);*/
242
257
                
243
258
                GError *erreur = NULL;
244
259
                _load_theme (myApplet, &erreur);