balsa r7915 - in trunk: . images/16x16 images/24x24 images/mimetypes libinit_balsa po src



Author: pawels
Date: Tue Apr 22 20:27:40 2008
New Revision: 7915
URL: http://svn.gnome.org/viewvc/balsa?rev=7915&view=rev

Log:
* src/balsa-app.c: format=flowed by default.
* libinit_balsa/assistant_page_user.[ch]: guess more stuff.
* libinit_balsa/assistant_init.c: we have new code already, keep it silent.


Modified:
   trunk/ChangeLog
   trunk/images/16x16/Makefile.am
   trunk/images/24x24/Makefile.am
   trunk/images/mimetypes/Makefile.am
   trunk/libinit_balsa/assistant_init.c
   trunk/libinit_balsa/assistant_page_user.c
   trunk/libinit_balsa/assistant_page_user.h
   trunk/libinit_balsa/balsa-druid-page-user.c
   trunk/libinit_balsa/balsa-druid-page-user.h
   trunk/po/id.po
   trunk/src/balsa-app.c

Modified: trunk/images/16x16/Makefile.am
==============================================================================
--- trunk/images/16x16/Makefile.am	(original)
+++ trunk/images/16x16/Makefile.am	Tue Apr 22 20:27:40 2008
@@ -1,4 +1,24 @@
-extra_appicons_IMGS = $(wildcard balsa-*.png)
+extra_appicons_IMGS = \
+	balsa-drop-down.png	\
+	balsa-encrypted.png	\
+	balsa-mark-all.png	\
+	balsa-mbox-draft.png	\
+	balsa-mbox-sent.png	\
+	balsa-mbox-tray-empty.png	\
+	balsa-mbox-tray-full.png	\
+	balsa-next-flagged.png	\
+	balsa-next-part.png	\
+	balsa-next.png	\
+	balsa-next-unread.png	\
+	balsa-postpone.png	\
+	balsa-previous-part.png	\
+	balsa-previous.png	\
+	balsa-reply-all.png	\
+	balsa-signature-bad.png	\
+	balsa-signature-good.png	\
+	balsa-signature-notrust.png	\
+	balsa-signature-unknown.png
+
 
 EXTRA_DIST = $(extra_appicons_IMGS)
 

Modified: trunk/images/24x24/Makefile.am
==============================================================================
--- trunk/images/24x24/Makefile.am	(original)
+++ trunk/images/24x24/Makefile.am	Tue Apr 22 20:27:40 2008
@@ -1,4 +1,25 @@
-extra_appicons_IMGS = $(wildcard balsa-*.png)
+extra_appicons_IMGS = \
+	balsa-crypt-check.png	\
+	balsa-encrypted.png	\
+	balsa-encrypt.png	\
+	balsa-mark-all.png	\
+	balsa-marked-new.png	\
+	balsa-next-flagged.png	\
+	balsa-next-part.png	\
+	balsa-next.png	\
+	balsa-next-unread.png	\
+	balsa-postpone.png	\
+	balsa-preview.png	\
+	balsa-previous-part.png	\
+	balsa-previous.png	\
+	balsa-reply-all.png	\
+	balsa-signature-bad.png	\
+	balsa-signature-good.png	\
+	balsa-signature-notrust.png	\
+	balsa-signature-unknown.png	\
+	balsa-sign.png	\
+	balsa-trash-empty.png
+
 
 EXTRA_DIST = $(extra_appicons_IMGS)
 

Modified: trunk/images/mimetypes/Makefile.am
==============================================================================
--- trunk/images/mimetypes/Makefile.am	(original)
+++ trunk/images/mimetypes/Makefile.am	Tue Apr 22 20:27:40 2008
@@ -1,4 +1,16 @@
-extramimetypes_IMGS = $(wildcard gnome-mime-*.png)
+extramimetypes_IMGS = \
+	gnome-mime-application-pgp-signature.png	\
+	gnome-mime-application-pkcs7-mime.png	\
+	gnome-mime-application-pkcs7-signature.png	\
+	gnome-mime-application-x-pkcs7-signature.png	\
+	gnome-mime-message-disposition-notification.png	\
+	gnome-mime-message-external-body.png	\
+	gnome-mime-message.png	\
+	gnome-mime-multipart-alternative.png	\
+	gnome-mime-multipart-encrypted.png	\
+	gnome-mime-multipart.png	\
+	gnome-mime-multipart-signed.png
+
 
 EXTRA_DIST = $(extramimetypes_IMGS)
 

Modified: trunk/libinit_balsa/assistant_init.c
==============================================================================
--- trunk/libinit_balsa/assistant_init.c	(original)
+++ trunk/libinit_balsa/assistant_init.c	Tue Apr 22 20:27:40 2008
@@ -93,6 +93,10 @@
 
     g_signal_handlers_disconnect_by_func(G_OBJECT(druid),
                                          G_CALLBACK(exit), NULL);
+    libbalsa_conf_push_group("Notifications");
+    libbalsa_conf_set_bool("GtkUIManager", TRUE);
+    libbalsa_conf_set_bool("LibBalsaAddressView", TRUE);
+    libbalsa_conf_pop_group();
     config_save();
     gtk_main_quit();
 }
@@ -131,12 +135,14 @@
 void
 balsa_init_begin(void)
 {
+    static const int ASSISTANT_WIDTH = 800;
+    static const int ASSISTANT_HEIGHT = 640;
     GtkWidget *assistant;
 
     assistant = gtk_assistant_new();
     gtk_window_set_title(GTK_WINDOW(assistant), _("Configure Balsa"));
     gtk_window_set_wmclass(GTK_WINDOW(assistant), "druid", "Balsa");
-    gtk_widget_set_size_request(assistant, 780, 580);
+    gtk_widget_set_size_request(assistant, ASSISTANT_WIDTH, ASSISTANT_HEIGHT);
 
     balsa_initdruid(GTK_ASSISTANT(assistant));
     gtk_widget_show_all(assistant);

Modified: trunk/libinit_balsa/assistant_page_user.c
==============================================================================
--- trunk/libinit_balsa/assistant_page_user.c	(original)
+++ trunk/libinit_balsa/assistant_page_user.c	Tue Apr 22 20:27:40 2008
@@ -46,22 +46,6 @@
                                        GtkWidget * page,
                                        BalsaDruidPageUser * user);
 
-static void 
-srv_changed_cb(GtkEditable *incoming_srv, gpointer data)
-{
-    BalsaDruidPageUser * user = (BalsaDruidPageUser*)data;
-    const gchar *prev_name;
-
-    prev_name = g_object_get_data(G_OBJECT(incoming_srv), "prev-name");
-    if(!prev_name ||
-       strcmp(prev_name, 
-              gtk_entry_get_text(GTK_ENTRY(user->account_name))) == 0) {
-        const gchar *aname = gtk_entry_get_text(GTK_ENTRY(incoming_srv));
-        gtk_entry_set_text(GTK_ENTRY(user->account_name), aname);
-        g_object_set_data_full(G_OBJECT(incoming_srv), "prev-name",
-                               g_strdup(aname), g_free);
-    }
-}
 
 static void
 balsa_druid_page_user_init(BalsaDruidPageUser * user,
@@ -73,11 +57,13 @@
            "(and you can find them later, if need be, in the Email "
            "application in the 'Preferences' and 'Identities' "
            "commands on the 'Tools' menu)");
+#if 0
     static const char *header21 =
         N_(" Whoever provides your email account should be able "
            "to give you the following information (if you have "
            "a Network Administrator, they may already have set "
            "this up for you):");
+#endif
     static const char* server_types[] = { "POP3", "IMAP", NULL };
     static const char* remember_passwd[] = {
         N_("Yes, remember it"), N_("No, type it in every time"), NULL };
@@ -104,12 +90,13 @@
 
     table = GTK_TABLE(gtk_table_new(10, 2, FALSE));
 
+#if 0
     label = GTK_LABEL(gtk_label_new(_(header21)));
     gtk_label_set_justify(label, GTK_JUSTIFY_CENTER);
     gtk_label_set_line_wrap(label, TRUE);
     gtk_table_attach(table, GTK_WIDGET(label), 0, 2, 0, 1,
                      GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 8, 4);
-
+#endif
     /* 2.1 */
     balsa_init_add_table_entry(table, row++,
                                _("Name of mail server for incoming _mail:"),
@@ -154,12 +141,8 @@
                                 _("_Remember your password:"),
                                 remember_passwd, druid,
                                 &(user->remember_passwd));
-    balsa_init_add_table_entry(table, row, _("_Refer to this account as:"),
-                               "",
-                               NULL, druid, page, &(user->account_name));
     gtk_table_set_row_spacing(table, row++, 10);
-    g_signal_connect(user->incoming_srv, "changed",
-                     (GCallback)srv_changed_cb, user);
+
 #if !defined(ENABLE_TOUCH_UI)
     preset = g_strconcat(g_get_home_dir(), "/mail", NULL);
     balsa_init_add_table_entry(table, row++, _("_Local mail directory:"),
@@ -260,7 +243,7 @@
 balsa_druid_page_user_next(GtkAssistant * druid, GtkWidget * page,
                            BalsaDruidPageUser * user)
 {
-    const gchar *host;
+    const gchar *host, *mailbox;
     gchar *uhoh;
     LibBalsaIdentity *ident;
 #if ENABLE_ESMTP
@@ -277,7 +260,6 @@
     host = gtk_entry_get_text(GTK_ENTRY(user->incoming_srv));
     if(host && *host) {
         LibBalsaMailbox *mbx = NULL;
-        const gchar *name = gtk_entry_get_text(GTK_ENTRY(user->account_name));
         const gchar *login = gtk_entry_get_text(GTK_ENTRY(user->login));
         const gchar *passwd = gtk_entry_get_text(GTK_ENTRY(user->passwd));
         gboolean ssl = 
@@ -286,26 +268,31 @@
             balsa_option_get_active(user->remember_passwd) == 0;
         switch(balsa_option_get_active(user->incoming_type)) {
         case 0: /* POP */
-            mbx = create_pop3_mbx(name, host, ssl, login, passwd, remember);
+            mbx = create_pop3_mbx(host, host, ssl, login, passwd, remember);
             if(mbx)
                 config_mailbox_add(mbx, NULL);
             break;
         case 1: /* IMAP */
-            create_imap_mbx(name, host, ssl, login, passwd, remember);
+            create_imap_mbx(host, host, ssl, login, passwd, remember);
             break; 
         default: /* hm */;
         }
     }
 
     /* identity */
+
+    mailbox = gtk_entry_get_text(GTK_ENTRY(user->name));
     if (balsa_app.identities == NULL) {
-        ident = LIBBALSA_IDENTITY(libbalsa_identity_new());
+	gchar *domain = strrchr(mailbox, '@');
+        ident = LIBBALSA_IDENTITY(libbalsa_identity_new_with_name
+				  (_("Default Identity")));
         balsa_app.identities = g_list_append(NULL, ident);
+	if(domain)
+	    libbalsa_identity_set_domain(ident, domain+1);
     } else {
         ident = balsa_app.current_ident;
     }
-    internet_address_set_name(ident->ia,
-                              gtk_entry_get_text(GTK_ENTRY(user->name)));
+    internet_address_set_name(ident->ia, mailbox);
     internet_address_set_addr(ident->ia,
                               gtk_entry_get_text(GTK_ENTRY(user->email)));
 

Modified: trunk/libinit_balsa/assistant_page_user.h
==============================================================================
--- trunk/libinit_balsa/assistant_page_user.h	(original)
+++ trunk/libinit_balsa/assistant_page_user.h	Tue Apr 22 20:27:40 2008
@@ -55,7 +55,6 @@
 #endif
         GtkWidget *name;
         GtkWidget *email;
-        GtkWidget *account_name;
 #if !defined(ENABLE_TOUCH_UI)
         GtkWidget *localmaildir;
 #endif /* ENABLE_TOUCH_UI */

Modified: trunk/libinit_balsa/balsa-druid-page-user.c
==============================================================================
--- trunk/libinit_balsa/balsa-druid-page-user.c	(original)
+++ trunk/libinit_balsa/balsa-druid-page-user.c	Tue Apr 22 20:27:40 2008
@@ -46,22 +46,6 @@
                                            GnomeDruid * druid,
                                            BalsaDruidPageUser * user);
 
-static void 
-srv_changed_cb(GtkEditable *incoming_srv, gpointer data)
-{
-    BalsaDruidPageUser * user = (BalsaDruidPageUser*)data;
-    const gchar *prev_name;
-
-    prev_name = g_object_get_data(G_OBJECT(incoming_srv), "prev-name");
-    if(!prev_name ||
-       strcmp(prev_name, 
-              gtk_entry_get_text(GTK_ENTRY(user->account_name))) == 0) {
-        const gchar *aname = gtk_entry_get_text(GTK_ENTRY(incoming_srv));
-        gtk_entry_set_text(GTK_ENTRY(user->account_name), aname);
-        g_object_set_data_full(G_OBJECT(incoming_srv), "prev-name",
-                               g_strdup(aname), g_free);
-    }
-}
 
 static void
 balsa_druid_page_user_init(BalsaDruidPageUser * user,
@@ -154,12 +138,7 @@
                                 _("_Remember your password:"),
                                remember_passwd, druid,
                                 &(user->remember_passwd));
-    balsa_init_add_table_entry(table, row, _("_Refer to this account as:"),
-                               "",
-                               NULL, druid, &(user->account_name));
     gtk_table_set_row_spacing(table, row++, 10);
-    g_signal_connect(user->incoming_srv, "changed",
-                     (GCallback)srv_changed_cb, user);
 #if !defined(ENABLE_TOUCH_UI)
     preset = g_strconcat(g_get_home_dir(), "/mail", NULL);
     balsa_init_add_table_entry(table, row++, _("_Local mail directory:"),
@@ -255,7 +234,7 @@
 balsa_druid_page_user_next(GnomeDruidPage * page, GnomeDruid * druid,
                            BalsaDruidPageUser * user)
 {
-    const gchar *host;
+    const gchar *host, *mailbox;
     gchar *uhoh;
     LibBalsaIdentity *ident;
 #if ENABLE_ESMTP
@@ -266,7 +245,6 @@
     host = gtk_entry_get_text(GTK_ENTRY(user->incoming_srv));
     if(host && *host) {
         LibBalsaMailbox *mbx = NULL;
-        const gchar *name = gtk_entry_get_text(GTK_ENTRY(user->account_name));
         const gchar *login = gtk_entry_get_text(GTK_ENTRY(user->login));
         const gchar *passwd = gtk_entry_get_text(GTK_ENTRY(user->passwd));
         gboolean ssl = 
@@ -275,28 +253,32 @@
             balsa_option_get_active(user->remember_passwd) == 0;
         switch(balsa_option_get_active(user->incoming_type)) {
         case 0: /* POP */
-            mbx = create_pop3_mbx(name, host, ssl, login, passwd, remember);
+            mbx = create_pop3_mbx(host, host, ssl, login, passwd, remember);
             if(mbx)
                 config_mailbox_add(mbx, NULL);
             break;
         case 1: /* IMAP */
-            create_imap_mbx(name, host, ssl, login, passwd, remember);
+            create_imap_mbx(host, host, ssl, login, passwd, remember);
             break; 
         default: /* hm */;
         }
     }
 
     /* identity */
+    mailbox = gtk_entry_get_text(GTK_ENTRY(user->email));
     if (balsa_app.identities == NULL) {
-        ident = LIBBALSA_IDENTITY(libbalsa_identity_new());
+	gchar *domain = strrchr(mailbox, '@');
+        ident = LIBBALSA_IDENTITY(libbalsa_identity_new_with_name
+				  (_("Default Identity")));
         balsa_app.identities = g_list_append(NULL, ident);
+	if(domain)
+	    libbalsa_identity_set_domain(ident, domain+1);
     } else {
         ident = balsa_app.current_ident;
     }
     internet_address_set_name(ident->ia,
                               gtk_entry_get_text(GTK_ENTRY(user->name)));
-    internet_address_set_addr(ident->ia,
-                              gtk_entry_get_text(GTK_ENTRY(user->email)));
+    internet_address_set_addr(ident->ia, mailbox);
 
     /* outgoing mail */
 #if ENABLE_ESMTP

Modified: trunk/libinit_balsa/balsa-druid-page-user.h
==============================================================================
--- trunk/libinit_balsa/balsa-druid-page-user.h	(original)
+++ trunk/libinit_balsa/balsa-druid-page-user.h	Tue Apr 22 20:27:40 2008
@@ -55,7 +55,6 @@
 #endif
         GtkWidget *name;
         GtkWidget *email;
-        GtkWidget *account_name;
 #if !defined(ENABLE_TOUCH_UI)
         GtkWidget *localmaildir;
 #endif /* ENABLE_TOUCH_UI */

Modified: trunk/src/balsa-app.c
==============================================================================
--- trunk/src/balsa-app.c	(original)
+++ trunk/src/balsa-app.c	Tue Apr 22 20:27:40 2008
@@ -306,9 +306,9 @@
 
     balsa_app.toolbar_wrap_button_text = TRUE;
     balsa_app.pwindow_option = WHILERETR;
-    balsa_app.wordwrap = TRUE;
+    balsa_app.wordwrap = FALSE; /* default to format=flowed. */
     balsa_app.wraplength = 72;
-    balsa_app.browse_wrap = TRUE;
+    balsa_app.browse_wrap = FALSE; /* GtkTextView will wrap for us. */
     balsa_app.browse_wrap_length = 79;
     balsa_app.shown_headers = HEADERS_SELECTED;
     balsa_app.show_all_headers = FALSE;



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