~ubuntu-branches/ubuntu/oneiric/cairo-dock-plug-ins/oneiric-updates

« back to all changes in this revision

Viewing changes to stack/src/applet-stack.c

  • Committer: Kees Cook
  • Date: 2011-08-11 23:17:39 UTC
  • mfrom: (20.1.1 cairo-dock-plug-ins)
  • Revision ID: kees@outflux.net-20110811231739-cteedan51tmdg77v
Tags: 2.4.0~0beta2-0ubuntu1
releasing version 2.4.0~0beta2-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "applet-stack.h"
26
26
 
27
27
 
28
 
void cd_stack_check_local (CairoDockModuleInstance *myApplet, GKeyFile *pKeyFile) {
 
28
void cd_stack_check_local (CairoDockModuleInstance *myApplet, GKeyFile *pKeyFile)
 
29
{
 
30
        // be sure to not use the stack dir of another instance (it can happen when the applet is multi-instanciated, since new instances are initialized with the conf file of the first instance when they are created).
 
31
        GList *mi;
 
32
        CairoDockModuleInstance *applet;
 
33
        AppletConfig *cfg;
 
34
        for (mi = myApplet->pModule->pInstancesList; mi!= NULL; mi = mi->next)
 
35
        {
 
36
                applet = mi->data;
 
37
                if (applet == myApplet)
 
38
                        continue;
 
39
                cfg = (AppletConfig*)applet->pConfig;
 
40
                if (cfg->cStackDir && strcmp (cfg->cStackDir, myConfig.cStackDir) == 0)
 
41
                {
 
42
                        g_free (myConfig.cStackDir);
 
43
                        myConfig.cStackDir = NULL;
 
44
                }
 
45
        }
29
46
        
30
47
        if (! g_file_test (myConfig.cStackDir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_EXECUTABLE))
31
48
        {