diff options
author | Zhang Xianwei <[email protected]> | 2018-11-11 04:23:55 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-11-14 21:10:59 +0000 |
commit | 9e7a5675cd0efb6c939ca8ed81eaee96065a7ded (patch) | |
tree | 083d786502c59e86178ad53de27fd6e2388c7295 /plugins/media-keys/msd-media-keys-manager.c | |
parent | ea4ab83ceee857effdf90f79f00ec9335a5181a5 (diff) | |
download | mate-settings-daemon-9e7a5675cd0efb6c939ca8ed81eaee96065a7ded.tar.bz2 mate-settings-daemon-9e7a5675cd0efb6c939ca8ed81eaee96065a7ded.tar.xz |
media-keys: Add labels for the rfkill OSD
Which should hopefully make the icons a bit clearer.
Signed-off-by: Zhang Xianwei <[email protected]>
Diffstat (limited to 'plugins/media-keys/msd-media-keys-manager.c')
-rw-r--r-- | plugins/media-keys/msd-media-keys-manager.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c index c267166..de37532 100644 --- a/plugins/media-keys/msd-media-keys-manager.c +++ b/plugins/media-keys/msd-media-keys-manager.c @@ -581,7 +581,8 @@ do_eject_action (MsdMediaKeysManager *manager) /* Show the dialogue */ dialog_init (manager); msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), - "media-eject"); + "media-eject", + NULL); dialog_show (manager); /* Clean up the drive selection and exit if no suitable @@ -606,7 +607,8 @@ do_touchpad_osd_action (MsdMediaKeysManager *manager, gboolean state) { dialog_init (manager); msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), - state ? "input-touchpad" : "touchpad-disabled"); + state ? "input-touchpad" : "touchpad-disabled", + NULL); dialog_show (manager); } @@ -844,14 +846,21 @@ set_rfkill_complete (GObject *object, g_debug ("Finished changing rfkill, property %s is now %s", data->property, data->target_state ? "true" : "false"); - if (data->bluetooth) - msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (data->manager->priv->dialog), - data->target_state ? "bluetooth-disabled-symbolic" - : "bluetooth-active-symbolic"); - else - msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (data->manager->priv->dialog), - data->target_state ? "airplane-mode-symbolic" - : "network-wireless-signal-excellent-symbolic"); + if (data->bluetooth){ + if (data->target_state) + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (data->manager->priv->dialog), + "bluetooth-disabled-symbolic", _("Bluetooth disabled")); + else + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (data->manager->priv->dialog), + "bluetooth-active-symbolic", _("Bluetooth enabled")); + } else { + if (data->target_state) + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (data->manager->priv->dialog), + "airplane-mode-symbolic", _("Airplane mode enabled")); + else + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (data->manager->priv->dialog), + "network-wireless-signal-excellent-symbolic", _("Airplane mode disabled")); + } dialog_show (data->manager); out: g_free (data->property); @@ -880,7 +889,8 @@ do_rfkill_action (MsdMediaKeysManager *manager, if (get_rfkill_property (manager, hw_mode)) { msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), - "airplane-mode-symbolic"); + "airplane-mode-symbolic", + _("Hardware Airplane Mode")); dialog_show (manager); return; } |