+2001-10-25 [darko] 0.6.4claws4
+
+ * src/compose.c
+ don't declare is_url_string as static function since
+ we need it in gtkstext.c
+ * src/gtkstext.c
+ remove unused variable
+ don't wrap long URLs while composing a message
+
2001-10-24 [christoph] 0.6.4claws3
* src/socket.c
}
/* return true if text at pos is URL */
-static guint is_url_string(GtkSText *text, guint start_pos, guint text_len)
+guint is_url_string(GtkSText *text, guint start_pos, guint text_len)
{
guint len;
void
gtk_stext_compact_buffer (GtkSText *text)
{
- GtkEditable *editable = GTK_EDITABLE (text);
-
g_return_if_fail (text != NULL);
g_return_if_fail (GTK_IS_STEXT (text));
move_gap (text, gtk_stext_get_length(text));
/* If whole line is one word, revert to char wrapping */
if (lp.end.index == lp.start.index)
{
+ /* SYLPHEED: don't wrap URLs */
+ if (is_url_string(text, lp.end.index,
+ gtk_stext_get_length(text)))
+ {
+ lp.end = saved_mark;
+ lp.displayable_chars = saved_characters + 1;
+ lp.wraps = 0;
+ goto no_url_wrap;
+ }
+
lp.end = saved_mark;
lp.displayable_chars = saved_characters;
decrement_mark (&lp.end);
lp.displayable_chars += 1;
}
+no_url_wrap:
lp.font_ascent = MAX (font->ascent, lp.font_ascent);
lp.font_descent = MAX (font->descent, lp.font_descent);
lp.pixel_width += ch_width;
void gtk_stext_set_cursor_type (GtkSText *text, GtkSTextCursorType cursor_type);
+/* SYLPHEED */
+extern guint is_url_string (GtkSText *text, guint start_pos, guint text_len);
+
#define GTK_STEXT_INDEX(t, index) (((t)->use_wchar) \
? ((index) < (t)->gap_position ? (t)->text.wc[index] : \
(t)->text.wc[(index)+(t)->gap_size]) \