aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorRodney Dawes <dobey@novell.com>2004-06-17 05:41:52 +0800
committerRodney Dawes <dobey@src.gnome.org>2004-06-17 05:41:52 +0800
commitfc121328c9bb32c37ad00359b1e88de5aa0c8784 (patch)
tree34d9e9fda2cad895f4eff9070547cd0a4ebaa8af /mail
parenta15b31ff5b4c2a9737e290d6bde3e7620757b729 (diff)
downloadgsoc2013-evolution-fc121328c9bb32c37ad00359b1e88de5aa0c8784.tar
gsoc2013-evolution-fc121328c9bb32c37ad00359b1e88de5aa0c8784.tar.gz
gsoc2013-evolution-fc121328c9bb32c37ad00359b1e88de5aa0c8784.tar.bz2
gsoc2013-evolution-fc121328c9bb32c37ad00359b1e88de5aa0c8784.tar.lz
gsoc2013-evolution-fc121328c9bb32c37ad00359b1e88de5aa0c8784.tar.xz
gsoc2013-evolution-fc121328c9bb32c37ad00359b1e88de5aa0c8784.tar.zst
gsoc2013-evolution-fc121328c9bb32c37ad00359b1e88de5aa0c8784.zip
Include gtk[hv]box.h so we can use them (emfp_dialog_got_folder): Fix the
2004-06-16 Rodney Dawes <dobey@novell.com> * em-folder-properties.c: Include gtk[hv]box.h so we can use them (emfp_dialog_got_folder): Fix the border widths and spacings for the internal widgets and the dialog's vbox and action area to be compliant with the HIG Fix the general layout of the dialog to be HIG-compliant as well Use ngettext for the row labels for number of messages Add a cancel button, since we are not instant-apply Align the message counts to the right Part of this patch is from Christian Neumair <chris@gnome-de.org> * mail-component.c (view_changed_cb): Fix a typo for the sent folder send is not a pluralization of sent svn path=/trunk/; revision=26369
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog15
-rw-r--r--mail/em-folder-properties.c85
-rw-r--r--mail/mail-component.c2
3 files changed, 66 insertions, 36 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 33fdab7acd..a0e240d7ff 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,18 @@
+2004-06-16 Rodney Dawes <dobey@novell.com>
+
+ * em-folder-properties.c: Include gtk[hv]box.h so we can use them
+ (emfp_dialog_got_folder): Fix the border widths and spacings for
+ the internal widgets and the dialog's vbox and action area to be
+ compliant with the HIG
+ Fix the general layout of the dialog to be HIG-compliant as well
+ Use ngettext for the row labels for number of messages
+ Add a cancel button, since we are not instant-apply
+ Align the message counts to the right
+ Part of this patch is from Christian Neumair <chris@gnome-de.org>
+
+ * mail-component.c (view_changed_cb): Fix a typo for the sent folder
+ send is not a pluralization of sent
+
2004-06-16 JP Rosevear <jpr@novell.com>
* em-composer-prefs.c (spell_set_ui): clear the error, don't free
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index cd4e169976..885abcceef 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -30,11 +30,13 @@
#include <gtk/gtkdialog.h>
#include <gtk/gtkentry.h>
#include <gtk/gtkframe.h>
+#include <gtk/gtkhbox.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkmisc.h>
#include <gtk/gtkstock.h>
#include <gtk/gtktable.h>
#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkvbox.h>
#include <camel/camel-folder.h>
@@ -101,13 +103,13 @@ emfp_dialog_free (void *data)
static void
emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
{
- GtkWidget *dialog, *w, *table, *label;
+ GtkWidget *dialog, *w, *table, *label, *vbox, *hbox;
struct _prop_data *prop_data;
CamelArgGetV *arggetv;
CamelArgV *argv;
GSList *list, *l;
gint32 count, i;
- char *name;
+ char *name, *title;
char countstr[16];
int row = 0, total=0, unread=0;
@@ -117,54 +119,67 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
camel_object_get (folder, NULL, CAMEL_FOLDER_PROPERTIES, &list, CAMEL_FOLDER_NAME, &name,
CAMEL_FOLDER_TOTAL, &total, CAMEL_FOLDER_UNREAD, &unread, NULL);
- dialog = gtk_dialog_new_with_buttons (_("Folder properties"), NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
+ dialog = gtk_dialog_new_with_buttons (_("Folder Properties"), NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
-
+ gtk_window_set_default_size ((GtkWindow *) dialog, 192, 160);
+ gtk_widget_ensure_style (dialog);
+ gtk_container_set_border_width ((GtkContainer *) ((GtkDialog *) dialog)->vbox, 0);
+ gtk_container_set_border_width ((GtkContainer *) ((GtkDialog *) dialog)->vbox, 12);
+
+ vbox = gtk_vbox_new (FALSE, 12);
+ gtk_container_set_border_width ((GtkContainer *) vbox, 12);
+ gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dialog)->vbox, vbox, TRUE, TRUE, 0);
+ gtk_widget_show (vbox);
+
+ title = g_strdup_printf ("<b>%s</b>", name);
+ label = gtk_label_new (title);
+ gtk_label_set_use_markup ((GtkLabel *) label, TRUE);
+ gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
+ gtk_box_pack_start ((GtkBox *) vbox, label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
+ g_free (title);
+
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_box_pack_start ((GtkBox *) vbox, hbox, FALSE, FALSE, 0);
+ gtk_widget_show (hbox);
+
+ label = gtk_label_new ("");
+ gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
+
/* TODO: maybe we want some basic properties here, like message counts/approximate size/etc */
- w = gtk_frame_new (_("Properties"));
- gtk_widget_show (w);
- gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dialog)->vbox, w, TRUE, TRUE, 6);
-
- table = gtk_table_new (g_slist_length (list) + 3, 2, FALSE);
+ table = gtk_table_new (g_slist_length (list) + 2, 2, FALSE);
+ gtk_table_set_row_spacings ((GtkTable *) table, 6);
+ gtk_table_set_col_spacings ((GtkTable *) table, 12);
gtk_widget_show (table);
- gtk_container_add ((GtkContainer *) w, table);
+ gtk_box_pack_start ((GtkBox *) hbox, table, TRUE, TRUE, 0);
/* TODO: can this be done in a loop? */
- label = gtk_label_new (_("Folder Name"));
- gtk_widget_show (label);
- gtk_misc_set_alignment ((GtkMisc *) label, 1.0, 0.5);
- gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row+1, GTK_FILL | GTK_EXPAND, 0, 3, 0);
-
- label = gtk_label_new (name);
+ label = gtk_label_new (ngettext ("Total message:", "Total messages:", total));
gtk_widget_show (label);
gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
- gtk_table_attach ((GtkTable *) table, label, 1, 2, row, row+1, GTK_FILL | GTK_EXPAND, 0, 3, 0);
- row++;
-
- label = gtk_label_new (_("Total messages"));
- gtk_widget_show (label);
- gtk_misc_set_alignment ((GtkMisc *) label, 1.0, 0.5);
- gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row+1, GTK_FILL | GTK_EXPAND, 0, 3, 0);
+ gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
sprintf(countstr, "%d", total);
label = gtk_label_new (countstr);
gtk_widget_show (label);
- gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
- gtk_table_attach ((GtkTable *) table, label, 1, 2, row, row+1, GTK_FILL | GTK_EXPAND, 0, 3, 0);
+ gtk_misc_set_alignment ((GtkMisc *) label, 1.0, 0.5);
+ gtk_table_attach ((GtkTable *) table, label, 1, 2, row, row+1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
row++;
- label = gtk_label_new (_("Unread messages"));
+ label = gtk_label_new (ngettext ("Unread message:", "Unread messages:", unread));
gtk_widget_show (label);
- gtk_misc_set_alignment ((GtkMisc *) label, 1.0, 0.5);
- gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row+1, GTK_FILL | GTK_EXPAND, 0, 3, 0);
+ gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
+ gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
sprintf(countstr, "%d", unread);
label = gtk_label_new (countstr);
gtk_widget_show (label);
- gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
- gtk_table_attach ((GtkTable *) table, label, 1, 2, row, row+1, GTK_FILL | GTK_EXPAND, 0, 3, 0);
+ gtk_misc_set_alignment ((GtkMisc *) label, 1.0, 0.5);
+ gtk_table_attach ((GtkTable *) table, label, 1, 2, row, row+1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
row++;
/* build an arggetv/argv to retrieve/store the results */
@@ -205,14 +220,14 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
w = gtk_check_button_new_with_label (prop->description);
gtk_toggle_button_set_active ((GtkToggleButton *) w, argv->argv[i].ca_int != 0);
gtk_widget_show (w);
- gtk_table_attach ((GtkTable *) table, w, 0, 2, row, row + 1, 0, 0, 3, 3);
+ gtk_table_attach ((GtkTable *) table, w, 0, 2, row, row + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
prop_data->widgets[i] = w;
break;
case CAMEL_ARG_STR:
label = gtk_label_new (prop->description);
- gtk_misc_set_alignment ((GtkMisc *) label, 1.0, 0.5);
+ gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
gtk_widget_show (label);
- gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row + 1, GTK_FILL | GTK_EXPAND, 0, 3, 3);
+ gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
w = gtk_entry_new ();
gtk_widget_show (w);
@@ -221,7 +236,7 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
camel_object_free (folder, argv->argv[i].tag, argv->argv[i].ca_str);
argv->argv[i].ca_str = NULL;
}
- gtk_table_attach ((GtkTable *) table, w, 1, 2, row, row + 1, GTK_FILL, 0, 3, 3);
+ gtk_table_attach ((GtkTable *) table, w, 1, 2, row, row + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
prop_data->widgets[i] = w;
break;
default:
diff --git a/mail/mail-component.c b/mail/mail-component.c
index da437f38fb..8a72dbba4d 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -493,7 +493,7 @@ view_changed_cb(EMFolderView *emfv, EInfoLabel *el)
if (bits == 1)
g_string_append_printf(tmp, ngettext ("%d draft", "%d drafts", visible), visible);
else if (bits == 2)
- g_string_append_printf(tmp, ngettext ("%d sent", "%d send", visible), visible);
+ g_string_append_printf(tmp, ngettext ("%d sent", "%d sent", visible), visible);
else if (bits == 4)
g_string_append_printf(tmp, ngettext ("%d unsent", "%d unsent", visible), visible);
else {