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

« back to all changes in this revision

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

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:
41
41
static void _cd_musicplayer_next (GtkMenuItem *menu_item, gpointer *data) {
42
42
        myData.pCurrentHandeler->control (PLAYER_NEXT, NULL);
43
43
}
 
44
static void _cd_musicplayer_show_from_systray (GtkMenuItem *menu_item, gpointer *data) {
 
45
        cairo_dock_launch_command (myData.pCurrentHandeler->launch);
 
46
}
44
47
static void _cd_musicplayer_jumpbox (GtkMenuItem *menu_item, gpointer *data) {
45
48
        myData.pCurrentHandeler->control (PLAYER_JUMPBOX, NULL);
46
49
}
170
173
                        CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Next (middle-click)"), GTK_STOCK_MEDIA_NEXT, _cd_musicplayer_next, CD_APPLET_MY_MENU);
171
174
                if (myData.pCurrentHandeler->iPlayerControls & PLAYER_STOP)
172
175
                        CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Stop"), GTK_STOCK_MEDIA_STOP, _cd_musicplayer_stop, CD_APPLET_MY_MENU);
 
176
                if (myIcon->Xid == 0)  // lecteur dans le systray.
 
177
                        CD_APPLET_ADD_IN_MENU (D_("Show the Window"), _cd_musicplayer_show_from_systray, CD_APPLET_MY_MENU);
173
178
                if (myData.pCurrentHandeler->iPlayerControls & PLAYER_JUMPBOX)
174
179
                        CD_APPLET_ADD_IN_MENU (D_("Show JumpBox"), _cd_musicplayer_jumpbox, CD_APPLET_MY_MENU);
175
180
                if (myData.pCurrentHandeler->iPlayerControls & PLAYER_SHUFFLE)
208
213
        {
209
214
                if (myData.cArtist != NULL && myData.cAlbum != NULL/* && myData.pCurrentHandeler->cCoverDir != NULL*/)
210
215
                {
211
 
                        cd_debug("Le fichier est un JPEG");
 
216
                        cd_debug ("MP - Le fichier est un JPEG");
212
217
                        gchar *cDirPath = myData.pCurrentHandeler->cCoverDir ? g_strdup (myData.pCurrentHandeler->cCoverDir) : g_strdup_printf("%s/musicplayer", g_cCairoDockDataDir);
213
218
                        gchar *cCommand, *cHost = NULL;
214
219
                        gchar *cFilePath = (*CD_APPLET_RECEIVED_DATA == '/' ? g_strdup (CD_APPLET_RECEIVED_DATA) : g_filename_from_uri (CD_APPLET_RECEIVED_DATA, &cHost, NULL));
215
220
                        if (cHost != NULL)  // fichier distant, on le telecharge dans le cache du lecteur.
216
221
                        {
217
 
                                cd_debug("Le fichier est distant (sur %s)", cHost);
 
222
                                cd_debug ("MP - Le fichier est distant (sur %s)", cHost);
218
223
                                cCommand = g_strdup_printf ("wget -O \"%s/%s - %s.jpg\" '%s'",
219
224
                                        cDirPath,
220
225
                                        myData.cArtist,
223
228
                        }
224
229
                        else  // fichier local, on le copie juste dans le cache du lecteur.
225
230
                        {
226
 
                                cd_debug("Le fichier est local");
 
231
                                cd_debug ("MP - Le fichier est local");
227
232
                                cCommand = g_strdup_printf ("cp \"%s\" \"%s/%s - %s.jpg\"",
228
233
                                        cFilePath,
229
234
                                        cDirPath,
231
236
                                        myData.cAlbum);
232
237
                                
233
238
                        }
234
 
                        cd_debug ("on recupere la pochette par : '%s'", cCommand);
 
239
                        cd_debug ("MP - on recupere la pochette par : '%s'", cCommand);
235
240
                        cairo_dock_launch_command (cCommand);
236
241
                        g_free (cCommand);
237
242
                        g_free (cFilePath);
244
249
        }
245
250
        else
246
251
        {
247
 
                cd_debug ("on rajoute la chanson a la queue.");
 
252
                cd_debug ("MP - on rajoute la chanson a la queue.");
248
253
                myData.pCurrentHandeler->control (PLAYER_ENQUEUE, CD_APPLET_RECEIVED_DATA);
249
254
        }
250
255
CD_APPLET_ON_DROP_DATA_END