Merge lp:~jassmith/window-picker-applet/atk into lp:window-picker-applet

Proposed by Jason Smith
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jassmith/window-picker-applet/atk
Merge into: lp:window-picker-applet
Diff against target: None lines
To merge this branch: bzr merge lp:~jassmith/window-picker-applet/atk
Reviewer Review Type Date Requested Status
David Barth (community) Approve
Mirco Müller (community) Needs Information
Eitan Isaacson Pending
Review via email: mp+10739@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

Adds screen reader support to all buttons

92. By Jason Smith <jason@t500>

Set atk object role to button

Revision history for this message
Mirco Müller (macslow) wrote :

Are the descriptions strings not meant to be translated? Just wondering here in general. I don't know the must-have features of window-picker.

review: Needs Information
93. By Jason Smith <jason@t500>

Translatable strings

Revision history for this message
Jason Smith (jassmith) wrote :

> Are the descriptions strings not meant to be translated? Just wondering here
> in general. I don't know the must-have features of window-picker.

Fixed, sorry, always forget to do that...

Revision history for this message
David Barth (dbarth) wrote :

Mirco Müller wrote:
> Review: Needs Information
> Are the descriptions strings not meant to be translated? Just wondering here in general. I don't know the must-have features of window-picker.
>
Can you compare your patch against this commit of notify-osd, where
Eitan added support for ATK. I'm not an expert either, but it seems he
had to add whole objects to implement that. How is your patch different,
ie what is the feature(s) gap between the two?

David

Revision history for this message
Jason Smith (jassmith) wrote :

> Mirco Müller wrote:
> > Review: Needs Information
> > Are the descriptions strings not meant to be translated? Just wondering here
> in general. I don't know the must-have features of window-picker.
> >
> Can you compare your patch against this commit of notify-osd, where
> Eitan added support for ATK. I'm not an expert either, but it seems he
> had to add whole objects to implement that. How is your patch different,
> ie what is the feature(s) gap between the two?
>
> David

I looked at the way this is done in notify OSD and it looks to me as it implements in this fashion due to notify OSD being one giant custom widget. The method I implemented is from the ATK example documentation for simpler cases (ours is not a completely custom widget really).

Jason

Revision history for this message
David Barth (dbarth) wrote :

OK, the changes are sound and based on the ATK tutorial. It's mostly to set some attributes and the rest of the lifecycle for the atk bits is already managed by the /standard/ widgets.

review: Approve
Revision history for this message
Jason Smith (jassmith) wrote :

> OK, the changes are sound and based on the ATK tutorial. It's mostly to set
> some attributes and the rest of the lifecycle for the atk bits is already
> managed by the /standard/ widgets.

Pushed :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/task-item.c'
2--- src/task-item.c 2009-08-25 19:11:59 +0000
3+++ src/task-item.c 2009-08-26 13:37:13 +0000
4@@ -561,6 +561,27 @@
5 }
6
7 static void
8+task_item_setup_atk (TaskItem *item)
9+{
10+ TaskItemPrivate *priv;
11+ GtkWidget *widget;
12+ AtkObject *atk;
13+ WnckWindow *window;
14+
15+ g_return_if_fail (TASK_IS_ITEM (item));
16+
17+ widget = GTK_WIDGET (item);
18+ priv = item->priv;
19+ window = priv->window;
20+
21+ g_return_if_fail (WNCK_IS_WINDOW (window));
22+
23+ atk = gtk_widget_get_accessible (widget);
24+ atk_object_set_name (atk, "Window Task Button");
25+ atk_object_set_description (atk, wnck_window_get_name (window));
26+}
27+
28+static void
29 task_item_finalize (GObject *object)
30 {
31 TaskItemPrivate *priv;
32@@ -667,6 +688,7 @@
33 G_CALLBACK (on_leave_notify), item);
34
35 task_item_set_visibility (task);
36+ task_item_setup_atk (task);
37
38 return item;
39 }
40
41=== modified file 'src/task-title.c'
42--- src/task-title.c 2009-08-26 13:09:08 +0000
43+++ src/task-title.c 2009-08-26 13:51:24 +0000
44@@ -401,6 +401,7 @@
45 GtkIconTheme *theme;
46 GtkSettings *settings;
47 GdkPixbuf *pixbuf;
48+ AtkObject *atk;
49 int width, height;
50
51 priv = title->priv = TASK_TITLE_GET_PRIVATE (title);
52@@ -445,6 +446,10 @@
53 gtk_box_pack_start (GTK_BOX (priv->box), priv->button, FALSE, FALSE, 0);
54 gtk_widget_show (priv->button);
55
56+ atk = gtk_widget_get_accessible (priv->button);
57+ atk_object_set_name (atk, "Close");
58+ atk_object_set_description (atk, "Close current window.");
59+
60 g_signal_connect (priv->button, "button-release-event",
61 G_CALLBACK (on_close_clicked), title);
62 g_signal_connect (priv->button, "enter-notify-event",

Subscribers

People subscribed via source and target branches

to all changes: