~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.3.0-3

« back to all changes in this revision

Viewing changes to Dbus/src/applet-dbus.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:
146
146
        gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER);
147
147
        gchar *cDistantPackagesDir = g_strdup_printf ("%s/%d.%d.%d", CD_DBUS_APPLETS_FOLDER, g_iMajorVersion, g_iMinorVersion, g_iMicroVersion);
148
148
        gchar *cPath = cairo_dock_get_package_path (cModuleName, cSharePackagesDir, cUserPackagesDir, cDistantPackagesDir,  CAIRO_DOCK_UPDATED_PACKAGE);
149
 
        g_print ("*** update of the applet '%s' -> got '%s'\n", cModuleName, cPath);
 
149
        cd_debug ("*** update of the applet '%s' -> got '%s'\n", cModuleName, cPath);
150
150
        g_free (cPath);
151
151
        g_free (cSharePackagesDir);
152
152
        g_free (cUserPackagesDir);
161
161
        
162
162
        if (pModule->pInstancesList != NULL)  // applet active => on la recharge.
163
163
        {
164
 
                g_print ("*** applet '%s' is active, reload it\n", cModuleName);
 
164
                cd_debug ("*** applet '%s' is active, reload it", cModuleName);
165
165
                CairoDockModuleInstance *pModuleInstance = pModule->pInstancesList->data;
166
166
                Icon *pIcon = pModuleInstance->pIcon;
167
167
                CairoContainer *pContainer = pModuleInstance->pContainer;
193
193
        //cairo_dock_free_task (pUpdateTask);
194
194
        return TRUE;
195
195
}
196
 
static void _check_update_theme (const gchar *cModuleName, CairoDockPackage *pPackage, gpointer data)
 
196
static void _check_update_package (const gchar *cModuleName, CairoDockPackage *pPackage, gpointer data)
197
197
{
198
 
        g_print ("*** %s (%s, %d)\n", __func__, cModuleName, pPackage->iType);
 
198
        cd_message ("*** %s (%s, %d)", __func__, cModuleName, pPackage->iType);
199
199
        if (pPackage->iType == CAIRO_DOCK_UPDATED_PACKAGE)
200
200
        {
201
201
                gchar *cUserDirPath = g_strdup_printf ("%s/%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER, cModuleName);
202
202
                if (g_file_test (cUserDirPath, G_FILE_TEST_EXISTS))
203
203
                {
204
 
                        g_print ("*** the applet '%s' needs to be updated\n", cModuleName);
 
204
                        cd_message ("*** the applet '%s' needs to be updated", cModuleName);
205
205
                        CairoDockTask *pUpdateTask = cairo_dock_new_task_full (0, (CairoDockGetDataAsyncFunc) _get_package_path, (CairoDockUpdateSyncFunc) _apply_package_update, (GFreeFunc) g_free, g_strdup (cModuleName));
206
206
                        myData.pUpdateTasksList = g_list_prepend (myData.pUpdateTasksList, pUpdateTask);
207
207
                        cairo_dock_launch_task (pUpdateTask);
212
212
{
213
213
        if (pThemesTable != NULL)
214
214
        {
215
 
                g_hash_table_foreach (pThemesTable, (GHFunc) _check_update_theme, NULL);
 
215
                g_hash_table_foreach (pThemesTable, (GHFunc) _check_update_package, NULL);
216
216
        }
217
217
        cairo_dock_free_task (myData.pGetListTask);
218
218
        myData.pGetListTask = NULL;
240
240
        g_idle_add ((GSourceFunc) _cd_dbus_launch_third_party_applets, NULL);  // on les lance avec un delai, car si l'applet DBus est lancee au demarrage du dock, on est dans la fonction cairo_dock_activate_modules_from_list(), et donc si on enregistre des applets pendant ce temps, le dock risque de recharger certaines des applets distantes (celles qui seront actives en conf et qui viendront apres DBus).
241
241
        
242
242
        // on telecharge en tache de fond la liste des applets.
243
 
        gchar *cSharePackagesDir = g_strdup_printf ("%s/%s", MY_APPLET_SHARE_DATA_DIR, CD_DBUS_APPLETS_FOLDER);
 
243
        const gchar *cSharePackagesDir = NULL;  // MY_APPLET_SHARE_DATA_DIR"/"CD_DBUS_APPLETS_FOLDER;
244
244
        gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER);
245
245
        gchar *cDistantPackagesDir = g_strdup_printf ("%s/%d.%d.%d", CD_DBUS_APPLETS_FOLDER, g_iMajorVersion, g_iMinorVersion, g_iMicroVersion);
246
246
        myData.pGetListTask = cairo_dock_list_packages_async (cSharePackagesDir, cUserPackagesDir, cDistantPackagesDir, (CairoDockGetPackagesFunc) _on_got_list, NULL);
247
 
        g_free (cSharePackagesDir);
248
247
        g_free (cUserPackagesDir);
249
248
        g_free (cDistantPackagesDir);
250
249
}
345
344
{
346
345
        if (! myConfig.bEnableNewModule)
347
346
                return FALSE;
348
 
        g_print ("%s (%s)\n", __func__, cModuleName);
 
347
        cd_message ("%s (%s)", __func__, cModuleName);
349
348
        
350
349
        //\____________ on cree et on enregistre un nouveau module s'il n'existe pas deja.
351
350
        CairoDockModule *pModule = cairo_dock_find_module_from_name (cModuleName);