Re: [evolution-patches] Esc-closeability of the composer's search dialog



Hi Federico:

Thanks very much for working on this! Your time and energy are awfully appreciated. My thoughts are:

* Yes, please, the "ESC" to close bit of this patch looks super.

* Looking at the two screenshots, it seems to me that the pudgy little composer search dialog was actually closer to the HIG's recommended spacing/padding. To quote:



    Guidelines

Etc, etc, etc.  I would feel more warm and fuzzy about these spacing/padding guidelines if they were accompanied by a spot of research/data--- something to give the scientific/psychological context for why their suggestions are desirable.  My tendency when I was trying to hig-ify the spacing of Evo's various dialogs was to be somewhat conservative in how I interpreted these guidelines. At any rate that snippet was from the same webpage as the previous one. 

(NB: In the new draft of the HIG, the relevant section of which is available here: http://developer.gnome.org/projects/gup/hig/hig-diff/layout.html#window-layout-spacing, it looks to me like the HIG folks are still kinda feeling their way around this type of guideline... check the massively red section where the technical details of how to achieve their desired spacing/padding used to be. :)

To be honest with you, the things which I'd like to have you look at in the composer's dialog are: a) Why is there no label associated with the search entry? This is rather non-accessible-- the screenreader people really need, as I understand it, their controls to be labeled... and b) The capitalization style on "Case Sensitive" varies between the two dialogs.  The labels of checkboxes are supposed to be capitalized sentence-style.  Oh-- and another thing: the "Find" label in the "Find in Message" dialog should have an accelerator.

What would you think about redoing the layout part of this patch to add the label, standardize the capitalization style between the two dialogs, add an accelerator to the "Find" label in "Search in Message", and change the padding/spacing of the mailer's dialog to conform to the padding/spacing of the composer's dialog (since it is, indeed, more "correct").

Thank you in advance,
best,
Anna





On Tue, 2003-06-10 at 20:35, Federico Mena Quintero wrote:
Hi,

This patch is similar to the one I sent for the mailer a week ago.  It
makes the search dialog in the composer take the Escape key to close
it.  The patch also removes unnecessary padding so that the dialog is
consistent with other dialogs, in particular the mailer's Search Mail
dialog.  See the attached screenshot for the inconsistency.

Is it OK to commit?

  Federico

Index: search.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/search.c,v
retrieving revision 1.22
diff -u -r1.22 search.c
-- search.c	12 May 2003 20:46:48 -0000	1.22
+++ search.c	11 Jun 2003 00:31:54 -0000
@@ -70,11 +70,19 @@
 {
 	GtkHTMLSearchDialog *dialog = g_new (GtkHTMLSearchDialog, 1);
 	GtkWidget *hbox, *vbox;
+	GtkAccelGroup *accel_group;
+	GtkWidget *button;
+
+	dialog->dialog = GTK_DIALOG (gtk_dialog_new ());
+	gtk_window_set_title (GTK_WINDOW (dialog->dialog), _("Find"));
+
+	button = gtk_dialog_add_button (dialog->dialog, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+	accel_group = gtk_accel_group_new ();
+	gtk_window_add_accel_group (GTK_WINDOW (dialog->dialog), accel_group);
+	gtk_widget_add_accelerator (button, "activate", accel_group, GDK_Escape, 0, GTK_ACCEL_LOCKED);
+
+	gtk_dialog_add_button (dialog->dialog, GTK_STOCK_FIND, 0);
 
-	dialog->dialog         = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Find"), NULL, 0,
-									  GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
-									  GTK_STOCK_FIND, 0,
-									  NULL));
 	dialog->entry          = gtk_entry_new ();
 	dialog->backward       = gtk_check_button_new_with_mnemonic (_("_Backward"));
 	dialog->case_sensitive = gtk_check_button_new_with_mnemonic (_("Case _sensitive"));
@@ -93,10 +101,8 @@
 	gtk_widget_show (vbox);
 	gtk_box_pack_start (GTK_BOX (vbox), dialog->entry, FALSE, FALSE, 0);
 	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-	gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog), 6);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
 	gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog->vbox), 6);
-	gtk_box_set_spacing (GTK_BOX (dialog->dialog->vbox), 6);
 	gtk_box_pack_start (GTK_BOX (dialog->dialog->vbox), vbox, FALSE, FALSE, 0);
 	gtk_widget_show (dialog->entry);
 	gtk_widget_show_all (hbox);

--

Anna Marie Dirks <anna ximian com>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]