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

« back to all changes in this revision

Viewing changes to Scooby-Do/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:
141
141
{
142
142
        if (pIcon == myData.pCurrentIcon && ! myData.bIgnoreIconState)
143
143
        {
144
 
                g_print ("notre icone vient de se faire stopper\n");
 
144
                cd_debug ("notre icone vient de se faire stopper\n");
145
145
                myData.pCurrentIcon = NULL;
146
146
                myData.pCurrentDock = NULL;
147
147
                
253
253
        
254
254
        const gchar *cKeyName = gdk_keyval_name (iKeyVal);
255
255
        guint32 iUnicodeChar = gdk_keyval_to_unicode (iKeyVal);
256
 
        g_print ("+ cKeyName : %s (%c, %s)\n", cKeyName, iUnicodeChar, string);
 
256
        cd_debug ("+ cKeyName : %s (%c, %s)\n", cKeyName, iUnicodeChar, string);
257
257
        
258
258
        if (iKeyVal == GDK_Escape)  // on clot la session.
259
259
        {
295
295
        {
296
296
                if (myData.iNbValidCaracters > 0)
297
297
                {
298
 
                        g_print ("on efface la derniere lettre de %s %d/%d\n", myData.sCurrentText->str, myData.iNbValidCaracters, myData.sCurrentText->len);
 
298
                        cd_debug ("on efface la derniere lettre de %s %d/%d\n", myData.sCurrentText->str, myData.iNbValidCaracters, myData.sCurrentText->len);
299
299
                        if (myData.iNbValidCaracters == myData.sCurrentText->len)  // pas de completion en cours => on efface la derniere lettre tapee.
300
300
                                myData.iNbValidCaracters --;
301
301
                        
365
365
        }
366
366
        else if (iKeyVal == GDK_Return)
367
367
        {
368
 
                g_print ("Enter (%s)\n", myData.cSearchText);
 
368
                cd_debug ("Enter (%s)\n", myData.cSearchText);
369
369
                if (myData.bNavigationMode)
370
370
                {
371
371
                        if (myData.pCurrentIcon != NULL && myData.pCurrentDock != NULL)
372
372
                        {
373
 
                                g_print ("on clique sur l'icone '%s' [%d, %d]\n", myData.pCurrentIcon->cName, iModifierType, GDK_SHIFT_MASK);
 
373
                                cd_debug ("on clique sur l'icone '%s' [%d, %d]\n", myData.pCurrentIcon->cName, iModifierType, GDK_SHIFT_MASK);
374
374
                                
375
375
                                myData.bIgnoreIconState = TRUE;
376
376
                                if (iModifierType & GDK_MOD1_MASK)  // ALT
416
416
                        else if (myData.pListing && myData.pListing->pCurrentEntry)  // pas d'appli mais une entree => on l'execute.
417
417
                        {
418
418
                                CDEntry *pEntry = myData.pListing->pCurrentEntry->data;
419
 
                                g_print ("on valide l'entree '%s ; %s'\n", pEntry->cName, pEntry->cPath);
 
419
                                cd_debug ("on valide l'entree '%s ; %s'\n", pEntry->cName, pEntry->cPath);
420
420
                                if (pEntry->execute)
421
421
                                        pEntry->execute (pEntry);
422
422
                                else
424
424
                        }
425
425
                        else if (myData.iNbValidCaracters > 0)  // pas d'entree mais du texte => on l'execute tel quel.
426
426
                        {
427
 
                                g_print ("on execute '%s'\n", myData.sCurrentText->str);
 
427
                                cd_debug ("on execute '%s'\n", myData.sCurrentText->str);
428
428
                                cairo_dock_launch_command (myData.sCurrentText->str);
429
429
                        }
430
430
                        
441
441
                        {
442
442
                                if (myData.pCurrentIcon != NULL && myData.pCurrentIcon->pSubDock != NULL)
443
443
                                {
444
 
                                        g_print ("on monte dans le sous-dock %s\n", myData.pCurrentIcon->cName);
 
444
                                        cd_debug ("on monte dans le sous-dock %s\n", myData.pCurrentIcon->cName);
445
445
                                        Icon *pIcon = cairo_dock_get_first_icon (myData.pCurrentIcon->pSubDock->icons);
446
446
                                        cd_do_change_current_icon (pIcon, myData.pCurrentIcon->pSubDock);
447
447
                                }
454
454
                                        Icon *pPointingIcon = cairo_dock_search_icon_pointing_on_dock (myData.pCurrentDock, &pParentDock);
455
455
                                        if (pPointingIcon != NULL)
456
456
                                        {
457
 
                                                g_print ("on redescend dans le dock parent via %s\n", pPointingIcon->cName);
 
457
                                                cd_debug ("on redescend dans le dock parent via %s\n", pPointingIcon->cName);
458
458
                                                cd_do_change_current_icon (pPointingIcon, pParentDock);
459
459
                                        }
460
460
                                }
482
482
                                                pPrevIcon = cairo_dock_get_last_icon (myData.pCurrentDock->icons);
483
483
                                        }
484
484
                                        
485
 
                                        g_print ("on se deplace a gauche sur %s\n", pPrevIcon ? pPrevIcon->cName : "none");
 
485
                                        cd_debug ("on se deplace a gauche sur %s\n", pPrevIcon ? pPrevIcon->cName : "none");
486
486
                                        cd_do_change_current_icon (pPrevIcon, myData.pCurrentDock);
487
487
                                }
488
488
                        }
509
509
                                                pNextIcon = cairo_dock_get_first_icon (myData.pCurrentDock->icons);
510
510
                                        }
511
511
                                        
512
 
                                        g_print ("on se deplace a gauche sur %s\n", pNextIcon ? pNextIcon->cName : "none");
 
512
                                        cd_debug ("on se deplace a gauche sur %s\n", pNextIcon ? pNextIcon->cName : "none");
513
513
                                        cd_do_change_current_icon (pNextIcon, myData.pCurrentDock);
514
514
                                }
515
515
                        }
545
545
                        if (myData.pCurrentDock == NULL)  // on initialise le deplacement.
546
546
                                myData.pCurrentDock = g_pMainDock;
547
547
                        Icon *pIcon = (iKeyVal == GDK_Page_Up || iKeyVal == GDK_Home ? cairo_dock_get_first_icon (myData.pCurrentDock->icons) : cairo_dock_get_last_icon (myData.pCurrentDock->icons));
548
 
                        g_print ("on se deplace a l'extremite sur %s\n", pIcon ? pIcon->cName : "none");
 
548
                        cd_debug ("on se deplace a l'extremite sur %s\n", pIcon ? pIcon->cName : "none");
549
549
                        cd_do_change_current_icon (pIcon, myData.pCurrentDock);
550
550
                }
551
551
                else if (myData.pListing != NULL)
560
560
        {
561
561
                if (! myData.bNavigationMode && myData.pListing != NULL && GTK_WIDGET_VISIBLE (myData.pListing->container.pWidget))
562
562
                {
563
 
                        g_print ("modification du filtre : option n°%d", iKeyVal - GDK_F1);
 
563
                        cd_debug ("modification du filtre : option n°%d", iKeyVal - GDK_F1);
564
564
                        cd_do_activate_filter_option (iKeyVal - GDK_F1);
565
565
                        cairo_dock_redraw_container (CAIRO_CONTAINER (myData.pListing));
566
566
                }
567
567
        }
568
568
        else if (string)  /// utiliser l'unichar ...
569
569
        {
570
 
                g_print ("string:'%s'\n", string);
 
570
                cd_debug ("string:'%s'\n", string);
571
571
                int iNbNewChar = 0;
572
572
                if ((iModifierType & GDK_CONTROL_MASK) && iUnicodeChar == 'v')  // CTRL+v
573
573
                {
574
 
                        g_print ("CTRL+v\n");
 
574
                        cd_debug ("CTRL+v\n");
575
575
                        GtkClipboard *pClipBoard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
576
576
                        gchar *cText = gtk_clipboard_wait_for_text (pClipBoard);  // la main loop s'execute pendant ce temps.
577
577
                        if (cText != NULL)
578
578
                        {
579
 
                                g_print ("clipboard : '%s'\n", cText);
 
579
                                cd_debug ("clipboard : '%s'\n", cText);
580
580
                                iNbNewChar = strlen (cText);  /// penser a l'UTF-8 ...
581
581
                                gchar *str = strchr (cText, '\r');
582
582
                                if (str)