#include <gtk/gtklabel.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtktreeview.h>
-#warning FIXME_GTK2
-/* #include <gtk/gtkthemes.h> */
+
#include <gtk/gtkdnd.h>
#include <stdio.h>
#include <stdlib.h>
gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
while (fgets(buf, sizeof(buf), fp) != NULL) {
-#warning FIXME_GTK2
-#if 1 /* FIXME_GTK2 */
const gchar *cur_encoding = conv_get_current_charset_str();
gchar *str = conv_codeset_strdup(buf, cur_encoding, CS_UTF_8);
gtk_text_buffer_insert(buffer, &iter, str, -1);
g_free (str);
-#endif /* FIXME_GTK2 */
}
fclose(fp);
#define SPACE_CHARS " \t"
-#warning FIXME_GTK2
static void compose_wrap_line(Compose *compose)
{
GtkTextView *text = GTK_TEXT_VIEW(compose->text);
/* fix line length for tabs */
if (ch_len == 1 && *cbuf == '\t') {
-#warning FIXME_GTK2
- /* guint tab_width = text->default_tab_width; */
guint tab_width = 8;
guint tab_offset = line_len % tab_width;
encoding = ENC_BASE64;
#endif
-#warning FIXME_GTK2
-#if 0 /* FIXME_GTK2 */
- src_codeset = conv_get_current_charset_str();
- /* if current encoding is US-ASCII, set it the same as
- outgoing one to prevent code conversion failure */
- if (!strcasecmp(src_codeset, CS_US_ASCII))
- src_codeset = out_codeset;
-#else /* FIXME_GTK2 */
src_codeset = CS_UTF_8;
-#endif /* FIXME_GTK2 */
debug_print("src encoding = %s, out encoding = %s, transfer encoding = %s\n",
src_codeset, out_codeset, procmime_get_encoding_str(encoding));
gtk_text_buffer_get_end_iter(buffer, &end);
tmp = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
-#warning FIXME_GTK2
-#if 1 /* FIXME_GTK2 */
src_codeset = CS_UTF_8;
dest_codeset = conv_get_current_charset_str();
chars = conv_codeset_strdup(tmp, src_codeset, dest_codeset);
g_free(tmp);
if (!chars) return -1;
-#endif /* FIXME_GTK2 */
/* write body */
len = strlen(chars);
if (!g_strcasecmp(trans_hdr, headerentryname)) {
const gchar *entstr = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
-#warning FIXME_GTK2
-#if 1
gchar *tmpstr = conv_codeset_strdup(entstr, CS_UTF_8, conv_get_current_charset_str());
-#else
- gchar *tmpstr = strdup(entstr);
-#endif
Xstrdup_a(str, tmpstr, return -1);
g_strstrip(str);
if (str[0] != '\0') {
if (len < 1) return;
-#warning FIXME_GTK2
-#if 1
tmpstr = conv_codeset_strdup(src, CS_UTF_8, conv_get_current_charset_str());
-#else
- tmpstr = strdup(src);
-#endif
subst_char(tmpstr, '\n', ' ');
subst_char(tmpstr, '\r', ' ');
gtk_text_view_set_editable(GTK_TEXT_VIEW(text), TRUE);
clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
gtk_text_buffer_add_selection_clipboard(buffer, clipboard);
-#warning FIXME_GTK2
- /* GTK_STEXT(text)->default_tab_width = 8; */
-
-#warning FIXME_GTK2
-#if 0
- if (prefs_common.block_cursor) {
- GTK_STEXT(text)->cursor_type = GTK_STEXT_CURSOR_BLOCK;
- }
-#endif
-#warning FIXME_GTK2
-#if 0
- if (prefs_common.smart_wrapping) {
- gtk_stext_set_word_wrap(GTK_STEXT(text), TRUE);
- gtk_stext_set_wrap_rmargin(GTK_STEXT(text), prefs_common.linewrap_len);
- }
-#else
if (prefs_common.smart_wrapping) {
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
}
-#endif
gtk_container_add(GTK_CONTAINER(scrolledwin), text);
-#warning FIXME_GTK2
-#if 0 /* FIXME_GTK2 */
- g_signal_connect(G_OBJECT(text), "activate",
- G_CALLBACK(text_activated), compose);
-#endif /* FIXME_GTK2 */
-
g_signal_connect_after(G_OBJECT(text), "size_allocate",
G_CALLBACK(compose_edit_size_alloc),
ruler);
style = gtk_widget_get_style(text);
- /* workaround for the slow down of GtkSText when using Pixmap theme */
-#warning FIXME_GTK2
-#if 0 /* FIXME_GTK2 */
- if (style->engine) {
- GtkThemeEngine *engine;
-
- engine = style->engine;
- style->engine = NULL;
- new_style = gtk_style_copy(style);
- style->engine = engine;
- } else
-#endif /* FIXME_GTK2 */
- new_style = gtk_style_copy(style);
+ new_style = gtk_style_copy(style);
if (prefs_common.textfont) {
PangoFontDescription *font_desc;