Preferences window
- From: Darko Obradovic <dobradovic gmx de>
- To: balsa-list gnome org
- Subject: Preferences window
- Date: Wed, 7 Jul 2004 21:09:14 +0200
Hi all,
Related to bug #129960 I've investigated what makes the preferences
window so big, and by removing the unknown-8bit-handling, at least the
width fits 800x600 now.
I think this pref isn't really important. Broken messages are rare and
it's not Balsa's duty to fix them (it's no reliable fix anyways),
replacing unknown characters with question marks sounds reasonable and
won't break anything.
So I removed the pref from the UI by now (see attached patch against
2.0.18) and I'm willed to remove it cleanly from the backend as well,
which will remove quite some overhead, but experience has shown that
most probably you won't like this, so I'm better asking first before
wasting my time. :)
bye,
Darko
diff -ruN balsa-2.0.18/src/pref-manager.c balsa-2.0.18-no-8bit-pref/src/pref-manager.c
--- balsa-2.0.18/src/pref-manager.c 2003-11-22 00:53:05.000000000 +0100
+++ balsa-2.0.18-no-8bit-pref/src/pref-manager.c 2004-07-07 18:38:46.701380448 +0200
@@ -45,7 +45,6 @@
#define NUM_ENCODING_MODES 3
#define NUM_PWINDOW_MODES 3
#define NUM_THREADING_STYLES 3
-#define NUM_CONVERT_8BIT_MODES 2
/* Spacing suggestions from
* http://developer.gnome.org/projects/gup/hig/1.0/layout.html#window-layout-spacing
@@ -154,10 +153,6 @@
/* how to display multipart/alternative */
GtkWidget *display_alt_plain;
- /* how to handle broken mails with 8-bit chars */
- GtkRadioButton *convert_unknown_8bit[NUM_CONVERT_8BIT_MODES];
- GtkWidget *convert_unknown_8bit_codeset;
-
/* spell checking */
GtkWidget *module;
gint module_index;
@@ -313,8 +308,6 @@
static void set_default_address_book_cb(GtkWidget * button, gpointer data);
static void imap_toggled_cb(GtkWidget * widget, GtkWidget * pbox);
-static void convert_8bit_cb(GtkWidget * widget, GtkWidget * pbox);
-
guint encoding_type[NUM_ENCODING_MODES] = {
ENC7BIT,
ENC8BIT,
@@ -631,11 +624,6 @@
g_signal_connect(G_OBJECT(pui->bad_address_color), "released",
G_CALLBACK(properties_modified_cb), property_box);
- /* handling of message parts with 8-bit chars without codeset headers */
- for (i = 0; i < NUM_CONVERT_8BIT_MODES; i++)
- g_signal_connect(G_OBJECT(pui->convert_unknown_8bit[i]), "toggled",
- G_CALLBACK(convert_8bit_cb), property_box);
-
/* Gnome Property Box Signals */
g_signal_connect(G_OBJECT(property_box), "response",
G_CALLBACK(response_cb), NULL);
@@ -942,14 +930,6 @@
balsa_app.debug_message =
GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menu_item), "balsa-data"));
- /* handling of 8-bit message parts without codeset header */
- balsa_app.convert_unknown_8bit =
- GTK_TOGGLE_BUTTON(pui->convert_unknown_8bit[1])->active;
- menu_item =
- gtk_menu_get_active(GTK_MENU(gtk_option_menu_get_menu(GTK_OPTION_MENU(pui->convert_unknown_8bit_codeset))));
- balsa_app.convert_unknown_8bit_codeset =
- GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menu_item), "balsa-data"));
-
/*
* close window and free memory
*/
@@ -1215,12 +1195,6 @@
balsa_app.error_message);
gtk_menu_set_active(GTK_MENU(pui->debug_message_menu),
balsa_app.debug_message);
-
- /* handling of 8-bit message parts without codeset header */
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->convert_unknown_8bit[1]),
- balsa_app.convert_unknown_8bit);
- gtk_widget_set_sensitive(pui->convert_unknown_8bit_codeset,
- balsa_app.convert_unknown_8bit);
}
enum {
@@ -1773,54 +1747,6 @@
}
static GtkWidget *
-broken_8bit_codeset_group(GtkWidget * page)
-{
- GtkSizeGroup *size_group = pm_page_get_size_group(page);
- GtkWidget *group;
- GtkWidget *table;
- GSList *radio_group = NULL;
- GtkWidget *menu;
-
- /* treatment of messages with 8-bit chars, but without proper MIME encoding */
-
- group = pm_group_new(_("National (8-bit) characters in broken messages without codeset header"));
- table = create_table(2, 2, page);
- pm_group_add(group, table);
-
- pui->convert_unknown_8bit[0] =
- GTK_RADIO_BUTTON(gtk_radio_button_new_with_label(radio_group,
- _("display as \"?\"")));
- gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(pui->convert_unknown_8bit[0]),
- 0, 2, 0, 1,
- (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
- radio_group =
- gtk_radio_button_get_group(GTK_RADIO_BUTTON(pui->convert_unknown_8bit[0]));
-
- pui->convert_unknown_8bit[1] =
- GTK_RADIO_BUTTON(gtk_radio_button_new_with_label(radio_group,
- _("display using codeset")));
- gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(pui->convert_unknown_8bit[1]),
- 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
-
- pui->convert_unknown_8bit_codeset = gtk_option_menu_new ();
- gtk_table_attach(GTK_TABLE(table), pui->convert_unknown_8bit_codeset,
- 1, 2, 1, 2,
- (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0);
-
- menu = create_codeset_menu();
- gtk_option_menu_set_menu(GTK_OPTION_MENU(pui->convert_unknown_8bit_codeset),
- menu);
- gtk_option_menu_set_history(GTK_OPTION_MENU(pui->convert_unknown_8bit_codeset),
- balsa_app.convert_unknown_8bit_codeset);
-
- gtk_size_group_add_widget(size_group, table);
-
- return group;
-}
-
-
-static GtkWidget *
mdn_group(GtkWidget * page)
{
GtkWidget *group;
@@ -2248,7 +2174,6 @@
pm_page_add(page, preview_font_group(page));
pm_page_add(page, quoted_group(page));
pm_page_add(page, alternative_group(page));
- pm_page_add(page, broken_8bit_codeset_group(page));
return page;
}
@@ -3071,15 +2996,6 @@
}
}
-static void
-convert_8bit_cb(GtkWidget * widget, GtkWidget * pbox)
-{
- properties_modified_cb(widget, pbox);
-
- gtk_widget_set_sensitive(pui->convert_unknown_8bit_codeset,
- GTK_TOGGLE_BUTTON(pui->convert_unknown_8bit[1])->active);
-}
-
#if ENABLE_ESMTP
static GtkWidget *
create_tls_mode_menu(void)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]