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
This commit is contained in:
Colin Leroy 2006-07-31 17:17:32 +00:00
parent 56ca0ae068
commit 754cdfa8f2
9 changed files with 49 additions and 3 deletions

View file

@ -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

View file

@ -1698,3 +1698,4 @@
( 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

View 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=

View 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 &&

View 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);

View file

@ -66,7 +66,7 @@ struct _MessageView
/* From messageview_show */
gboolean all_headers;
gint msginfo_update_callback_id;
gboolean updating;
gboolean deferred_destroy;

View 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}
};

View 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;

View 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,