summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2017-02-07 17:00:36 +0100
committermonsta <[email protected]>2017-02-16 14:04:17 +0300
commit8dcde1c91a62bc958d44ab8352a1ac1313c5dddd (patch)
treeceec08c661d7071641a437f732a75e73da53c73d
parent916de39b799da74197a82525c422b0c980597f4f (diff)
downloadmate-panel-8dcde1c91a62bc958d44ab8352a1ac1313c5dddd.tar.bz2
mate-panel-8dcde1c91a62bc958d44ab8352a1ac1313c5dddd.tar.xz
Don't spam accessible name changes when it is translated
Fix the logic guarding against updating the name and description so that it properly checks against strings in the same locale. This prevents spamming accessibility 'accessible-name' change events, avoiding some noise when interacting with the panel.
-rw-r--r--mate-panel/panel-toplevel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index d5263ba6..26fbad21 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -1723,7 +1723,7 @@ static const char* panel_toplevel_construct_description(PanelToplevel *toplevel)
};
if (toplevel->priv->attached)
- return N_("Drawer");
+ return _("Drawer");
switch (toplevel->priv->orientation) {
case PANEL_ORIENTATION_TOP:
@@ -1754,7 +1754,7 @@ static const char* panel_toplevel_construct_description(PanelToplevel *toplevel)
else
type = 3;
- return description[orientation][type];
+ return _(description[orientation][type]);
}
static void panel_toplevel_update_description(PanelToplevel* toplevel)
@@ -1769,7 +1769,7 @@ static void panel_toplevel_update_description(PanelToplevel* toplevel)
if (toplevel->priv->description)
g_free (toplevel->priv->description);
- toplevel->priv->description = g_strdup (_(description));
+ toplevel->priv->description = g_strdup (description);
if (!toplevel->priv->name)
gtk_window_set_title (GTK_WINDOW (toplevel),
@@ -1778,8 +1778,8 @@ static void panel_toplevel_update_description(PanelToplevel* toplevel)
panel_a11y_set_atk_name_desc (
GTK_WIDGET (toplevel->priv->panel_widget),
toplevel->priv->name ? toplevel->priv->name :
- _(toplevel->priv->description),
- _(toplevel->priv->description));
+ toplevel->priv->description,
+ toplevel->priv->description);
}
static void panel_toplevel_update_attached_position(PanelToplevel* toplevel, gboolean hidden, int* x, int* y, int* w, int* h)