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

« back to all changes in this revision

Viewing changes to musicPlayer/src/applet-banshee.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-10 00:05:57 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100810000557-pfxoz5w7hbyclcqh
Tags: 2.2.0~0beta4-0ubuntu1
* New Upstream Version (LP: #614625)
* Fixed a few bugs on LP:
 - LP: #483963: Dustbin applet does not display trashes on all volumes
 - LP: #485159: Some apps have problem with Systray
 - LP: #500677: ~/.xsession-errors is too much used by CD
 - LP: #500979: Shortcuts: the order gets messed up
 - LP: #521531: Mail: crashes on Maildir
 - LP: #519915: GTG: create a new applet to control GTG
 - LP: #526138: GMenu doesn't handle desktop file exec strings properly
 - LP: #531317: CMake: Added an error if the prefix of 'cairo-dock-plugins'
                 is not the same 'cairo-dock-core'
 - LP: #531319: CMake: check the version of 'cairo-dock' when building
                 'cairo-dock-plugins'
 - LP: #537115: Click at the position where icon lavel was, the icon
                 and dock still receive the event
 - LP: #537943: Terminal applet shortkey behaviour
 - LP: #538637: Trash applet doesn't create .trashinfo files on XFCE
 - More details on the 'ChangeLog' file
* debian/rules:
 - Autotools has been replaced by CMake
 - cdbs is now used.
* debian/copyright:
 - Updated with the new applets
* debian/control:
 - Autotools has been replaced by CMake
 - Added libcurl4-gnutls-dev, libindicator-dev, libdbusmenu-glib-dev
   libido-0.1-dev, libical-dev, libdbusmenu-gtk-dev as Build-deps
 - Bump Standard-Version to 3.9.1
 - Wget is required for dnd2share applet
 - Added the exact realease for 'cairo-dock-dev' in order to prevent any
    build error if this package is not already available (thx to didrocks)
* debian/cairo-dock-plug-ins*.install:
 - All sonames are now installed into lib32 or lib64 (lib*)

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
 
218
218
static void cd_banshee_getCoverPath (void)
219
219
{
220
 
        cd_debug ("%s ()\n", __func__);
 
220
        cd_debug ("MP - %s ()\n", __func__);
221
221
        GHashTable *data_list = NULL;
222
222
        GValue *value;
223
223
        GError *erreur = NULL;
238
238
                value = (GValue *) g_hash_table_lookup(data_list, "artwork-id");
239
239
                if (value != NULL && G_VALUE_HOLDS_STRING(value))
240
240
                        cString = g_value_get_string(value);
241
 
                cd_debug (" => got cover path from Banshee : '%s'\n", cString);
 
241
                cd_debug ("MP -  => got cover path from Banshee : '%s'\n", cString);
242
242
                gchar *cCoverPath = g_strdup_printf ("%s/.cache/album-art/300/%s.jpg", g_getenv ("HOME"), cString);
243
243
                if (! g_file_test  (cCoverPath, G_FILE_TEST_EXISTS))
244
244
                {
245
245
                        g_free (cCoverPath);
246
246
                        cCoverPath = g_strdup_printf ("%s/.cache/album-art/%s.jpg", g_getenv ("HOME"), cString);
247
 
                                if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS)) // path has changed :-/
 
247
                        if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS)) // path has changed :-/
 
248
                        {
 
249
                                g_free (cCoverPath);
 
250
                                cCoverPath = g_strdup_printf ("%s/.cache/media-art/300/%s.jpg", g_getenv ("HOME"), cString);
 
251
                                if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS))
248
252
                                {
249
253
                                        g_free (cCoverPath);
250
 
                                        cCoverPath = g_strdup_printf ("%s/.cache/media-art/300/%s.jpg", g_getenv ("HOME"), cString);
251
 
                                        if (! g_file_test (cCoverPath, G_FILE_TEST_EXISTS))
252
 
                                        {
253
 
                                                g_free (cCoverPath);
254
 
                                                cCoverPath = g_strdup_printf ("%s/.cache/media-art/%s.jpg", g_getenv ("HOME"), cString);
255
 
                                        }
 
254
                                        cCoverPath = g_strdup_printf ("%s/.cache/media-art/%s.jpg", g_getenv ("HOME"), cString);
256
255
                                }
 
256
                        }
257
257
                }
258
258
                cd_musicplayer_get_cover_path (cString, TRUE);  // TRUE <=> on cherche nous-meme si aucune fournie.
259
259
                g_free (cCoverPath);
273
273
                        cd_banshee_getSongInfos ();
274
274
                else if (strcmp (cMessage, "trackinfoupdated") == 0)
275
275
                {
276
 
                        cd_debug (" trackinfoupdated\n");
 
276
                        cd_debug ("MP -  trackinfoupdated\n");
277
277
                        if (myData.cCoverPath == NULL)
278
278
                        {
279
 
                                cd_debug ("  aucune pochette, on regarde si Banshee a mieux a nous proposer\n");
 
279
                                cd_debug ("MP -   aucune pochette, on regarde si Banshee a mieux a nous proposer\n");
280
280
                                cd_banshee_getCoverPath ();
281
281
                        }
282
282
                        else if (!myData.cover_exist) // le lecteur nous avait deja refile l'adresse en avance, on regarde si le fichier est desormais present.
283
283
                        {
284
284
                                cd_musiplayer_set_cover_if_present (FALSE);
285
285
                                CD_APPLET_LEAVE ();
 
286
                                //return ;
286
287
                        }
287
288
                }
288
289
                else
291
292
        }
292
293
        else
293
294
        {
294
 
                cd_debug ("message vide !\n");
 
295
                cd_debug ("MP - message vide !\n");
295
296
                g_free (myData.cPlayingUri);
296
297
                myData.cPlayingUri = NULL;
297
298
                g_free (myData.cArtist);
324
325
        gpointer invocation_hint,
325
326
        gpointer marshal_data)
326
327
{
327
 
        cd_debug ("%s ()\n", __func__);
 
328
        cd_debug ("MP - %s ()\n", __func__);
328
329
        const GValue *value;
329
330
        const gchar *cEvent = NULL;
330
331
        const gchar *cMessage = NULL;
331
 
        double fBufferingPercent;
 
332
        double fBufferingPercent=0.;
332
333
        
333
334
        value = &param_values[0];
334
335
        if (value != NULL && G_VALUE_HOLDS_STRING (value))
381
382
 */
382
383
static gboolean _cd_banshee_dbus_connect_to_bus (void)
383
384
{
384
 
        if (cairo_dock_bdus_is_enabled ())
 
385
        if (cairo_dock_dbus_is_enabled ())
385
386
        {
386
387
                myData.dbus_enable = cd_musicplayer_dbus_connect_to_bus (); // cree le proxy.
387
388
                
454
455
                case PLAYER_SHUFFLE :
455
456
                {
456
457
                        gboolean bShuffle = cairo_dock_dbus_get_integer (myData.dbus_proxy_shell, "GetShuffleMode");
457
 
                        cd_debug ("bShuffle : %d\n", bShuffle);
 
458
                        cd_debug ("MP - bShuffle : %d\n", bShuffle);
458
459
                        dbus_g_proxy_call_no_reply (myData.dbus_proxy_shell, "SetShuffleMode", 
459
460
                                G_TYPE_INT, ! bShuffle,
460
461
                                G_TYPE_INVALID,
465
466
                case PLAYER_REPEAT :
466
467
                {
467
468
                        int iRepeat = cairo_dock_dbus_get_integer (myData.dbus_proxy_shell, "GetRepeatMode");
468
 
                        cd_debug ("iRepeat : %d\n", iRepeat);
 
469
                        cd_debug ("MP - iRepeat : %d\n", iRepeat);
469
470
                        dbus_g_proxy_call_no_reply (myData.dbus_proxy_shell, "SetRepeatMode", 
470
471
                                G_TYPE_INT, (iRepeat+1)%3,
471
472
                                G_TYPE_INVALID,
498
499
                                myData.iCurrentTime = 0;
499
500
                                if (myData.iPlayingStatus == PLAYER_STOPPED && myData.pPreviousPlayingStatus != PLAYER_STOPPED)  /// utile ?...
500
501
                                {
501
 
                                        cd_debug ("LECTEUR STOPPE\n");
 
502
                                        cd_debug ("MP - LECTEUR STOPPE\n");
502
503
                                        myData.pPreviousPlayingStatus = PLAYER_STOPPED;
503
504
                                        //cd_musicplayer_dbus_detect_player ();  // ca fait redemarrer le lecteur ?!
504
505
                                        //if (! myData.bIsRunning)
534
535
                cd_musicplayer_dbus_detect_player ();  // on teste la presence de BA sur le bus <=> s'il est ouvert ou pas.
535
536
                if(myData.bIsRunning)  // player en cours d'execution, on recupere son etat.
536
537
                {
537
 
                        cd_debug ("MP : BA is running\n");
 
538
                        cd_message ("MP : BA is running\n");
538
539
                        _banshee_getPlaying();
539
540
                        cd_banshee_getSongInfos ();
540
541
                        cd_musicplayer_update_icon (TRUE);