2006-07-31 [colin] 2.4.0cvs7
authorColin Leroy <colin@colino.net>
Mon, 31 Jul 2006 17:17:32 +0000 (17:17 +0000)
committerColin Leroy <colin@colino.net>
Mon, 31 Jul 2006 17:17:32 +0000 (17:17 +0000)
* src/compose.c
* src/mainwindow.c
* src/messageview.h
* src/prefs_common.c
* src/prefs_common.h
* src/textview.c
Add 'View/Hide quotes'. Patch based on a patch
by Rafal Weglarz

ChangeLog
PATCHSETS
configure.ac
src/compose.c
src/mainwindow.c
src/messageview.h
src/prefs_common.c
src/prefs_common.h
src/textview.c

index e538456cdf4e4b1bf65951c8d2cbd15b6358a95b..651145f5834021c54ead2ca5fbfd2213c3059670 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-07-31 [colin]     2.4.0cvs7
+
+       * src/compose.c
+       * src/mainwindow.c
+       * src/messageview.h
+       * src/prefs_common.c
+       * src/prefs_common.h
+       * src/textview.c
+               Add 'View/Hide quotes'. Patch based on a patch
+               by Rafal Weglarz
+
 2006-07-31 [colin]     2.4.0cvs6
 
        * src/action.c
index 05f5e4fc6ac04aa928c9c6dbfdf8f9c36d6a851c..406c03d1967fd720ba93e2ab1fc12feb4af63fea 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.274.2.128 -r 1.274.2.129 src/mainwindow.c;  cvs diff -u -r 1.395.2.225 -r 1.395.2.226 src/summaryview.c;  cvs diff -u -r 1.68.2.24 -r 1.68.2.25 src/summaryview.h;  ) > 2.4.0cvs4.patchset
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 po/nb.po;  ) > 2.4.0cvs5.patchset
 ( cvs diff -u -r 1.12.2.36 -r 1.12.2.37 src/action.c;  ) > 2.4.0cvs6.patchset
+( cvs diff -u -r 1.382.2.295 -r 1.382.2.296 src/compose.c;  cvs diff -u -r 1.274.2.129 -r 1.274.2.130 src/mainwindow.c;  cvs diff -u -r 1.19.2.8 -r 1.19.2.9 src/messageview.h;  cvs diff -u -r 1.204.2.93 -r 1.204.2.94 src/prefs_common.c;  cvs diff -u -r 1.103.2.55 -r 1.103.2.56 src/prefs_common.h;  cvs diff -u -r 1.96.2.128 -r 1.96.2.129 src/textview.c;  ) > 2.4.0cvs7.patchset
index f0731be907509ffcbbb455554520f392f8b71627..3f47f1bac4f9105525d2dfffb5dc582214aaf4d8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=6
+EXTRA_VERSION=7
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 0fb679ca70507e979455a2997ab930053ccfafd0..4efc05b893092814085d025e57e6580a4366d18e 100644 (file)
@@ -4497,12 +4497,16 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action, gbool
        mimetext->subtype = g_strdup("plain");
        g_hash_table_insert(mimetext->typeparameters, g_strdup("charset"),
                            g_strdup(out_codeset));
+                           
        /* protect trailing spaces when signing message */
        if (action == COMPOSE_WRITE_FOR_SEND && compose->use_signing && 
            privacy_system_can_sign(compose->privacy_system)) {
                encoding = ENC_QUOTED_PRINTABLE;
        }
        
+       debug_print("main text: %d bytes encoded as %s in %d\n",
+               strlen(buf), out_codeset, encoding);
+
        /* check for line length limit */
        if (action == COMPOSE_WRITE_FOR_SEND &&
            encoding != ENC_QUOTED_PRINTABLE && encoding != ENC_BASE64 &&
index d5271da536a8eed43eeee79443eeac51bd6ac74f..c2b7d3c837bfac2a72872bb267afe9a796abdc59 100644 (file)
@@ -218,6 +218,10 @@ static void show_all_header_cb             (MainWindow     *mainwin,
                                         guint           action,
                                         GtkWidget      *widget);
 
+static void hide_quotes_cb(MainWindow  *mainwin,
+                                        guint           action,
+                                        GtkWidget      *widget);
+
 static void move_to_cb                 (MainWindow     *mainwin,
                                         guint           action,
                                         GtkWidget      *widget);
@@ -711,6 +715,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/Open in new _window"),      "<control><alt>N", open_msg_cb, 0, NULL},
        {N_("/_View/Mess_age source"),          "<control>U", view_source_cb, 0, NULL},
        {N_("/_View/Show all headers"),         "<control>H", show_all_header_cb, 0, "<ToggleItem>"},
+       {N_("/_View/Hide quotes"),              "<control><shift>Q", hide_quotes_cb, 0, "<ToggleItem>"},
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Update summary"),          "<control><alt>U", update_summary_cb,  0, NULL},
 
@@ -2136,6 +2141,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/View/Go to/Parent message"      , M_SINGLE_TARGET_EXIST},
                {"/View/Open in new window"        , M_SINGLE_TARGET_EXIST},
                {"/View/Show all headers"          , M_SINGLE_TARGET_EXIST},
+               {"/View/Hide quotes"               , M_SINGLE_TARGET_EXIST},
                {"/View/Message source"            , M_SINGLE_TARGET_EXIST},
 
                {"/Message/Receive/Get from current account"
@@ -3241,6 +3247,16 @@ static void show_all_header_cb(MainWindow *mainwin, guint action,
                                     GTK_CHECK_MENU_ITEM(widget)->active);
 }
 
+static void hide_quotes_cb(MainWindow *mainwin, guint action,
+                              GtkWidget *widget)
+{
+       if (mainwin->menu_lock_count) return;
+       prefs_common.hide_quotes = 
+                       GTK_CHECK_MENU_ITEM(widget)->active;
+       summary_display_msg_selected(mainwin->summaryview,
+                                    GTK_CHECK_MENU_ITEM(widget)->active);
+}
+
 static void mark_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 {
        summary_mark(mainwin->summaryview);
index 109995bcf704dbc921cb78a1dd61bc395201e686..bef39145a1b25f567fa0524494cc6efb1fc0873b 100644 (file)
@@ -66,7 +66,7 @@ struct _MessageView
   
        /* From messageview_show */
        gboolean all_headers;
-    
+
        gint msginfo_update_callback_id;
        gboolean updating;
        gboolean deferred_destroy;
index 0a83b2d1172c4d63b1a4f7196befd6f250d509bd..18212dbb0969bc44c75db14170bea21b48c0dbd8 100644 (file)
@@ -790,6 +790,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"live_dangerously", "FALSE", &prefs_common.live_dangerously, P_BOOL,
         NULL, NULL, NULL},
+       {"hide_quotes", "FALSE", &prefs_common.hide_quotes, P_BOOL,
+        NULL, NULL, NULL},
 
        {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
index 6283e2fd581006f2dded559a55b60914846a39af..5c654e4cdcc98beb0789183e782a5e9773759b1c 100644 (file)
@@ -386,6 +386,7 @@ struct _PrefsCommon
        gint skip_ssl_cert_check;
        gint live_dangerously;
        gint never_send_retrcpt;
+       gint hide_quotes;
 };
 
 extern PrefsCommon prefs_common;
index 96697b3bf61c6aec66e0c9b2e4e6c02cbab3d12d..ce8135f5717601f2f42ce445214e4e3a18a745be 100644 (file)
@@ -77,6 +77,8 @@ struct _RemoteURI
        guint end;
 };
 
+gint previousquotelevel = -1;
+
 static GdkColor quote_colors[3] = {
        {(gulong)0, (gushort)0, (gushort)0, (gushort)0},
        {(gulong)0, (gushort)0, (gushort)0, (gushort)0},
@@ -1192,7 +1194,16 @@ static void textview_write_line(TextView *textview, const gchar *str,
                textview->is_in_signature = TRUE;
        }
 
-       textview_make_clickable_parts(textview, fg_color, "link", buf, FALSE);
+       if ( prefs_common.hide_quotes == TRUE && quotelevel > -1) {
+               if ( previousquotelevel != quotelevel ) {
+/*                     textview_make_clickable_parts(textview, fg_color, "link", buf, FALSE);*/
+                       textview_make_clickable_parts(textview, fg_color, "link", " [...]\n", FALSE);
+                       previousquotelevel = quotelevel;
+               }
+       } else {
+               textview_make_clickable_parts(textview, fg_color, "link", buf, FALSE);
+               previousquotelevel = -1;
+       }
 }
 
 void textview_write_link(TextView *textview, const gchar *str,