~ubuntu-branches/ubuntu/precise/xfce4-power-manager/precise

« back to all changes in this revision

Viewing changes to src/xfpm-tray-icon.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2009-10-02 20:15:41 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091002201541-ognqyxyov51epj84
Tags: 0.8.4-1ubuntu1
* New upstream bugfix release (LP: #438754), merge from Debian unstable,
  remaining Ubuntu changes:
  - debian/patches:
    + xubuntu-use-notification-icons.patch: use our notification-* icons for
      notification bubbles instead of the normal ones LP: #437374
    + 10_pc.patch: added patched files to POTFILES.skip
    + series: created, with these two patches
  - debian/rules: add --with quilt
  - debian/control: build-depends on quilt (>= 0.46-7).

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include "libxfpm/xfpm-common.h"
36
36
#include "libxfpm/xfpm-string.h"
37
37
#include "libxfpm/xfpm-notify.h"
 
38
#include "libxfpm/xfpm-icons.h"
38
39
 
39
40
#include "xfpm-tray-icon.h"
40
41
#include "xfpm-shutdown.h"
263
264
                  NULL);
264
265
    
265
266
    // Hibernate menu option
266
 
    mi = gtk_image_menu_item_new_with_label(_("Hibernate"));
267
 
    img = gtk_image_new_from_icon_name("xfpm-hibernate",GTK_ICON_SIZE_MENU);
268
 
    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi),img);
269
 
    gtk_widget_set_sensitive(mi,FALSE);
 
267
    mi = gtk_image_menu_item_new_with_label (_("Hibernate"));
 
268
    img = gtk_image_new_from_icon_name (XFPM_HIBERNATE_ICON, GTK_ICON_SIZE_MENU);
 
269
    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(mi), img);
 
270
    gtk_widget_set_sensitive (mi,FALSE);
270
271
    
271
272
    if ( caller && can_hibernate && tray->priv->data_available )
272
273
    {
279
280
    
280
281
    // Suspend menu option
281
282
    mi = gtk_image_menu_item_new_with_label(_("Suspend"));
282
 
    img = gtk_image_new_from_icon_name("xfpm-suspend",GTK_ICON_SIZE_MENU);
 
283
    img = gtk_image_new_from_icon_name (XFPM_SUSPEND_ICON, GTK_ICON_SIZE_MENU);
283
284
    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi),img);
284
285
    
285
286
    gtk_widget_set_sensitive(mi,FALSE);
293
294
    gtk_menu_shell_append(GTK_MENU_SHELL(menu),mi);
294
295
 
295
296
    saver_inhibited = xfpm_screen_saver_get_inhibit (tray->priv->srv);
296
 
    mi = gtk_image_menu_item_new_with_label (saver_inhibited ? _("Clear inhibit") : _("Inhibit"));
297
 
    
298
 
    gtk_widget_set_tooltip_text (mi, _("Disable or enable automatic sleep, setting this will tell the power manager "\
299
 
                                       "to disable backlight sleep, for example you could active the inhibit if you are watching a movie."));
 
297
    mi = gtk_check_menu_item_new_with_label (_("Monitor power control"));
 
298
    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi), !saver_inhibited);
 
299
    gtk_widget_set_tooltip_text (mi, _("Disable or enable monitor power control, "\
 
300
                                       "for example you could disable the screen power "\
 
301
                                       "control to avoid screen blanking when watching a movie."));
300
302
    
301
303
    g_signal_connect (G_OBJECT (mi), "activate",
302
304
                      G_CALLBACK (xfpm_tray_icon_inhibit_active_cb), tray);