aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gnome-month-item.c
diff options
context:
space:
mode:
authorSergey I. Panov <sipan@src.gnome.org>1999-02-18 08:05:17 +0800
committerSergey I. Panov <sipan@src.gnome.org>1999-02-18 08:05:17 +0800
commitb681ca2a8137816dcbc077eeca7d409dc196dd03 (patch)
tree31a5829068f325075ad6803dbe97a306b8e3b57b /calendar/gnome-month-item.c
parent28707ca90c94797b88c21bc066d73247390e0eb3 (diff)
downloadgsoc2013-evolution-b681ca2a8137816dcbc077eeca7d409dc196dd03.tar
gsoc2013-evolution-b681ca2a8137816dcbc077eeca7d409dc196dd03.tar.gz
gsoc2013-evolution-b681ca2a8137816dcbc077eeca7d409dc196dd03.tar.bz2
gsoc2013-evolution-b681ca2a8137816dcbc077eeca7d409dc196dd03.tar.lz
gsoc2013-evolution-b681ca2a8137816dcbc077eeca7d409dc196dd03.tar.xz
gsoc2013-evolution-b681ca2a8137816dcbc077eeca7d409dc196dd03.tar.zst
gsoc2013-evolution-b681ca2a8137816dcbc077eeca7d409dc196dd03.zip
will define fonts via fontset. Friendlier to locales that use iso8859-[^1]
* gnome-month-item.c,gnome-month-item.h,goto.c,mark.h, month-view.c,prop.c,quick-view.c,year-view.c: will define fonts via fontset. Friendlier to locales that use iso8859-[^1] and koi8-r encodings. Does not solve problem for Asian languiges --- better solution is needed (e.g. standart GNOME fontstyles defined in gtkrc). Interpol svn path=/trunk/; revision=677
Diffstat (limited to 'calendar/gnome-month-item.c')
-rw-r--r--calendar/gnome-month-item.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/calendar/gnome-month-item.c b/calendar/gnome-month-item.c
index 1eb8412f5c..ec799112de 100644
--- a/calendar/gnome-month-item.c
+++ b/calendar/gnome-month-item.c
@@ -58,8 +58,10 @@ enum {
ARG_DAY_ANCHOR,
ARG_START_ON_MONDAY,
ARG_HEAD_FONT,
+ ARG_HEAD_FONTSET,
ARG_HEAD_FONT_GDK,
ARG_DAY_FONT,
+ ARG_DAY_FONTSET,
ARG_DAY_FONT_GDK,
ARG_HEAD_COLOR,
ARG_HEAD_COLOR_GDK,
@@ -136,8 +138,10 @@ gnome_month_item_class_init (GnomeMonthItemClass *class)
gtk_object_add_arg_type ("GnomeMonthItem::day_anchor", GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_DAY_ANCHOR);
gtk_object_add_arg_type ("GnomeMonthItem::start_on_monday", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_START_ON_MONDAY);
gtk_object_add_arg_type ("GnomeMonthItem::heading_font", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_HEAD_FONT);
+ gtk_object_add_arg_type ("GnomeMonthItem::heading_fontset", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_HEAD_FONTSET);
gtk_object_add_arg_type ("GnomeMonthItem::heading_font_gdk", GTK_TYPE_GDK_FONT, GTK_ARG_READWRITE, ARG_HEAD_FONT_GDK);
gtk_object_add_arg_type ("GnomeMonthItem::day_font", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_DAY_FONT);
+ gtk_object_add_arg_type ("GnomeMonthItem::day_fontset", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_DAY_FONTSET);
gtk_object_add_arg_type ("GnomeMonthItem::day_font_gdk", GTK_TYPE_GDK_FONT, GTK_ARG_READWRITE, ARG_DAY_FONT_GDK);
gtk_object_add_arg_type ("GnomeMonthItem::heading_color", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_HEAD_COLOR);
gtk_object_add_arg_type ("GnomeMonthItem::heading_color_gdk", GTK_TYPE_GDK_COLOR, GTK_ARG_READWRITE, ARG_HEAD_COLOR_GDK);
@@ -977,6 +981,20 @@ gnome_month_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
reshape (mitem);
break;
+ case ARG_HEAD_FONTSET:
+ gdk_font_unref (mitem->head_font);
+
+ mitem->head_font = gdk_fontset_load (GTK_VALUE_STRING (*arg));
+ if (!mitem->head_font) {
+ mitem->head_font =
+ gdk_fontset_load ("-*-fixed-medium-r-semicondensed--13-120-75-75-c-60-*-*");
+ g_assert (mitem->head_font != NULL);
+ }
+
+ set_head_font (mitem);
+ reshape (mitem);
+ break;
+
case ARG_HEAD_FONT_GDK:
gdk_font_unref (mitem->head_font);
@@ -999,6 +1017,20 @@ gnome_month_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
reshape (mitem);
break;
+ case ARG_DAY_FONTSET:
+ gdk_font_unref (mitem->day_font);
+
+ mitem->head_font = gdk_fontset_load (GTK_VALUE_STRING (*arg));
+ if (!mitem->day_font) {
+ mitem->day_font =
+ gdk_fontset_load ("-*-fixed-medium-r-semicondensed--13-120-75-75-c-60-*-*");
+ g_assert (mitem->day_font != NULL);
+ }
+
+ set_day_font (mitem);
+ reshape (mitem);
+ break;
+
case ARG_DAY_FONT_GDK:
gdk_font_unref (mitem->day_font);