summaryrefslogtreecommitdiff
path: root/trashapplet
diff options
context:
space:
mode:
Diffstat (limited to 'trashapplet')
-rw-r--r--trashapplet/src/trashapplet.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c
index 2ba46c7c..6f4b7f0f 100644
--- a/trashapplet/src/trashapplet.c
+++ b/trashapplet/src/trashapplet.c
@@ -85,6 +85,7 @@ trash_applet_monitor_changed (TrashApplet *applet)
GError *error = NULL;
GFileInfo *info;
GIcon *icon;
+ AtkObject *atk_obj;
gint items;
info = g_file_query_info (applet->trash,
@@ -92,6 +93,8 @@ trash_applet_monitor_changed (TrashApplet *applet)
G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT,
0, NULL, &error);
+ atk_obj = gtk_widget_get_accessible (GTK_WIDGET (applet));
+
if (!info)
{
g_critical ("could not query trash:/: '%s'", error->message);
@@ -120,19 +123,20 @@ trash_applet_monitor_changed (TrashApplet *applet)
if (items != applet->items)
{
+ char *text;
+
if (items)
{
- char *text;
-
text = g_strdup_printf (ngettext ("%d Item in Trash",
"%d Items in Trash",
items), items);
- gtk_widget_set_tooltip_text (GTK_WIDGET (applet), text);
- g_free (text);
}
else
- gtk_widget_set_tooltip_text (GTK_WIDGET (applet),
- _("No Items in Trash"));
+ text = g_strdup (_("No Items in Trash"));
+
+ gtk_widget_set_tooltip_text (GTK_WIDGET (applet), text);
+ atk_object_set_description (atk_obj, text);
+ g_free (text);
applet->items = items;
}
@@ -615,6 +619,7 @@ trash_applet_factory (MatePanelApplet *applet,
if (!strcmp (iid, "TrashApplet"))
{
+ AtkObject *atk_obj;
GtkActionGroup *action_group;
g_set_application_name (_("Trash Applet"));
@@ -633,6 +638,12 @@ trash_applet_factory (MatePanelApplet *applet,
action_group);
g_object_unref (action_group);
+ atk_obj = gtk_widget_get_accessible (GTK_WIDGET (applet));
+
+ if (GTK_IS_ACCESSIBLE (atk_obj)) {
+ atk_object_set_name (atk_obj, _("Trash Applet"));
+ }
+
gtk_widget_show (GTK_WIDGET (applet));
retval = TRUE;