~ubuntu-branches/ubuntu/oneiric/cairo-dock-plug-ins/oneiric-updates

« back to all changes in this revision

Viewing changes to powermanager/src/powermanager-menu-functions.c

  • Committer: Kees Cook
  • Date: 2011-08-11 23:17:39 UTC
  • mfrom: (20.1.1 cairo-dock-plug-ins)
  • Revision ID: kees@outflux.net-20110811231739-cteedan51tmdg77v
Tags: 2.4.0~0beta2-0ubuntu1
releasing version 2.4.0~0beta2-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include <stdlib.h>
21
21
#include <glib/gi18n.h>
22
22
 
23
 
#include "powermanager-dbus.h"
 
23
#include "powermanager-upower.h"
24
24
#include "powermanager-draw.h"
25
25
#include "powermanager-struct.h"
26
26
#include "powermanager-menu-functions.h"
28
28
 
29
29
CD_APPLET_ON_CLICK_BEGIN
30
30
        cairo_dock_remove_dialog_if_any (myIcon);
31
 
        cd_powermanager_bubble();
 
31
        cd_powermanager_bubble ();
32
32
CD_APPLET_ON_CLICK_END
33
33
 
34
34
static void power_config (void) {  /// a mettre dans les plug-ins d'integration.
39
39
        }
40
40
        else if (g_iDesktopEnv == CAIRO_DOCK_KDE)
41
41
        {
42
 
                //Ajouter les lignes de KDE
 
42
                /// Ajouter les lignes de KDE...
43
43
        }
44
44
        if (erreur != NULL)
45
45
        {
52
52
CD_APPLET_ON_BUILD_MENU_BEGIN
53
53
        // Sub-Menu
54
54
        GtkWidget *pSubMenu = CD_APPLET_CREATE_MY_SUB_MENU ();
55
 
        CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Set up power management"), MY_APPLET_SHARE_DATA_DIR"/default-battery.svg", power_config, CD_APPLET_MY_MENU);
56
 
        if (myData.dbus_enable)
57
 
        {
58
 
                CD_APPLET_ADD_IN_MENU (D_("Halt"), power_halt, pSubMenu);
59
 
                CD_APPLET_ADD_IN_MENU (D_("Hibernate"), power_hibernate, pSubMenu);
60
 
                CD_APPLET_ADD_IN_MENU (D_("Suspend"), power_suspend, pSubMenu);
61
 
                CD_APPLET_ADD_IN_MENU (D_("Reboot"), power_reboot, pSubMenu);
62
 
        }
 
55
        if (g_iDesktopEnv == CAIRO_DOCK_GNOME)  /// TODO: other DE...
 
56
                CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Set up power management"), MY_APPLET_SHARE_DATA_DIR"/default-battery.svg", power_config, CD_APPLET_MY_MENU);
 
57
        if (cd_power_can_hibernate ())
 
58
                CD_APPLET_ADD_IN_MENU (D_("Hibernate"), cd_power_hibernate, pSubMenu);
 
59
        if (cd_power_can_suspend ())
 
60
                CD_APPLET_ADD_IN_MENU (D_("Suspend"), cd_power_suspend, pSubMenu);
63
61
        CD_APPLET_ADD_SEPARATOR (pSubMenu);
64
62
        CD_APPLET_ADD_ABOUT_IN_MENU (pSubMenu);
65
63
CD_APPLET_ON_BUILD_MENU_END