diff options
author | Colomban Wendling <[email protected]> | 2017-03-22 10:54:41 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-03-30 14:46:06 +0200 |
commit | 2798c330871e830ea13a5c1b035b891143a31166 (patch) | |
tree | 8c29318a77f783b61fe3dca517360228d96758c9 | |
parent | 98756ee50bf5462f9ede32ff03538e6168eec59c (diff) | |
download | mate-panel-2798c330871e830ea13a5c1b035b891143a31166.tar.bz2 mate-panel-2798c330871e830ea13a5c1b035b891143a31166.tar.xz |
Simplify panel description shown when switching panels with the WM
Fixes #530.
-rw-r--r-- | mate-panel/panel-toplevel.c | 65 |
1 files changed, 8 insertions, 57 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index 34cc241d..badc595d 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -1611,73 +1611,24 @@ void panel_toplevel_update_edges(PanelToplevel* toplevel) static const char* panel_toplevel_construct_description(PanelToplevel *toplevel) { - int orientation, type; - - static const char *description[4][4] = { - { - /* translators: these string will be shown in MetaCity's switch window - * popup when you pass the focus to a panel */ - N_("Top Expanded Edge Panel"), - N_("Top Centered Panel"), - N_("Top Floating Panel"), - N_("Top Edge Panel"), - }, - - { - N_("Bottom Expanded Edge Panel"), - N_("Bottom Centered Panel"), - N_("Bottom Floating Panel"), - N_("Bottom Edge Panel"), - }, - - { - N_("Left Expanded Edge Panel"), - N_("Left Centered Panel"), - N_("Left Floating Panel"), - N_("Left Edge Panel"), - }, - - { - N_("Right Expanded Edge Panel"), - N_("Right Centered Panel"), - N_("Right Floating Panel"), - N_("Right Edge Panel"), - }, - }; - if (toplevel->priv->attached) return _("Drawer"); switch (toplevel->priv->orientation) { case PANEL_ORIENTATION_TOP: - orientation = 0; - break; + /* translators: these string will be shown in MetaCity's switch window + * popup when you pass the focus to a panel */ + return _("Top Panel"); case PANEL_ORIENTATION_BOTTOM: - orientation = 1; - break; + return _("Bottom Panel"); case PANEL_ORIENTATION_LEFT: - orientation = 2; - break; + return _("Left Panel"); case PANEL_ORIENTATION_RIGHT: - orientation = 3; - break; - default: - orientation = 0; - g_assert_not_reached (); - break; + return _("Right Panel"); } - if (toplevel->priv->expand) - type = 0; - else if (toplevel->priv->x_centered || - toplevel->priv->y_centered) - type = 1; - else if (toplevel->priv->floating) - type = 2; - else - type = 3; - - return _(description[orientation][type]); + g_assert_not_reached (); + return _("Top Panel"); } static void panel_toplevel_update_description(PanelToplevel* toplevel) |