Re: HTML support (was Re: Simplification of preferences)
- From: Toralf <toralf procaptura com>
- To: balsa-list gnome org
- Subject: Re: HTML support (was Re: Simplification of preferences)
- Date: Thu, 14 Nov 2002 23:21:23 +0100
> Hello,
>
> I've read the article now. I still think that, generally speaking,
> preferences are a GoodThing.
> In respect to Balsa, it means this:
>
[ ... ]
Yes. Your notes here are very sensible.
I actually had a stab at making some of the changes you mention + a few
more of my other suggestions that aren't too radical.
A patch is attached (BALSA_2 branch, current CVS.)
- Toralf
Index: src/balsa-app.c
===================================================================
RCS file: /cvs/gnome/balsa/src/balsa-app.c,v
retrieving revision 1.215.2.33
diff -u -b -r1.215.2.33 balsa-app.c
--- src/balsa-app.c 5 Nov 2002 21:13:23 -0000 1.215.2.33
+++ src/balsa-app.c 14 Nov 2002 21:59:24 -0000
@@ -326,7 +326,7 @@
balsa_app.mw_height = MW_DEFAULT_HEIGHT;
balsa_app.sw_width = 0;
balsa_app.sw_height = 0;
- balsa_app.pwindow_option = WHILERETR;
+ balsa_app.progress = TRUE;
balsa_app.wordwrap = TRUE;
balsa_app.wraplength = 72;
balsa_app.browse_wrap = TRUE;
@@ -338,7 +338,6 @@
balsa_app.show_mblist = TRUE;
balsa_app.show_notebook_tabs = FALSE;
balsa_app.alternative_layout = FALSE;
- balsa_app.view_message_on_open = TRUE;
balsa_app.line_length = FALSE;
balsa_app.index_num_width = NUM_DEFAULT_WIDTH;
@@ -423,8 +422,6 @@
balsa_app.tooltips = gtk_tooltips_new();
/* IMAP */
- balsa_app.check_imap = 1;
- balsa_app.check_imap_inbox = 0;
balsa_app.imap_scan_depth = 1;
/* RFC2646 format=flowed */
Index: src/balsa-app.h
===================================================================
RCS file: /cvs/gnome/balsa/src/balsa-app.h,v
retrieving revision 1.169.2.16
diff -u -b -r1.169.2.16 balsa-app.h
--- src/balsa-app.h 28 Oct 2002 22:50:04 -0000 1.169.2.16
+++ src/balsa-app.h 14 Nov 2002 21:59:24 -0000
@@ -104,13 +104,6 @@
#define DEFAULT_CHECK_QUOTED FALSE
-enum {
- WHILERETR,
- UNTILCLOSED,
- NEVER
-};
-
-
typedef enum _ShownHeaders ShownHeaders;
enum _ShownHeaders {
HEADERS_NONE = 0,
@@ -205,9 +198,6 @@
/* automatically close mailboxes after XX minutes */
gboolean close_mailbox_auto;
gint close_mailbox_timeout;
- gint check_imap;
- gint check_imap_inbox;
- gint quiet_background_check;
/* GUI settings */
gint mw_width;
@@ -257,7 +247,7 @@
/* label color of bad addresses */
GdkColor bad_address_color;
- guint pwindow_option;
+ gboolean progress;
gboolean wordwrap;
gint wraplength;
gboolean browse_wrap;
@@ -270,7 +260,6 @@
gboolean show_mblist;
gboolean show_notebook_tabs;
gboolean alternative_layout;
- gboolean view_message_on_open;
gboolean line_length;
gboolean pgdownmod;
gint pgdown_percent;
@@ -289,17 +278,8 @@
/* reply/forward: automatically quote original when replying */
gboolean autoquote;
- /* reply/forward: don't include text/html parts */
- gboolean reply_strip_html;
-
- /* forward attached by default */
- gboolean forward_attached;
-
/* command line options */
- gint open_inbox_upon_startup;
- gint check_mail_upon_startup;
- gint remember_open_mboxes;
- gint open_unread_mailbox;
+ gint dialup;
GList *open_mailbox_list; /* data is a pointer to the mailbox */
/* font used to display messages */
Index: src/balsa-index.c
===================================================================
RCS file: /cvs/gnome/balsa/src/balsa-index.c,v
retrieving revision 1.226.2.40
diff -u -b -r1.226.2.40 balsa-index.c
--- src/balsa-index.c 2 Nov 2002 19:14:18 -0000 1.226.2.40
+++ src/balsa-index.c 14 Nov 2002 21:59:26 -0000
@@ -533,7 +533,7 @@
if (!iter.stamp)
gtk_tree_model_iter_nth_child(model, &iter, NULL, rows - 1);
- if (balsa_app.view_message_on_open)
+ if (!balsa_app.dialup)
bndx_expand_to_row_and_select(index, &iter);
else {
GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
@@ -1857,9 +1857,7 @@
void
balsa_message_forward_default(GtkWidget * widget, gpointer user_data)
{
- bndx_compose_from_list(widget, BALSA_INDEX(user_data),
- balsa_app.forward_attached
- ? SEND_FORWARD_ATTACH : SEND_FORWARD_INLINE);
+ bndx_compose_from_list(widget, BALSA_INDEX(user_data), SEND_FORWARD_ATTACH);
}
/*
Index: src/main-window.c
===================================================================
RCS file: /cvs/gnome/balsa/src/main-window.c,v
retrieving revision 1.446.2.36
diff -u -b -r1.446.2.36 main-window.c
--- src/main-window.c 2 Nov 2002 19:14:18 -0000 1.446.2.36
+++ src/main-window.c 14 Nov 2002 21:59:28 -0000
@@ -126,7 +126,6 @@
static void check_mailbox_list(GList * list);
static gboolean mailbox_check_func(GNode * node);
-static gboolean imap_check_test(const gchar * path);
static void enable_mailbox_menus(BalsaIndex * index);
static void enable_message_menus(LibBalsaMessage * message);
@@ -1671,31 +1670,12 @@
g_return_val_if_fail(mbnode, FALSE);
if (mbnode->mailbox) { /* mailbox, not a folder */
- if (!LIBBALSA_IS_MAILBOX_IMAP(mbnode->mailbox) ||
- imap_check_test(mbnode->dir ? mbnode->dir :
- LIBBALSA_MAILBOX_IMAP(mbnode->mailbox)->
- path)) {
libbalsa_mailbox_check(mbnode->mailbox);
}
- }
return FALSE;
}
-/*
- * Callback for testing whether to check an IMAP mailbox
- * Called from mutt_buffy_check
- */
-static gboolean
-imap_check_test(const gchar * path)
-{
- /* path has been parsed, so it's just the folder path */
- if (balsa_app.check_imap && balsa_app.check_imap_inbox)
- return strcmp(path, "INBOX") == 0;
- else
- return balsa_app.check_imap;
-}
-
#if BALSA_USE_THREADS
static void
progress_dialog_destroy_cb(GtkWidget * widget, gpointer data)
@@ -1784,15 +1764,12 @@
}
checking_mail = 1;
- quiet_check = (type == TYPE_CALLBACK)
- ? 0 : balsa_app.quiet_background_check;
+ quiet_check = (type != TYPE_CALLBACK);
pthread_mutex_unlock(&mailbox_lock);
fill_mailbox_passwords(balsa_app.inbox_input);
- if (type == TYPE_CALLBACK &&
- (balsa_app.pwindow_option == WHILERETR ||
- (balsa_app.pwindow_option == UNTILCLOSED && progress_dialog)))
+ if (type == TYPE_CALLBACK && balsa_app.progress)
ensure_check_mail_dialog();
/* initiate threads */
@@ -1891,7 +1868,7 @@
MSGMAILTHREAD(threadmessage, MSGMAILTHREAD_SOURCE, NULL,
"Local Mail", 0, 0);
- libbalsa_notify_start_check(imap_check_test);
+ libbalsa_notify_start_check();
balsa_mailbox_nodes_lock(FALSE);
g_node_traverse(balsa_app.mailbox_nodes, G_PRE_ORDER, G_TRAVERSE_ALL,
@@ -2014,7 +1991,7 @@
break;
case MSGMAILTHREAD_FINISHED:
- if (balsa_app.pwindow_option == WHILERETR && progress_dialog) {
+ if (balsa_app.progress && progress_dialog) {
gtk_widget_destroy(progress_dialog);
} else if (progress_dialog) {
gtk_label_set_text(GTK_LABEL(progress_dialog_source),
Index: src/main.c
===================================================================
RCS file: /cvs/gnome/balsa/src/main.c,v
retrieving revision 1.127.2.20
diff -u -b -r1.127.2.20 main.c
--- src/main.c 2 Nov 2002 19:14:19 -0000 1.127.2.20
+++ src/main.c 14 Nov 2002 21:59:28 -0000
@@ -91,8 +91,7 @@
saved to the configuration file.
*/
static gchar *cmd_line_open_mailboxes;
-static gboolean cmd_check_mail_on_startup,
- cmd_open_unread_mailbox, cmd_open_inbox;
+static gboolean cmd_line_dialup, cmd_line_debug;
/* opt_attach_list: list of attachments */
static GSList* opt_attach_list = NULL;
@@ -110,21 +109,17 @@
static char *attachment = NULL;
static struct poptOption options[] = {
- {"checkmail", 'c', POPT_ARG_NONE,
- &(cmd_check_mail_on_startup), 0,
- N_("Get new mail on startup"), NULL},
+ {"dialup", 's', POPT_ARG_NONE,
+ &(cmd_line_dialup), 0,
+ N_("Assume dialup connection"), NULL},
{"compose", 'm', POPT_ARG_STRING, &(opt_compose_email),
0, N_("Compose a new email to EMAIL@ADDRESS"), "EMAIL@ADDRESS"},
{"attach", 'a', POPT_ARG_STRING, &(attachment),
'a', N_("Attach file at PATH"), "PATH"},
{"open-mailbox", 'o', POPT_ARG_STRING, &(cmd_line_open_mailboxes),
0, N_("Opens MAILBOXNAME"), N_("MAILBOXNAME")},
- {"open-unread-mailbox", 'u', POPT_ARG_NONE,
- &(cmd_open_unread_mailbox), 0,
- N_("Opens first unread mailbox"), NULL},
- {"open-inbox", 'i', POPT_ARG_NONE,
- &(cmd_open_inbox), 0,
- N_("Opens default Inbox on startup"), NULL},
+ {"debug", 'd', POPT_ARG_NONE, &cmd_line_debug, 0,
+ N_("Debug"), NULL},
{"debug-pop", 'd', POPT_ARG_NONE, &PopDebug, 0,
N_("Debug POP3 connection"), NULL},
{NULL, '\0', 0, NULL, 0} /* end the list */
@@ -252,29 +247,6 @@
#endif /* BALSA_USE_THREADS */
-/* initial_open_mailboxes:
- open mailboxes on startup if requested so.
- This is an idle handler. Be sure to use gdk_threads_{enter/leave}
- */
-static gboolean
-initial_open_unread_mailboxes()
-{
- GList *i, *gl;
- gdk_threads_enter();
- gl = balsa_mblist_find_all_unread_mboxes();
-
- if (gl) {
- for (i = g_list_first(gl); i; i = g_list_next(i)) {
- printf("opening %s..\n", (LIBBALSA_MAILBOX(i->data))->name);
- if(0)
- balsa_mblist_open_mailbox(LIBBALSA_MAILBOX(i->data));
- }
- g_list_free(gl);
- }
- gdk_threads_leave();
- return FALSE;
-}
-
static gboolean
initial_open_inbox()
@@ -345,6 +317,8 @@
gtk_init_check(&argc, &argv);
balsa_init(argc, argv);
+ balsa_app.debug=(int )cmd_line_debug;
+
#ifdef GTKHTML_HAVE_GCONF
if (!gconf_init(argc, argv, &gconf_error))
g_error_free(gconf_error);
@@ -400,19 +374,17 @@
} else
gtk_widget_show(window);
- if (cmd_check_mail_on_startup || balsa_app.check_mail_upon_startup)
+ if (!cmd_line_dialup && !balsa_app.dialup) { /*** TODO add NOT dialup option? */
check_new_messages_cb(NULL, NULL);
-
- if (cmd_open_unread_mailbox || balsa_app.open_unread_mailbox)
- gtk_idle_add((GtkFunction) initial_open_unread_mailboxes, NULL);
-
- if (cmd_open_inbox || balsa_app.open_inbox_upon_startup)
gtk_idle_add((GtkFunction) initial_open_inbox, NULL);
+ }
if (cmd_line_open_mailboxes) {
gchar **urls = g_strsplit(cmd_line_open_mailboxes, ";", 20);
gtk_idle_add((GtkFunction) open_mailboxes_idle_cb, urls);
}
+
+
signal( SIGPIPE, SIG_IGN );
gtk_idle_add((GtkFunction) scan_mailboxes_idle_cb, NULL);
@@ -495,29 +467,10 @@
argc = 1;
argv[0] = client_data;
- if (balsa_app.open_unread_mailbox) {
- argv[argc] = g_strdup("--open-unread-mailbox");
- argc++;
- }
-
- if (balsa_app.check_mail_upon_startup) {
- argv[argc] = g_strdup("--checkmail");
- argc++;
- }
-
- /* FIXME: I don't think this is needed?
- * We already save the open mailboes in save-restore.c
- * so we should just open them when loading prefs...
- */
-#if 0
- if (balsa_app.open_mailbox) {
- argv[argc] = g_strdup("--open-mailbox");
- argc++;
-
- argv[argc] = g_strconcat("'", balsa_app.open_mailbox, "'", NULL);
+ if (balsa_app.dialup) {
+ argv[argc] = g_strdup("--dialup");
argc++;
}
-#endif
if (opt_compose_email) {
argv[argc] = g_strdup("--compose");
Index: src/message-window.c
===================================================================
RCS file: /cvs/gnome/balsa/src/message-window.c,v
retrieving revision 1.42.2.11
diff -u -b -r1.42.2.11 message-window.c
--- src/message-window.c 2 Nov 2002 13:49:11 -0000 1.42.2.11
+++ src/message-window.c 14 Nov 2002 21:59:28 -0000
@@ -473,8 +473,7 @@
g_return_if_fail(widget != NULL);
g_return_if_fail(mw != NULL);
- sendmsg_window_new(widget, mw->message, balsa_app.forward_attached
- ? SEND_FORWARD_ATTACH : SEND_FORWARD_INLINE);
+ sendmsg_window_new(widget, mw->message, SEND_FORWARD_ATTACH);
}
static void
Index: src/pref-manager.c
===================================================================
RCS file: /cvs/gnome/balsa/src/pref-manager.c,v
retrieving revision 1.190.2.16
diff -u -b -r1.190.2.16 pref-manager.c
--- src/pref-manager.c 28 Oct 2002 22:50:05 -0000 1.190.2.16
+++ src/pref-manager.c 14 Nov 2002 21:59:30 -0000
@@ -72,9 +72,6 @@
GtkWidget *encoding_menu;
GtkWidget *check_mail_auto;
GtkWidget *check_mail_minutes;
- GtkWidget *quiet_background_check;
- GtkWidget *check_imap;
- GtkWidget *check_imap_inbox;
GtkWidget *notify_new_mail_dialog;
GtkWidget *mdn_reply_clean_menu, *mdn_reply_notclean_menu;
@@ -86,26 +83,20 @@
GtkWidget *previewpane;
GtkWidget *alternative_layout;
- GtkWidget *view_message_on_open;
+ GtkWidget *progress;
GtkWidget *line_length;
GtkWidget *pgdownmod;
GtkWidget *pgdown_percent;
GtkWidget *view_allheaders;
- GtkWidget *debug; /* enable/disable debugging */
GtkWidget *empty_trash;
- GtkRadioButton *pwindow_type[NUM_PWINDOW_MODES];
GtkWidget *wordwrap;
GtkWidget *wraplength;
GtkWidget *send_rfc2646_format_flowed;
- GtkWidget *open_inbox_upon_startup;
- GtkWidget *check_mail_upon_startup;
- GtkWidget *remember_open_mboxes;
+ GtkWidget *dialup;
GtkWidget *mblist_show_mb_content_info;
GtkWidget *always_queue_sent_mail;
GtkWidget *copy_to_sentbox;
GtkWidget *autoquote;
- GtkWidget *reply_strip_html_parts;
- GtkWidget *forward_attached;
/* Information messages */
GtkWidget *information_message_menu;
@@ -174,10 +165,12 @@
static GtkWidget *create_mailserver_page(gpointer);
static GtkWidget *remote_mailbox_servers_group(GtkWidget * page);
static GtkWidget *local_mail_group(GtkWidget * page);
+static GtkWidget *imap_folder_scanning_group(GtkWidget * page);
#if ENABLE_ESMTP
static GtkWidget *outgoing_mail_group(GtkWidget * page);
#endif
+
/* Address Books page */
static GtkWidget *create_address_book_page(gpointer);
static GtkWidget *address_books_group(GtkWidget * page);
@@ -200,7 +193,6 @@
static GtkWidget *display_subpage(gpointer data);
static GtkWidget *main_window_group(GtkWidget * page);
-static GtkWidget *progress_group(GtkWidget * page);
static GtkWidget *display_formats_group(GtkWidget * page);
static GtkWidget *status_messages_subpage(gpointer data);
@@ -216,7 +208,6 @@
static GtkWidget *preview_font_group(GtkWidget * page);
static GtkWidget *subject_header_font_group(GtkWidget * page);
-static GtkWidget *threading_subpage(gpointer data);
static GtkWidget *threading_group(GtkWidget * page);
/* Spelling page */
@@ -229,10 +220,6 @@
static GtkWidget *misc_group(GtkWidget * page);
static GtkWidget *deleting_messages_group(GtkWidget * page);
-/* Startup page */
-static GtkWidget *create_startup_page(gpointer);
-static GtkWidget *options_group(GtkWidget * page);
-static GtkWidget *imap_folder_scanning_group(GtkWidget * page);
/* general helpers */
static GtkWidget *create_table(gint rows, gint cols, GtkWidget * page);
@@ -300,7 +287,6 @@
static void spelling_optionmenu_cb(GtkItem * menuitem, gpointer data);
static void threading_optionmenu_cb(GtkItem* menuitem, gpointer data);
static void set_default_address_book_cb(GtkWidget * button, gpointer data);
-static void imap_toggled_cb(GtkWidget * widget, GtkWidget * pbox);
guint encoding_type[NUM_ENCODING_MODES] = {
ENC7BIT,
@@ -314,12 +300,6 @@
N_("Quoted")
};
-guint pwindow_type[NUM_PWINDOW_MODES] = {
- WHILERETR,
- UNTILCLOSED,
- NEVER
-};
-
gchar *pwindow_type_label[NUM_PWINDOW_MODES] = {
N_("While Retrieving Messages"),
N_("Until Closed"),
@@ -407,23 +387,13 @@
gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
create_misc_page(property_box),
gtk_label_new(_("Misc")));
-
- gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
- create_startup_page(property_box),
- gtk_label_new(_("Startup")));
-
set_prefs();
- for (i = 0; i < NUM_PWINDOW_MODES; i++) {
- g_signal_connect(G_OBJECT(pui->pwindow_type[i]), "clicked",
- G_CALLBACK(properties_modified_cb), property_box);
- }
-
g_signal_connect(G_OBJECT(pui->previewpane), "toggled",
G_CALLBACK(properties_modified_cb), property_box);
g_signal_connect(G_OBJECT(pui->alternative_layout), "toggled",
G_CALLBACK(properties_modified_cb), property_box);
- g_signal_connect(G_OBJECT (pui->view_message_on_open), "toggled",
+ g_signal_connect(G_OBJECT (pui->progress), "toggled",
G_CALLBACK (properties_modified_cb), property_box);
g_signal_connect(G_OBJECT (pui->line_length), "toggled",
G_CALLBACK (properties_modified_cb), property_box);
@@ -431,8 +401,6 @@
G_CALLBACK(pgdown_modified_cb), property_box);
g_signal_connect(G_OBJECT(pui->pgdown_percent), "changed",
G_CALLBACK(pgdown_modified_cb), property_box);
- g_signal_connect(G_OBJECT(pui->debug), "toggled",
- G_CALLBACK(properties_modified_cb), property_box);
g_signal_connect(G_OBJECT(pui->mblist_show_mb_content_info), "toggled",
G_CALLBACK(properties_modified_cb), property_box);
@@ -466,15 +434,6 @@
g_signal_connect(G_OBJECT(pui->check_mail_minutes), "changed",
G_CALLBACK(timer_modified_cb), property_box);
- g_signal_connect(G_OBJECT(pui->quiet_background_check), "toggled",
- G_CALLBACK(properties_modified_cb), property_box);
-
- g_signal_connect(G_OBJECT(pui->check_imap), "toggled",
- G_CALLBACK(imap_toggled_cb), property_box);
-
- g_signal_connect(G_OBJECT(pui->check_imap_inbox), "toggled",
- G_CALLBACK(properties_modified_cb), property_box);
-
g_signal_connect(G_OBJECT(pui->notify_new_mail_dialog), "toggled",
G_CALLBACK(properties_modified_cb), property_box);
@@ -508,10 +467,6 @@
G_CALLBACK(properties_modified_cb), property_box);
g_signal_connect(G_OBJECT(pui->autoquote), "toggled",
G_CALLBACK(properties_modified_cb), property_box);
- g_signal_connect(G_OBJECT(pui->reply_strip_html_parts), "toggled",
- G_CALLBACK(properties_modified_cb), property_box);
- g_signal_connect(G_OBJECT(pui->forward_attached), "toggled",
- G_CALLBACK(properties_modified_cb), property_box);
/* external editor */
g_signal_connect(G_OBJECT(pui->extern_editor_command), "changed",
@@ -542,11 +497,7 @@
G_CALLBACK(font_changed_cb), property_box);
- g_signal_connect(G_OBJECT(pui->open_inbox_upon_startup), "toggled",
- G_CALLBACK(properties_modified_cb), property_box);
- g_signal_connect(G_OBJECT(pui->check_mail_upon_startup), "toggled",
- G_CALLBACK(properties_modified_cb), property_box);
- g_signal_connect(G_OBJECT(pui->remember_open_mboxes), "toggled",
+ g_signal_connect(G_OBJECT(pui->dialup), "toggled",
G_CALLBACK(properties_modified_cb), property_box);
g_signal_connect(G_OBJECT(pui->imap_scan_depth), "changed",
@@ -684,16 +635,10 @@
/*
* display page
*/
- for (i = 0; i < NUM_PWINDOW_MODES; i++)
- if (GTK_TOGGLE_BUTTON(pui->pwindow_type[i])->active) {
- balsa_app.pwindow_option = pwindow_type[i];
- break;
- }
- balsa_app.debug = GTK_TOGGLE_BUTTON(pui->debug)->active;
balsa_app.previewpane = GTK_TOGGLE_BUTTON(pui->previewpane)->active;
balsa_app.alternative_layout = GTK_TOGGLE_BUTTON(pui->alternative_layout)->active;
- balsa_app.view_message_on_open = GTK_TOGGLE_BUTTON (pui->view_message_on_open)->active;
+ balsa_app.progress = GTK_TOGGLE_BUTTON (pui->progress)->active;
balsa_app.line_length = GTK_TOGGLE_BUTTON (pui->line_length)->active;
balsa_app.pgdownmod = GTK_TOGGLE_BUTTON(pui->pgdownmod)->active;
balsa_app.pgdown_percent =
@@ -719,12 +664,6 @@
balsa_app.check_mail_timer =
gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
(pui->check_mail_minutes));
- balsa_app.quiet_background_check =
- GTK_TOGGLE_BUTTON(pui->quiet_background_check)->active;
- balsa_app.check_imap =
- GTK_TOGGLE_BUTTON(pui->check_imap)->active;
- balsa_app.check_imap_inbox =
- GTK_TOGGLE_BUTTON(pui->check_imap_inbox)->active;
balsa_app.notify_new_mail_dialog =
GTK_TOGGLE_BUTTON(pui->notify_new_mail_dialog)->active;
menu_item = gtk_menu_get_active(GTK_MENU(pui->mdn_reply_clean_menu));
@@ -746,10 +685,6 @@
GTK_TOGGLE_BUTTON(pui->send_rfc2646_format_flowed)->active;
balsa_app.autoquote =
GTK_TOGGLE_BUTTON(pui->autoquote)->active;
- balsa_app.reply_strip_html =
- GTK_TOGGLE_BUTTON(pui->reply_strip_html_parts)->active;
- balsa_app.forward_attached =
- GTK_TOGGLE_BUTTON(pui->forward_attached)->active;
balsa_app.always_queue_sent_mail =
GTK_TOGGLE_BUTTON(pui->always_queue_sent_mail)->active;
balsa_app.copy_to_sentbox =
@@ -808,12 +743,8 @@
balsa_app.recognize_rfc2646_format_flowed =
GTK_TOGGLE_BUTTON(pui->recognize_rfc2646_format_flowed)->active;
- balsa_app.open_inbox_upon_startup =
- GTK_TOGGLE_BUTTON(pui->open_inbox_upon_startup)->active;
- balsa_app.check_mail_upon_startup =
- GTK_TOGGLE_BUTTON(pui->check_mail_upon_startup)->active;
- balsa_app.remember_open_mboxes =
- GTK_TOGGLE_BUTTON(pui->remember_open_mboxes)->active;
+ balsa_app.dialup =
+ GTK_TOGGLE_BUTTON(pui->dialup)->active;
balsa_app.imap_scan_depth =
gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
(pui->imap_scan_depth));
@@ -926,13 +857,6 @@
unsigned i;
gchar* tmp;
- for (i = 0; i < NUM_PWINDOW_MODES; i++)
- if (balsa_app.pwindow_option == pwindow_type[i]) {
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
- (pui->pwindow_type[i]), TRUE);
- break;
- }
-
#if ENABLE_ESMTP
if (balsa_app.smtp_server)
gtk_entry_set_text(GTK_ENTRY(pui->smtp_server),
@@ -962,8 +886,8 @@
balsa_app.previewpane);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->alternative_layout),
balsa_app.alternative_layout);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->view_message_on_open),
- balsa_app.view_message_on_open);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->progress),
+ balsa_app.progress);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->line_length),
balsa_app.line_length);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->pgdownmod),
@@ -972,8 +896,6 @@
(float) balsa_app.pgdown_percent);
gtk_widget_set_sensitive(pui->pgdown_percent,
GTK_TOGGLE_BUTTON(pui->pgdownmod)->active);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->debug),
- balsa_app.debug);
for (i = 0; i < NUM_ENCODING_MODES; i++)
if (balsa_app.encoding_style == encoding_type[i]) {
@@ -990,19 +912,8 @@
gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->check_mail_minutes),
(float) balsa_app.check_mail_timer);
gtk_toggle_button_set_active(
- GTK_TOGGLE_BUTTON(pui->quiet_background_check),
- balsa_app.quiet_background_check);
- gtk_toggle_button_set_active(
- GTK_TOGGLE_BUTTON(pui->check_imap),
- balsa_app.check_imap);
- gtk_toggle_button_set_active(
- GTK_TOGGLE_BUTTON(pui->check_imap_inbox),
- balsa_app.check_imap_inbox);
- gtk_toggle_button_set_active(
GTK_TOGGLE_BUTTON(pui->notify_new_mail_dialog),
balsa_app.notify_new_mail_dialog);
- if(!balsa_app.check_imap)
- gtk_widget_set_sensitive(GTK_WIDGET(pui->check_imap_inbox), FALSE);
gtk_menu_set_active(GTK_MENU(pui->mdn_reply_clean_menu),
balsa_app.mdn_reply_clean);
@@ -1044,10 +955,6 @@
balsa_app.copy_to_sentbox);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->autoquote),
balsa_app.autoquote);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->reply_strip_html_parts),
- balsa_app.reply_strip_html);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->forward_attached),
- balsa_app.forward_attached);
gtk_widget_set_sensitive(pui->wraplength,
GTK_TOGGLE_BUTTON(pui->wordwrap)->active);
@@ -1090,14 +997,8 @@
gtk_editable_set_position(GTK_EDITABLE(pui->subject_font), 0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
- (pui->open_inbox_upon_startup),
- balsa_app.open_inbox_upon_startup);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
- (pui->check_mail_upon_startup),
- balsa_app.check_mail_upon_startup);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
- (pui->remember_open_mboxes),
- balsa_app.remember_open_mboxes);
+ (pui->dialup),
+ balsa_app.dialup);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(pui->imap_scan_depth),
balsa_app.imap_scan_depth);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->empty_trash),
@@ -1443,11 +1344,13 @@
GtkWidget *page = pm_page_new();
pm_page_add(page, remote_mailbox_servers_group(page));
+ pm_page_add(page, imap_folder_scanning_group(page));
pm_page_add(page, local_mail_group(page));
#if ENABLE_ESMTP
pm_page_add(page, outgoing_mail_group(page));
#endif
+
return page;
}
@@ -1472,7 +1375,7 @@
gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, FALSE, FALSE, 0);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
- gtk_widget_set_size_request(scrolledwindow, -1, 150);
+ gtk_widget_set_size_request(scrolledwindow, -1, 120);
gtk_size_group_add_widget(size_group, scrolledwindow);
store = gtk_list_store_new(MS_N_COLUMNS,
@@ -1642,27 +1545,11 @@
gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
- pui->check_imap = gtk_check_button_new_with_mnemonic(
- _("Check _IMAP mailboxes"));
- gtk_table_attach(GTK_TABLE(table), pui->check_imap, 0, 1, 1, 2,
- GTK_FILL, 0, 0, 0);
- gtk_size_group_add_widget(size_group, pui->check_imap);
-
- pui->check_imap_inbox = gtk_check_button_new_with_mnemonic(
- _("Check INBOX _only"));
- gtk_table_attach(GTK_TABLE(table), pui->check_imap_inbox, 1, 3, 1, 2,
- GTK_FILL, 0, 0, 0);
-
pui->notify_new_mail_dialog = gtk_check_button_new_with_label(
_("Display message if new mail has arrived in an open mailbox"));
gtk_table_attach(GTK_TABLE(table), pui->notify_new_mail_dialog,
0, 4, 2, 3, GTK_FILL, 0, 0, 0);
- pui->quiet_background_check = gtk_check_button_new_with_label(
- _("Do background check quietly (no messages in status bar)"));
- gtk_table_attach(GTK_TABLE(table), pui->quiet_background_check,
- 0, 4, 3, 4, GTK_FILL, 0, 0, 0);
-
return group;
}
@@ -1857,12 +1744,6 @@
pui->autoquote =
pm_group_add_check(group, _("Automatically quote original "
"when replying"));
- pui->reply_strip_html_parts =
- pm_group_add_check(group, _("Don't include HTML parts as text "
- "when replying or forwarding mail"));
- pui->forward_attached =
- pm_group_add_check(group, _("Forward a mail as attachment "
- "instead of quoting it"));
pui->always_queue_sent_mail =
pm_group_add_check(group, _("Send button always queues "
"outgoing mail in outbox"));
@@ -1915,8 +1796,6 @@
gtk_label_new(_("Colors")));
gtk_notebook_append_page(GTK_NOTEBOOK(note), fonts_subpage(data),
gtk_label_new(_("Fonts")));
- gtk_notebook_append_page(GTK_NOTEBOOK(note), threading_subpage(data),
- gtk_label_new(_("Threading")));
return note;
}
@@ -1927,7 +1806,7 @@
GtkWidget *page = pm_page_new();
pm_page_add(page, main_window_group(page));
- pm_page_add(page, progress_group(page));
+ pm_page_add(page, threading_group(page));
pm_page_add(page, display_formats_group(page));
return page;
@@ -1949,9 +1828,8 @@
pm_group_add_check(group, _("Show mailbox statistics in left pane"));
pui->alternative_layout =
pm_group_add_check(group, _("Use alternative main window layout"));
- pui->view_message_on_open =
- pm_group_add_check(group, _("Automatically view message "
- "when mailbox opened"));
+ pui->progress =
+ pm_group_add_check(group, _("Show Progress Dialog"));
pui->line_length =
pm_group_add_check(group, _("Display message size as number of lines"));
@@ -1977,26 +1855,6 @@
return group;
}
-static GtkWidget *
-progress_group(GtkWidget * page)
-{
- GtkWidget *group;
- GSList *radio_group;
- gint i;
-
- group = pm_group_new(_("Display Progress Dialog"));
-
- radio_group = NULL;
- for (i = 0; i < NUM_PWINDOW_MODES; i++) {
- pui->pwindow_type[i] =
- GTK_RADIO_BUTTON(gtk_radio_button_new_with_label
- (radio_group, _(pwindow_type_label[i])));
- pm_group_add(group, GTK_WIDGET(pui->pwindow_type[i]));
- radio_group = gtk_radio_button_get_group(pui->pwindow_type[i]);
- }
-
- return group;
-}
static GtkWidget *
display_formats_group(GtkWidget * page)
@@ -2241,16 +2099,6 @@
}
static GtkWidget *
-threading_subpage(gpointer data)
-{
- GtkWidget *page = pm_page_new();
-
- pm_page_add(page, threading_group(page));
-
- return page;
-}
-
-static GtkWidget *
threading_group(GtkWidget * page)
{
GtkWidget *group;
@@ -2413,7 +2261,7 @@
group = pm_group_new(_("Miscellaneous"));
- pui->debug = pm_group_add_check(group, _("Debug"));
+ pui->dialup = pm_group_add_check(group, _("Dialup Connection"));
pui->empty_trash = pm_group_add_check(group, _("Empty Trash on exit"));
hbox = gtk_hbox_new(FALSE, COL_SPACING);
@@ -2460,35 +2308,6 @@
}
static GtkWidget *
-create_startup_page(gpointer data)
-{
- GtkWidget *page = pm_page_new();
-
- pm_page_add(page, options_group(page));
- pm_page_add(page, imap_folder_scanning_group(page));
-
- return page;
-}
-
-static GtkWidget *
-options_group(GtkWidget * page)
-{
- GtkWidget *group;
-
- group = pm_group_new(_("Options"));
-
- pui->open_inbox_upon_startup =
- pm_group_add_check(group, _("Open Inbox upon startup"));
- pui->check_mail_upon_startup =
- pm_group_add_check(group, _("Check mail upon startup"));
- pui->remember_open_mboxes =
- pm_group_add_check(group, _("Remember open mailboxes "
- "between sessions"));
-
- return group;
-}
-
-static GtkWidget *
imap_folder_scanning_group(GtkWidget * page)
{
GtkWidget *group;
@@ -2944,18 +2763,6 @@
properties_modified_cb(widget, pbox);
}
-static void imap_toggled_cb(GtkWidget * widget, GtkWidget * pbox)
-{
- properties_modified_cb(widget, pbox);
-
- if(GTK_TOGGLE_BUTTON(pui->check_imap)->active)
- gtk_widget_set_sensitive(GTK_WIDGET(pui->check_imap_inbox), TRUE);
- else {
- gtk_toggle_button_set_active(
- GTK_TOGGLE_BUTTON(pui->check_imap_inbox), FALSE);
- gtk_widget_set_sensitive(GTK_WIDGET(pui->check_imap_inbox), FALSE);
- }
-}
#if ENABLE_ESMTP
static GtkWidget *
Index: src/save-restore.c
===================================================================
RCS file: /cvs/gnome/balsa/src/save-restore.c,v
retrieving revision 1.230.2.20
diff -u -b -r1.230.2.20 save-restore.c
--- src/save-restore.c 2 Nov 2002 13:49:11 -0000 1.230.2.20
+++ src/save-restore.c 14 Nov 2002 21:59:31 -0000
@@ -459,8 +459,6 @@
static gint
config_global_load(void)
{
- gchar **open_mailbox_vector;
- gint open_mailbox_count;
#if ENABLE_ESMTP
gboolean def_used;
#endif
@@ -625,7 +623,6 @@
/* ... alternative layout of main window */
balsa_app.alternative_layout = gnome_config_get_bool("AlternativeLayout=false");
- balsa_app.view_message_on_open = gnome_config_get_bool("ViewMessageOnOpen=true");
balsa_app.line_length = gnome_config_get_bool("MsgSizeAsLines=true");
balsa_app.pgdownmod = gnome_config_get_bool("PageDownMod=false");
balsa_app.pgdown_percent = gnome_config_get_int("PageDownPercent=50");
@@ -633,7 +630,7 @@
balsa_app.pgdown_percent = 10;
/* ... Progress Window Dialog */
- balsa_app.pwindow_option = d_get_gint("ProgressWindow", WHILERETR);
+ balsa_app.progress = gnome_config_get_bool("ShowProgress=true");
balsa_app.drag_default_is_move = d_get_gint("DragDefaultIsMove", 0);
balsa_app.delete_immediately =
gnome_config_get_bool("DeleteImmediately=false");
@@ -700,17 +697,14 @@
d_get_gint("NewMailNotificationDialog", 0);
balsa_app.notify_new_mail_sound =
d_get_gint("NewMailNotificationSound", 1);
- balsa_app.check_mail_upon_startup =
- gnome_config_get_bool("OnStartup=false");
+ balsa_app.dialup =
+ gnome_config_get_bool("Dialup=false");
balsa_app.check_mail_auto = gnome_config_get_bool("Auto=false");
balsa_app.check_mail_timer = gnome_config_get_int("AutoDelay=10");
if (balsa_app.check_mail_timer < 1)
balsa_app.check_mail_timer = 10;
if (balsa_app.check_mail_auto)
update_timer(TRUE, balsa_app.check_mail_timer);
- balsa_app.check_imap=d_get_gint("CheckIMAP", 1);
- balsa_app.check_imap_inbox=d_get_gint("CheckIMAPInbox", 0);
- balsa_app.quiet_background_check=d_get_gint("QuietBackgroundCheck", 0);
gnome_config_pop_prefix();
/* IMAP folder scanning */
@@ -780,10 +774,6 @@
gnome_config_get_bool("SendRFC2646FormatFlowed=true");
balsa_app.autoquote =
gnome_config_get_bool("AutoQuote=true");
- balsa_app.reply_strip_html =
- gnome_config_get_bool("StripHtmlInReply=true");
- balsa_app.forward_attached =
- gnome_config_get_bool("ForwardAttached=true");
balsa_app.always_queue_sent_mail = d_get_gint("AlwaysQueueSentMail", 0);
balsa_app.copy_to_sentbox = d_get_gint("CopyToSentbox", 1);
@@ -825,27 +815,9 @@
balsa_app.local_mail_directory));
balsa_mailbox_nodes_unlock(TRUE);
- balsa_app.open_inbox_upon_startup =
- gnome_config_get_bool("OpenInboxOnStartup=false");
- /* debugging enabled */
- balsa_app.debug = gnome_config_get_bool("Debug=false");
-
balsa_app.close_mailbox_auto = gnome_config_get_bool("AutoCloseMailbox=true");
balsa_app.close_mailbox_timeout = gnome_config_get_int("AutoCloseMailboxTimeout=10");
- balsa_app.remember_open_mboxes =
- gnome_config_get_bool("RememberOpenMailboxes=false");
- gnome_config_get_vector("OpenMailboxes", &open_mailbox_count,
- &open_mailbox_vector);
- if (balsa_app.remember_open_mboxes && open_mailbox_count > 0
- && **open_mailbox_vector) {
- /* FIXME: Open the mailboxes.... */
- printf("Opening %d mailboxes on startup.\n", open_mailbox_count);
- gtk_idle_add((GtkFunction) open_mailboxes_idle_cb,
- open_mailbox_vector);
- } else
- g_strfreev(open_mailbox_vector);
-
balsa_app.empty_trash_on_exit =
gnome_config_get_bool("EmptyTrash=false");
@@ -961,9 +933,8 @@
gnome_config_set_bool("ShowPreviewPane", balsa_app.previewpane);
gnome_config_set_bool("ShowMailboxList", balsa_app.show_mblist);
gnome_config_set_bool("ShowTabs", balsa_app.show_notebook_tabs);
- gnome_config_set_int("ProgressWindow", balsa_app.pwindow_option);
+ gnome_config_set_bool("ShowProgress", balsa_app.progress);
gnome_config_set_bool("AlternativeLayout", balsa_app.alternative_layout);
- gnome_config_set_bool("ViewMessageOnOpen", balsa_app.view_message_on_open);
gnome_config_set_bool("MsgSizeAsLines", balsa_app.line_length);
gnome_config_set_bool("PageDownMod", balsa_app.pgdownmod);
gnome_config_set_int("PageDownPercent", balsa_app.pgdown_percent);
@@ -1014,13 +985,8 @@
balsa_app.notify_new_mail_dialog);
gnome_config_set_int("NewMailNotificationSound",
balsa_app.notify_new_mail_sound);
- gnome_config_set_bool("OnStartup", balsa_app.check_mail_upon_startup);
gnome_config_set_bool("Auto", balsa_app.check_mail_auto);
gnome_config_set_int("AutoDelay", balsa_app.check_mail_timer);
- gnome_config_set_int("CheckIMAP", balsa_app.check_imap);
- gnome_config_set_int("CheckIMAPInbox", balsa_app.check_imap_inbox);
- gnome_config_set_int("QuietBackgroundCheck",
- balsa_app.quiet_background_check);
gnome_config_pop_prefix();
@@ -1062,8 +1028,6 @@
gnome_config_set_bool("SendRFC2646FormatFlowed",
balsa_app.send_rfc2646_format_flowed);
gnome_config_set_bool("AutoQuote", balsa_app.autoquote);
- gnome_config_set_bool("StripHtmlInReply", balsa_app.reply_strip_html);
- gnome_config_set_bool("ForwardAttached", balsa_app.forward_attached);
gnome_config_set_int("AlwaysQueueSentMail", balsa_app.always_queue_sent_mail);
gnome_config_set_int("CopyToSentbox", balsa_app.copy_to_sentbox);
@@ -1087,9 +1051,8 @@
gnome_config_set_string("MailDir", balsa_app.local_mail_directory);
- gnome_config_set_bool("OpenInboxOnStartup",
- balsa_app.open_inbox_upon_startup);
- gnome_config_set_bool("Debug", balsa_app.debug);
+ gnome_config_set_bool("Dialup",
+ balsa_app.dialup);
gnome_config_set_bool("AutoCloseMailbox", balsa_app.close_mailbox_auto);
gnome_config_set_int("AutoCloseMailboxTimeout", balsa_app.close_mailbox_timeout);
@@ -1100,8 +1063,6 @@
g_list_length(balsa_app.open_mailbox_list),
(const char **) open_mailboxes_vector);
g_strfreev(open_mailboxes_vector);
- gnome_config_set_bool("RememberOpenMailboxes",
- balsa_app.remember_open_mboxes);
gnome_config_set_bool("EmptyTrash", balsa_app.empty_trash_on_exit);
if (balsa_app.default_address_book) {
Index: src/sendmsg-window.c
===================================================================
RCS file: /cvs/gnome/balsa/src/sendmsg-window.c,v
retrieving revision 1.341.2.42
diff -u -b -r1.341.2.42 sendmsg-window.c
--- src/sendmsg-window.c 5 Nov 2002 11:00:28 -0000 1.341.2.42
+++ src/sendmsg-window.c 14 Nov 2002 21:59:33 -0000
@@ -2197,7 +2197,7 @@
type == SEND_REPLY_GROUP) ?
balsa_app.quote_str : NULL,
balsa_app.wordwrap ? balsa_app.wraplength : -1,
- balsa_app.reply_strip_html, msg->flow);
+ 1, msg->flow);
if (body)
g_string_prepend(body, str);
else
Index: libbalsa/notify.c
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/notify.c,v
retrieving revision 1.11
diff -u -b -r1.11 notify.c
--- libbalsa/notify.c 5 Jan 2002 12:48:30 -0000 1.11
+++ libbalsa/notify.c 14 Nov 2002 21:59:34 -0000
@@ -118,9 +118,14 @@
libbalsa_unlock_mutt();
}
+static gboolean imap_check_test(const gchar *path)
+{
+ /* *** FIXME: Modify libmutt so this isn't necessary */
+ return TRUE;
+}
void
-libbalsa_notify_start_check(gboolean imap_check_test(const gchar *path))
+libbalsa_notify_start_check(void)
{
/* Might as well use check rather than notify. All notify does is */
/* write messages for each mailbox */
Index: libbalsa/notify.h
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/notify.h,v
retrieving revision 1.5
diff -u -b -r1.5 notify.h
--- libbalsa/notify.h 14 Aug 2001 16:00:18 -0000 1.5
+++ libbalsa/notify.h 14 Nov 2002 21:59:34 -0000
@@ -31,7 +31,7 @@
void libbalsa_notify_unregister_mailbox(LibBalsaMailbox * mailbox);
/* Call libbalsa_notify_start_check before checking each mailbox */
-void libbalsa_notify_start_check(gboolean imap_check_test(const gchar *path));
+void libbalsa_notify_start_check(void);
/* Used by the mailboxes. */
gint libbalsa_notify_check_mailbox(LibBalsaMailbox * mailbox);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]