aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-08 21:03:21 -0600
committerTed Gould <ted@gould.cx>2011-02-08 21:03:21 -0600
commit9498ffa1c66d941f18e799ae5c2e070695469d7c (patch)
tree2b56fd6193b23e7a73efe0a109db40ee3d1408b3 /src
parent5c4584e8278f37d2e921ad599c55cabeff835a35 (diff)
parent35dcf67c7ea0a28cf7a5b75da4e63c330af51588 (diff)
downloadayatana-indicator-session-9498ffa1c66d941f18e799ae5c2e070695469d7c.tar.gz
ayatana-indicator-session-9498ffa1c66d941f18e799ae5c2e070695469d7c.tar.bz2
ayatana-indicator-session-9498ffa1c66d941f18e799ae5c2e070695469d7c.zip
Make message dialog internals un-selectable
Diffstat (limited to 'src')
-rw-r--r--src/dialog.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dialog.c b/src/dialog.c
index 51b1682..9633224 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -226,5 +226,20 @@ logout_dialog_new (LogoutDialogType type)
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+ /* The following is a workaround to fix an issue in GtkMessageDialog
+ in which the user can tab through the text in addition to
+ the buttons. */
+ GtkWidget *message_area = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(dialog));
+ GList *children = gtk_container_get_children(GTK_CONTAINER(message_area));
+ GList *l;
+
+ for (l = children; l != NULL; l = g_list_next (l))
+ {
+ GtkWidget *child = l->data;
+ gtk_widget_set_can_focus(child, FALSE);
+ }
+
+ g_list_free (children);
+
return dialog;
}