2006-09-10 [paul] 2.4.0cvs171

* src/prefs_actions.c
	* src/prefs_filtering.c
	* src/prefs_template.c
		adjustments to the gui
		Patch by Fabien Vantard (slightly modified)
This commit is contained in:
Paul Mangan 2006-09-10 13:29:42 +00:00
parent d6fcabfb6f
commit f7fef5d098
6 changed files with 86 additions and 76 deletions

View file

@ -1,3 +1,11 @@
2006-09-10 [paul] 2.4.0cvs171
* src/prefs_actions.c
* src/prefs_filtering.c
* src/prefs_template.c
adjustments to the gui
Patch by Fabien Vantard (slightly modified)
2006-09-10 [colin] 2.4.0cvs170
* src/summaryview.c

View file

@ -1862,3 +1862,4 @@
( cvs diff -u -r 1.59.2.47 -r 1.59.2.48 src/prefs_filtering.c; ) > 2.4.0cvs168.patchset
( cvs diff -u -r 1.1.4.29 -r 1.1.4.30 src/gtk/gtksctree.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/plugins/bogofilter/bogofilter.c; ) > 2.4.0cvs169.patchset
( cvs diff -u -r 1.395.2.246 -r 1.395.2.247 src/summaryview.c; ) > 2.4.0cvs170.patchset
( cvs diff -u -r 1.60.2.40 -r 1.60.2.41 src/prefs_actions.c; cvs diff -u -r 1.59.2.48 -r 1.59.2.49 src/prefs_filtering.c; cvs diff -u -r 1.12.2.29 -r 1.12.2.30 src/prefs_template.c; ) > 2.4.0cvs171.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=4
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=170
EXTRA_VERSION=171
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -152,9 +152,8 @@ static void prefs_actions_create(MainWindow *mainwin)
GtkWidget *confirm_area;
GtkWidget *vbox1;
GtkWidget *table;
GtkWidget *entry_vbox;
GtkWidget *hbox;
GtkWidget *name_label;
GtkWidget *name_entry;
GtkWidget *cmd_label;
@ -215,33 +214,42 @@ static void prefs_actions_create(MainWindow *mainwin)
G_CALLBACK(manual_open_with_anchor_cb),
MANUAL_ANCHOR_ACTIONS);
vbox1 = gtk_vbox_new(FALSE, 8);
vbox1 = gtk_vbox_new(FALSE, VSPACING);
gtk_widget_show(vbox1);
gtk_box_pack_start(GTK_BOX(vbox), vbox1, TRUE, TRUE, 0);
gtk_container_set_border_width(GTK_CONTAINER(vbox1), 2);
entry_vbox = gtk_vbox_new(FALSE, 4);
gtk_box_pack_start(GTK_BOX(vbox1), entry_vbox, FALSE, FALSE, 0);
table = gtk_table_new(2, 2, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_widget_show(table);
gtk_box_pack_start (GTK_BOX (vbox1), table, FALSE, FALSE, 0);
hbox = gtk_hbox_new(FALSE, 8);
gtk_box_pack_start(GTK_BOX(entry_vbox), hbox, FALSE, FALSE, 0);
name_label = gtk_label_new (_("Menu name"));
gtk_widget_show (name_label);
gtk_misc_set_alignment (GTK_MISC (name_label), 1, 0.5);
gtk_table_attach (GTK_TABLE (table), name_label, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
name_label = gtk_label_new(_("Menu name:"));
gtk_box_pack_start(GTK_BOX(hbox), name_label, FALSE, FALSE, 0);
name_entry = gtk_entry_new ();
gtk_widget_show (name_entry);
gtk_table_attach (GTK_TABLE (table), name_entry, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
(GtkAttachOptions) (0), 0, 0);
name_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(hbox), name_entry, TRUE, TRUE, 0);
cmd_label = gtk_label_new (_("Command line"));
gtk_widget_show (cmd_label);
gtk_misc_set_alignment (GTK_MISC (cmd_label), 1, 0.5);
gtk_table_attach (GTK_TABLE (table), cmd_label, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
hbox = gtk_hbox_new(FALSE, 8);
gtk_box_pack_start(GTK_BOX(entry_vbox), hbox, TRUE, TRUE, 0);
cmd_label = gtk_label_new(_("Command line:"));
gtk_box_pack_start(GTK_BOX(hbox), cmd_label, FALSE, FALSE, 0);
cmd_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(hbox), cmd_entry, TRUE, TRUE, 0);
gtk_widget_show_all(entry_vbox);
cmd_entry = gtk_entry_new ();
gtk_widget_show (cmd_entry);
gtk_table_attach (GTK_TABLE (table), cmd_entry, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
(GtkAttachOptions) (0), 0, 0);
/* register / substitute / delete */

View file

@ -355,10 +355,9 @@ static void prefs_filtering_create(void)
gtk_box_pack_start (GTK_BOX (vbox), vbox1, FALSE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 2);
table = gtk_table_new(3, 4, FALSE);
table = gtk_table_new(4, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacing (GTK_TABLE (table), 2, 0);
gtk_widget_show(table);
gtk_box_pack_start (GTK_BOX (vbox1), table, TRUE, TRUE, 0);

View file

@ -30,6 +30,7 @@
#include "template.h"
#include "main.h"
#include "prefs_gtk.h"
#include "inc.h"
#include "utils.h"
#include "gtkutils.h"
@ -120,34 +121,13 @@ static void prefs_template_size_allocate_cb(GtkWidget *widget,
prefs_common.templateswin_height = allocation->height;
}
#define ADD_ENTRY(entry, str, row) \
{ \
label1 = gtk_label_new(str); \
gtk_widget_show(label1); \
gtk_table_attach(GTK_TABLE(table), label1, 0, 1, row, (row + 1), \
GTK_FILL, 0, 0, 0); \
gtk_misc_set_alignment(GTK_MISC(label1), 1, 0.5); \
\
entry = gtk_entry_new(); \
gtk_widget_show(entry); \
gtk_table_attach(GTK_TABLE(table), entry, 1, 2, row, (row + 1), \
GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0); \
}
static void prefs_template_window_create(void)
{
/* window structure ;) */
GtkWidget *window;
GtkWidget *vpaned;
GtkWidget *vbox1;
GtkWidget *hbox1;
GtkWidget *label1;
GtkWidget *entry_name;
GtkWidget *table;
GtkWidget *entry_to;
GtkWidget *entry_cc;
GtkWidget *entry_bcc;
GtkWidget *entry_subject;
GtkWidget *table; /* including : entry_[name|to|cc|bcc|subject] */
GtkWidget *scroll2;
GtkWidget *text_value;
GtkWidget *vbox2;
@ -165,6 +145,8 @@ static void prefs_template_window_create(void)
GtkWidget *cancel_btn;
GtkWidget *ok_btn;
static GdkGeometry geometry;
gint i;
GtkTooltips *tooltips;
debug_print("Creating templates configuration window...\n");
@ -185,34 +167,51 @@ static void prefs_template_window_create(void)
gtk_container_set_border_width(GTK_CONTAINER(vbox1), 8);
gtk_paned_pack1(GTK_PANED(vpaned), vbox1, FALSE, FALSE);
hbox1 = gtk_hbox_new(FALSE, 8);
gtk_widget_show(hbox1);
gtk_box_pack_start(GTK_BOX(vbox1), hbox1, FALSE, FALSE, 0);
label1 = gtk_label_new(_("Template name"));
gtk_widget_show(label1);
gtk_box_pack_start(GTK_BOX(hbox1), label1, FALSE, FALSE, 0);
entry_name = gtk_entry_new();
gtk_widget_show(entry_name);
gtk_box_pack_start(GTK_BOX(hbox1), entry_name, TRUE, TRUE, 0);
/* table for headers */
table = gtk_table_new(2, 2, FALSE);
table = gtk_table_new(5, 2, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_widget_show(table);
gtk_box_pack_start(GTK_BOX(vbox1), table, FALSE, FALSE, 0);
gtk_table_set_row_spacings(GTK_TABLE(table), 4);
gtk_table_set_col_spacings(GTK_TABLE(table), 4);
gtk_box_pack_start (GTK_BOX (vbox1), table, FALSE, FALSE, 0);
ADD_ENTRY(entry_to, _("To:"), 0);
address_completion_register_entry(GTK_ENTRY(entry_to));
ADD_ENTRY(entry_cc, _("Cc:"), 1)
address_completion_register_entry(GTK_ENTRY(entry_cc));
ADD_ENTRY(entry_bcc, _("Bcc:"), 2)
address_completion_register_entry(GTK_ENTRY(entry_bcc));
ADD_ENTRY(entry_subject, _("Subject:"), 3);
tooltips = gtk_tooltips_new();
#undef ADD_ENTRY
struct
{
gchar *label;
GtkWidget **entry;
gboolean compl;
gchar *tooltips;
} tab[] = {
{_("Name"), &templates.entry_name, FALSE,
_("This name is used as the Menu item")},
{_("To"), &templates.entry_to, TRUE, NULL},
{_("Cc"), &templates.entry_cc, TRUE, NULL},
{_("Bcc"), &templates.entry_bcc, TRUE, NULL},
{_("Subject"), &templates.entry_subject, FALSE, NULL},
{NULL, NULL, FALSE, NULL}
};
for (i=0; tab[i].label; i++) {
GtkWidget *label;
label = gtk_label_new(tab[i].label);
gtk_widget_show(label);
gtk_table_attach(GTK_TABLE(table), label, 0, 1, i, (i + 1),
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) 0, 0, 0);
gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
*(tab[i].entry) = gtk_entry_new();
gtk_widget_show(*(tab[i].entry));
gtk_table_attach(GTK_TABLE(table), *(tab[i].entry), 1, 2, i, (i + 1),
(GtkAttachOptions) (GTK_EXPAND|GTK_SHRINK|GTK_FILL),
(GtkAttachOptions) 0, 0, 0);
gtk_tooltips_set_tip(tooltips, *(tab[i].entry), tab[i].tooltips, NULL);
if (tab[i].compl)
address_completion_register_entry(GTK_ENTRY(*(tab[i].entry)));
}
/* template content */
scroll2 = gtk_scrolled_window_new(NULL, NULL);
@ -334,11 +333,6 @@ static void prefs_template_window_create(void)
templates.window = window;
templates.ok_btn = ok_btn;
templates.list_view = list_view;
templates.entry_name = entry_name;
templates.entry_subject = entry_subject;
templates.entry_to = entry_to;
templates.entry_cc = entry_cc;
templates.entry_bcc = entry_bcc;
templates.text_value = text_value;
}