aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIain Lane <iain.lane@canonical.com>2014-04-15 14:08:08 +0100
committerIain Lane <iain.lane@canonical.com>2014-04-15 14:08:08 +0100
commitb36744ef3a292f8027d90ebecded9f751c199af7 (patch)
tree3b1dfb5ff3f62b25abbeefa642674596690e4246 /src
parent58ed2f8a5c1b7dd6941adcf8e55f13d1b6706866 (diff)
downloadayatana-indicator-power-b36744ef3a292f8027d90ebecded9f751c199af7.tar.gz
ayatana-indicator-power-b36744ef3a292f8027d90ebecded9f751c199af7.tar.bz2
ayatana-indicator-power-b36744ef3a292f8027d90ebecded9f751c199af7.zip
Don't add the brightness entry to the phone profile; it's been removed by design
Diffstat (limited to 'src')
-rw-r--r--src/service.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/service.c b/src/service.c
index 00efe9b..46ad802 100644
--- a/src/service.c
+++ b/src/service.c
@@ -491,24 +491,6 @@ percentage_to_brightness (IndicatorPowerService * self, double percentage)
return (int)(lo + (percentage*(hi-lo)));
}
-static GMenuItem *
-create_brightness_menuitem (IndicatorPowerService * self)
-{
- int lo, hi;
- GMenuItem * item;
-
- get_brightness_range (self, &lo, &hi);
-
- item = g_menu_item_new (NULL, "indicator.brightness");
- g_menu_item_set_attribute (item, "x-canonical-type", "s", "com.canonical.unity.slider");
- g_menu_item_set_attribute (item, "min-value", "d", brightness_to_percentage (self, lo));
- g_menu_item_set_attribute (item, "max-value", "d", brightness_to_percentage (self, hi));
- g_menu_item_set_attribute (item, "min-icon", "s", "torch-off" );
- g_menu_item_set_attribute (item, "max-icon", "s", "torch-on" );
-
- return item;
-}
-
static GVariant *
action_state_for_brightness (IndicatorPowerService * self)
{
@@ -574,18 +556,12 @@ create_desktop_settings_section (IndicatorPowerService * self G_GNUC_UNUSED)
}
static GMenuModel *
-create_phone_settings_section (IndicatorPowerService * self G_GNUC_UNUSED)
+create_phone_settings_section (IndicatorPowerService * self)
{
GMenu * section;
- GMenuItem * item;
section = g_menu_new ();
-
- item = create_brightness_menuitem (self);
- g_menu_append_item (section, item);
update_brightness_action_state (self);
- g_object_unref (item);
-
g_menu_append (section, _("Battery settingsā€¦"), "indicator.activate-phone-settings");
return G_MENU_MODEL (section);