aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-02-03 08:01:12 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-02-03 08:01:12 +0000
commit2513f2bd17b23001bc84250c4ec016d5877c167c (patch)
treebeaede3c4615aa9148b6eabbcc0bc9924866a676
parentbe143c26539c17a0411419451046eec02b7e98a7 (diff)
compose.c: use normal API for setting font.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@83 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLog.ja8
-rw-r--r--src/compose.c15
3 files changed, 20 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 5511c7a5..4e0ce539 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-02-03
+
+ * version 1.9.1
+
+2005-02-03
+
+ * src/compose.c: compose_create(): use normal API for setting font.
+
2005-02-02
* src/main.c: parse_cmd_opt(): convert help message to locale
diff --git a/ChangeLog.ja b/ChangeLog.ja
index ac3594eb..f6d82de2 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,11 @@
+2005-02-03
+
+ * version 1.9.1
+
+2005-02-03
+
+ * src/compose.c: compose_create(): フォントの設定に通常の API を使用。
+
2005-02-02
* src/main.c: parse_cmd_opt(): ヘルプメッセージを locale
diff --git a/src/compose.c b/src/compose.c
index 81746e9f..c739116e 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -3795,7 +3795,6 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
gchar *titles[N_ATTACH_COLS];
guint n_menu_entries;
- GtkStyle *style, *new_style;
GdkColormap *cmap;
GdkColor color[1];
gboolean success[1];
@@ -4013,29 +4012,23 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
gtk_widget_show_all(vbox);
- style = gtk_widget_get_style(text);
- new_style = gtk_style_copy(style);
-
-#warning FIXME_GTK2 use normal API for setting font
if (prefs_common.textfont) {
PangoFontDescription *font_desc;
font_desc = pango_font_description_from_string
(prefs_common.textfont);
if (font_desc) {
- if (new_style->font_desc)
- pango_font_description_free
- (new_style->font_desc);
- new_style->font_desc = font_desc;
+ gtk_widget_modify_font(text, font_desc);
+ pango_font_description_free(font_desc);
}
}
- gtk_widget_set_style(text, new_style);
-
color[0] = quote_color;
cmap = gdk_window_get_colormap(window->window);
gdk_colormap_alloc_colors(cmap, color, 1, FALSE, TRUE, success);
if (success[0] == FALSE) {
+ GtkStyle *style;
+
g_warning("Compose: color allocation failed.\n");
style = gtk_widget_get_style(text);
quote_color = style->black;