~ubuntu-branches/ubuntu/oneiric/cairo-dock/oneiric-201106091216

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-applet-canvas.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2011-03-17 14:08:48 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20110317140848-b8efysl4ynhjm87k
Tags: 2.3.0~1-0ubuntu1
* New Upstream Version (LP: #723994)
* Upstream short ChangeLog:
 - Updated translations
 - Updated the integration of the new versions of kwin and compiz
 - Updated default theme
 - Fixed a few bugs
 - Updated the man
* debian/control:
 - Added suggests apps for cairo-dock-core (needed by the default theme)
 - Updated the description (from launchpad.net/cairo-dock)
 - Added cairo-dock-plug-ins as a new suggestion for cairo-dock-core
* debian/patches:
 - Updated the default theme to use default apps of Ubuntu Natty 
* Switch to dpkg-source 3.0 (quilt) format
* Removed the desktop-file-category patch (sync with debian packages)
* debian/rules:
 - Added a CMake flag to disable the gtk grip
 - No longer used simple-patchsys
* Updated the debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
CD_APPLET_DEFINE_END
176
176
 
177
177
 
178
 
#define CD_APPLET_ATTACH_TO_INTERNAL_MODULE(cInternalModuleName) cairo_dock_attach_to_another_module (pVisitCard, cInternalModuleName)
 
178
#define CD_APPLET_EXTEND_MANAGER(cManagerName) gldi_extend_manager (pVisitCard, cManagerName)
179
179
 
180
180
//\______________________ init.
181
181
/** Debut de la fonction d'initialisation de l'applet (celle qui est appelee a chaque chargement de l'applet).
296
296
        if (pClickedIcon == myIcon || (myIcon != NULL && pClickedContainer == CAIRO_CONTAINER (myIcon->pSubDock)) || pClickedContainer == CAIRO_CONTAINER (myDesklet)) \
297
297
        { \
298
298
                GtkWidget *pMenuItem, *image; \
299
 
                pMenuItem = gtk_separator_menu_item_new (); \
300
 
                gtk_menu_shell_append(GTK_MENU_SHELL (pAppletMenu), pMenuItem);
 
299
                if (pClickedIcon == myIcon) {\
 
300
                        pMenuItem = gtk_separator_menu_item_new (); \
 
301
                        gtk_menu_shell_append(GTK_MENU_SHELL (pAppletMenu), pMenuItem); }
301
302
/** Fin de la fonction de notification de construction du menu. Par defaut elle intercepte la notification si elle l'a recue.
302
303
*/
303
304
#define CD_APPLET_ON_BUILD_MENU_END \
426
427
//\______________________ notification clique gauche.
427
428
/** Abonne l'applet aux notifications du clic gauche. A effectuer lors de l'init de l'applet.
428
429
*/
429
 
#define CD_APPLET_REGISTER_FOR_CLICK_EVENT cairo_dock_register_notification (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_CLICK_FUNC, CAIRO_DOCK_RUN_AFTER, myApplet);
 
430
#define CD_APPLET_REGISTER_FOR_CLICK_EVENT cairo_dock_register_notification_on_object (&myContainersMgr, NOTIFICATION_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_CLICK_FUNC, CAIRO_DOCK_RUN_AFTER, myApplet);
430
431
/** Desabonne l'applet aux notifications du clic gauche. A effectuer lors de l'arret de l'applet.
431
432
*/
432
 
#define CD_APPLET_UNREGISTER_FOR_CLICK_EVENT cairo_dock_remove_notification_func (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_CLICK_FUNC, myApplet);
 
433
#define CD_APPLET_UNREGISTER_FOR_CLICK_EVENT cairo_dock_remove_notification_func_on_object (&myContainersMgr, NOTIFICATION_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_CLICK_FUNC, myApplet);
433
434
/** Abonne l'applet aux notifications de construction du menu. A effectuer lors de l'init de l'applet.
434
435
*/
435
436
 
436
437
//\______________________ notification construction menu.
437
 
#define CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT cairo_dock_register_notification (CAIRO_DOCK_BUILD_ICON_MENU, (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet);
 
438
#define CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT cairo_dock_register_notification_on_object (&myContainersMgr, NOTIFICATION_BUILD_ICON_MENU, (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet);
438
439
/** Desabonne l'applet aux notifications de construction du menu. A effectuer lors de l'arret de l'applet.
439
440
*/
440
 
#define CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT cairo_dock_remove_notification_func (CAIRO_DOCK_BUILD_ICON_MENU, (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU_FUNC, myApplet);
 
441
#define CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT cairo_dock_remove_notification_func_on_object (&myContainersMgr, NOTIFICATION_BUILD_ICON_MENU, (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU_FUNC, myApplet);
441
442
 
442
443
//\______________________ notification clic milieu.
443
444
/** Abonne l'applet aux notifications du clic du milieu. A effectuer lors de l'init de l'applet.
444
445
*/
445
 
#define CD_APPLET_REGISTER_FOR_MIDDLE_CLICK_EVENT cairo_dock_register_notification (CAIRO_DOCK_MIDDLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK_FUNC, CAIRO_DOCK_RUN_AFTER, myApplet)
 
446
#define CD_APPLET_REGISTER_FOR_MIDDLE_CLICK_EVENT cairo_dock_register_notification_on_object (&myContainersMgr, NOTIFICATION_MIDDLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK_FUNC, CAIRO_DOCK_RUN_AFTER, myApplet)
446
447
/** Desabonne l'applet aux notifications du clic du milieu. A effectuer lors de l'arret de l'applet.
447
448
*/
448
 
#define CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT cairo_dock_remove_notification_func (CAIRO_DOCK_MIDDLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK_FUNC, myApplet)
 
449
#define CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT cairo_dock_remove_notification_func_on_object (&myContainersMgr, NOTIFICATION_MIDDLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK_FUNC, myApplet)
449
450
 
450
451
//\______________________ notification double clic.
451
452
/** Abonne l'applet aux notifications du double clic. A effectuer lors de l'init de l'applet.
452
453
*/
453
 
#define CD_APPLET_REGISTER_FOR_DOUBLE_CLICK_EVENT cairo_dock_register_notification (CAIRO_DOCK_DOUBLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_DOUBLE_CLICK_FUNC, CAIRO_DOCK_RUN_AFTER, myApplet)
 
454
#define CD_APPLET_REGISTER_FOR_DOUBLE_CLICK_EVENT do {\
 
455
        cairo_dock_listen_for_double_click (myIcon);\
 
456
        cairo_dock_register_notification_on_object (&myContainersMgr, NOTIFICATION_DOUBLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_DOUBLE_CLICK_FUNC, CAIRO_DOCK_RUN_AFTER, myApplet); } while (0)
454
457
/** Desabonne l'applet aux notifications du double clic. A effectuer lors de l'arret de l'applet.
455
458
*/
456
 
#define CD_APPLET_UNREGISTER_FOR_DOUBLE_CLICK_EVENT cairo_dock_remove_notification_func (CAIRO_DOCK_DOUBLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_DOUBLE_CLICK_FUNC, myApplet)
 
459
#define CD_APPLET_UNREGISTER_FOR_DOUBLE_CLICK_EVENT do {\
 
460
        cairo_dock_remove_notification_func_on_object (&myContainersMgr, NOTIFICATION_DOUBLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_DOUBLE_CLICK_FUNC, myApplet);\
 
461
        cairo_dock_stop_listening_for_double_click (myIcon); } while (0)
457
462
 
458
463
//\______________________ notification drag'n'drop.
459
464
/** Abonne l'applet aux notifications du glisse-depose. A effectuer lors de l'init de l'applet.
460
465
*/
461
 
#define CD_APPLET_REGISTER_FOR_DROP_DATA_EVENT cairo_dock_register_notification (CAIRO_DOCK_DROP_DATA, (CairoDockNotificationFunc) CD_APPLET_ON_DROP_DATA_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet);
 
466
#define CD_APPLET_REGISTER_FOR_DROP_DATA_EVENT cairo_dock_register_notification_on_object (&myContainersMgr, NOTIFICATION_DROP_DATA, (CairoDockNotificationFunc) CD_APPLET_ON_DROP_DATA_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet);
462
467
/** Desabonne l'applet aux notifications du glisse-depose. A effectuer lors de l'arret de l'applet.
463
468
*/
464
 
#define CD_APPLET_UNREGISTER_FOR_DROP_DATA_EVENT cairo_dock_remove_notification_func (CAIRO_DOCK_DROP_DATA, (CairoDockNotificationFunc) CD_APPLET_ON_DROP_DATA_FUNC, myApplet);
 
469
#define CD_APPLET_UNREGISTER_FOR_DROP_DATA_EVENT cairo_dock_remove_notification_func_on_object (&myContainersMgr, NOTIFICATION_DROP_DATA, (CairoDockNotificationFunc) CD_APPLET_ON_DROP_DATA_FUNC, myApplet);
465
470
 
466
471
//\______________________ notification de scroll molette.
467
472
/**
468
473
*Abonne l'applet aux notifications du clic gauche. A effectuer lors de l'init de l'applet.
469
474
*/
470
 
#define CD_APPLET_REGISTER_FOR_SCROLL_EVENT cairo_dock_register_notification (CAIRO_DOCK_SCROLL_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_SCROLL_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet)
 
475
#define CD_APPLET_REGISTER_FOR_SCROLL_EVENT cairo_dock_register_notification_on_object (&myContainersMgr, NOTIFICATION_SCROLL_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_SCROLL_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet)
471
476
/**
472
477
*Desabonne l'applet aux notifications du clic gauche. A effectuer lors de l'arret de l'applet.
473
478
*/
474
 
#define CD_APPLET_UNREGISTER_FOR_SCROLL_EVENT cairo_dock_remove_notification_func (CAIRO_DOCK_SCROLL_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_SCROLL_FUNC, myApplet)
 
479
#define CD_APPLET_UNREGISTER_FOR_SCROLL_EVENT cairo_dock_remove_notification_func_on_object (&myContainersMgr, NOTIFICATION_SCROLL_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_SCROLL_FUNC, myApplet)
475
480
 
476
481
//\______________________ notification de update icon.
477
482
/** Register the applet to the 'update icon' notifications of the slow rendering loop. 
478
483
*/
479
 
#define CD_APPLET_REGISTER_FOR_UPDATE_ICON_SLOW_EVENT cairo_dock_register_notification (CAIRO_DOCK_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) CD_APPLET_ON_UPDATE_ICON_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet)
 
484
#define CD_APPLET_REGISTER_FOR_UPDATE_ICON_SLOW_EVENT cairo_dock_register_notification_on_object (&myIconsMgr, NOTIFICATION_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) CD_APPLET_ON_UPDATE_ICON_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet)
480
485
/** Unregister the applet from the slow rendering loop. 
481
486
*/
482
 
#define CD_APPLET_UNREGISTER_FOR_UPDATE_ICON_SLOW_EVENT cairo_dock_remove_notification_func (CAIRO_DOCK_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) CD_APPLET_ON_UPDATE_ICON_FUNC, myApplet)
 
487
#define CD_APPLET_UNREGISTER_FOR_UPDATE_ICON_SLOW_EVENT cairo_dock_remove_notification_func_on_object (&myIconsMgr, NOTIFICATION_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) CD_APPLET_ON_UPDATE_ICON_FUNC, myApplet)
483
488
/** Register the applet to the 'update icon' notifications of the fast rendering loop. 
484
489
*/
485
 
#define CD_APPLET_REGISTER_FOR_UPDATE_ICON_EVENT cairo_dock_register_notification (CAIRO_DOCK_UPDATE_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_UPDATE_ICON_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet)
 
490
#define CD_APPLET_REGISTER_FOR_UPDATE_ICON_EVENT cairo_dock_register_notification_on_object (&myIconsMgr, NOTIFICATION_UPDATE_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_UPDATE_ICON_FUNC, CAIRO_DOCK_RUN_FIRST, myApplet)
486
491
/** Unregister the applet from the fast rendering loop. 
487
492
*/
488
 
#define CD_APPLET_UNREGISTER_FOR_UPDATE_ICON_EVENT cairo_dock_remove_notification_func (CAIRO_DOCK_UPDATE_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_UPDATE_ICON_FUNC, myApplet)
 
493
#define CD_APPLET_UNREGISTER_FOR_UPDATE_ICON_EVENT cairo_dock_remove_notification_func_on_object (&myIconsMgr, NOTIFICATION_UPDATE_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_UPDATE_ICON_FUNC, myApplet)
489
494
 
490
495
 
491
496
//\_________________________________ INSTANCE