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
This commit is contained in:
@ -1,3 +1,12 @@
|
||||
1999-02-17 Sergey Panov <sipan@mit.edu>
|
||||
|
||||
* 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).
|
||||
|
||||
1999-02-16 Sergey Panov <sipan@mit.edu>
|
||||
|
||||
* main.c: Use N_() macro for color settings labels in
|
||||
|
@ -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);
|
||||
|
||||
|
@ -67,8 +67,10 @@ typedef enum {
|
||||
* day_anchor GtkAnchorType RW Anchor side for day numbers inside day boxes
|
||||
* start_on_monday boolean RW Specifies whether the week starts on Monday or Sunday
|
||||
* heading_font string W X logical font descriptor for the headings
|
||||
* heading_fontset string W X logical fontset descriptor for the headings
|
||||
* heading_font_gdk GdkFont * RW Pointer to GdkFont for the headings
|
||||
* day_font string W X logical font descriptor for the day numbers
|
||||
* day_fontset string W X logical fontset descriptor for the day numbers
|
||||
* day_font_gdk GdkFont * RW Pointer to GdkFont for the day numbers
|
||||
* heading_color string W X color specification for heading labels
|
||||
* heading_color_gdk GdkColor * RW Pointer to an allocated GdkColor for heading labels
|
||||
|
@ -38,7 +38,7 @@ update (void)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + current_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG),
|
||||
"font", NORMAL_DAY_FONT,
|
||||
"fontset", NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
current_index = -1;
|
||||
}
|
||||
@ -54,7 +54,7 @@ update (void)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + current_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_CURRENT_DAY_FG),
|
||||
"font", CURRENT_DAY_FONT,
|
||||
"fontset", CURRENT_DAY_FONTSET,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -67,8 +67,10 @@ typedef enum {
|
||||
* day_anchor GtkAnchorType RW Anchor side for day numbers inside day boxes
|
||||
* start_on_monday boolean RW Specifies whether the week starts on Monday or Sunday
|
||||
* heading_font string W X logical font descriptor for the headings
|
||||
* heading_fontset string W X logical fontset descriptor for the headings
|
||||
* heading_font_gdk GdkFont * RW Pointer to GdkFont for the headings
|
||||
* day_font string W X logical font descriptor for the day numbers
|
||||
* day_fontset string W X logical fontset descriptor for the day numbers
|
||||
* day_font_gdk GdkFont * RW Pointer to GdkFont for the day numbers
|
||||
* heading_color string W X color specification for heading labels
|
||||
* heading_color_gdk GdkColor * RW Pointer to an allocated GdkColor for heading labels
|
||||
|
@ -38,7 +38,7 @@ update (void)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + current_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG),
|
||||
"font", NORMAL_DAY_FONT,
|
||||
"fontset", NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
current_index = -1;
|
||||
}
|
||||
@ -54,7 +54,7 @@ update (void)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + current_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_CURRENT_DAY_FG),
|
||||
"font", CURRENT_DAY_FONT,
|
||||
"fontset", CURRENT_DAY_FONTSET,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
@ -14,14 +14,15 @@
|
||||
|
||||
/* These are the fonts used for the montly calendars */
|
||||
|
||||
#define HEADING_FONT "-*-helvetica-bold-r-normal--14-*-*-*-p-*-*-*"
|
||||
#define TITLE_FONT "-*-helvetica-bold-r-normal--12-*-*-*-p-*-*-*"
|
||||
#define DAY_HEADING_FONT "-*-helvetica-medium-r-normal--10-*-*-*-p-*-*-*"
|
||||
#define NORMAL_DAY_FONT "-*-helvetica-medium-r-normal--10-*-*-*-p-*-*-*"
|
||||
#define CURRENT_DAY_FONT "-*-helvetica-bold-r-normal--12-*-*-*-p-*-*-*"
|
||||
#define BIG_DAY_HEADING_FONT "-*-helvetica-bold-r-normal--14-*-*-*-p-*-*-*"
|
||||
#define BIG_NORMAL_DAY_FONT "-*-helvetica-medium-r-normal--14-*-*-*-p-*-*-*"
|
||||
#define BIG_CURRENT_DAY_FONT "-*-helvetica-bold-r-normal--14-*-*-*-p-*-*-*"
|
||||
#define HEADING_FONTSET "-adobe-helvetica-medium-r-*-*-14-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-17-*-*-*-p-*-koi8-r"
|
||||
#define TITLE_FONTSET "-adobe-helvetica-bold-r-normal--12-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r"
|
||||
#define DAY_HEADING_FONTSET "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
|
||||
#define NORMAL_DAY_FONTSET "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
|
||||
#define CURRENT_DAY_FONTSET "-adobe-helvetica-bold-r-normal--12-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r"
|
||||
#define BIG_DAY_HEADING_FONTSET "-adobe-helvetica-bold-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-bold-r-normal-*-17-*-*-*-p-*-koi8-r"
|
||||
#define BIG_NORMAL_DAY_FONTSET "-adobe-helvetica-medium-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-17-*-*-*-p-*-koi8-r"
|
||||
#define BIG_CURRENT_DAY_FONTSET "-adobe-helvetica-bold-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-bold-r-normal-*-17-*-*-*-p-*-koi8-r"
|
||||
#define EVENT_FONTSET "-adobe-helvetica-medium-r-*-*-10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
|
||||
|
||||
|
||||
/* Functions of this type are used by the marking functions to fetch color specifications. Such
|
||||
|
@ -22,9 +22,6 @@
|
||||
/* Padding between day borders and event text */
|
||||
#define EVENT_PADDING 3
|
||||
|
||||
/* Font for the month view events */
|
||||
#define EVENT_FONT "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*"
|
||||
|
||||
|
||||
static void month_view_class_init (MonthViewClass *class);
|
||||
static void month_view_init (MonthView *mv);
|
||||
@ -416,7 +413,7 @@ month_view_init (MonthView *mv)
|
||||
mv->title = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (mv)),
|
||||
gnome_canvas_text_get_type (),
|
||||
"anchor", GTK_ANCHOR_N,
|
||||
"font", HEADING_FONT,
|
||||
"fontset", HEADING_FONTSET,
|
||||
"fill_color", "black",
|
||||
NULL);
|
||||
|
||||
@ -429,8 +426,8 @@ month_view_init (MonthView *mv)
|
||||
"day_anchor", GTK_ANCHOR_NE,
|
||||
"start_on_monday", week_starts_on_monday,
|
||||
"heading_padding", 2.0,
|
||||
"heading_font", BIG_DAY_HEADING_FONT,
|
||||
"day_font", BIG_NORMAL_DAY_FONT,
|
||||
"heading_fontset", BIG_DAY_HEADING_FONTSET,
|
||||
"day_fontset", BIG_NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
|
||||
/* Arrows and text items. The arrows start hidden by default; they will be shown as
|
||||
@ -473,7 +470,7 @@ month_view_init (MonthView *mv)
|
||||
|
||||
mv->text[i] = gnome_canvas_item_new (GNOME_CANVAS_GROUP (day_group),
|
||||
gnome_canvas_text_get_type (),
|
||||
"font", EVENT_FONT,
|
||||
"fontset", EVENT_FONTSET,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG),
|
||||
"clip", TRUE,
|
||||
@ -714,7 +711,7 @@ mark_current_day (MonthView *mv)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + mv->old_current_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG),
|
||||
"font", BIG_NORMAL_DAY_FONT,
|
||||
"fontset", BIG_NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
|
||||
mv->old_current_index = -1;
|
||||
@ -733,7 +730,7 @@ mark_current_day (MonthView *mv)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + mv->old_current_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_CURRENT_DAY_FG),
|
||||
"font", BIG_CURRENT_DAY_FONT,
|
||||
"fontset", BIG_CURRENT_DAY_FONTSET,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ set_current_day (void)
|
||||
item = gnome_month_item_num2child (GNOME_MONTH_ITEM (month_item), GNOME_MONTH_ITEM_DAY_LABEL + day_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_picker (COLOR_PROP_CURRENT_DAY_FG),
|
||||
"font", CURRENT_DAY_FONT,
|
||||
"fontset", CURRENT_DAY_FONTSET,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "main.h"
|
||||
|
||||
|
||||
#define QUICK_VIEW_FONT "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*"
|
||||
#define QUICK_VIEW_FONTSET "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
|
||||
|
||||
|
||||
static void quick_view_class_init (QuickViewClass *class);
|
||||
@ -138,7 +138,7 @@ create_items_for_event (QuickView *qv, CalendarObject *co, double *y, double *ma
|
||||
"y", *y,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"text", str,
|
||||
"font", QUICK_VIEW_FONT,
|
||||
"fontset", QUICK_VIEW_FONTSET,
|
||||
NULL);
|
||||
|
||||
g_free (str);
|
||||
@ -173,7 +173,7 @@ setup_event_list (QuickView *qv, GList *event_list)
|
||||
"y", 0.0,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"text", _("No appointments for this day"),
|
||||
"font", QUICK_VIEW_FONT,
|
||||
"fontset", QUICK_VIEW_FONTSET,
|
||||
NULL);
|
||||
|
||||
/* Measure the text and set the proper sizes */
|
||||
|
@ -497,7 +497,7 @@ year_view_init (YearView *yv)
|
||||
yv->heading = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (yv)),
|
||||
gnome_canvas_text_get_type (),
|
||||
"anchor", GTK_ANCHOR_N,
|
||||
"font", HEADING_FONT,
|
||||
"fontset", HEADING_FONTSET,
|
||||
"fill_color", "black",
|
||||
NULL);
|
||||
|
||||
@ -513,7 +513,7 @@ year_view_init (YearView *yv)
|
||||
gnome_canvas_text_get_type (),
|
||||
"text", buf,
|
||||
"anchor", GTK_ANCHOR_N,
|
||||
"font", TITLE_FONT,
|
||||
"fontset", TITLE_FONTSET,
|
||||
"fill_color", "black",
|
||||
NULL);
|
||||
|
||||
@ -523,8 +523,8 @@ year_view_init (YearView *yv)
|
||||
gnome_canvas_item_set (yv->mitems[i],
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"start_on_monday", week_starts_on_monday,
|
||||
"heading_font", DAY_HEADING_FONT,
|
||||
"day_font", NORMAL_DAY_FONT,
|
||||
"heading_fontset", DAY_HEADING_FONTSET,
|
||||
"day_fontset", NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
setup_month_item (yv, i);
|
||||
}
|
||||
@ -638,7 +638,7 @@ mark_current_day (YearView *yv)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + day_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG),
|
||||
"font", NORMAL_DAY_FONT,
|
||||
"fontset", NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
|
||||
yv->old_marked_day = -1;
|
||||
@ -658,7 +658,7 @@ mark_current_day (YearView *yv)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + day_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_CURRENT_DAY_FG),
|
||||
"font", CURRENT_DAY_FONT,
|
||||
"fontset", CURRENT_DAY_FONTSET,
|
||||
NULL);
|
||||
|
||||
yv->old_marked_day = month_index * 42 + day_index;
|
||||
|
@ -14,14 +14,15 @@
|
||||
|
||||
/* These are the fonts used for the montly calendars */
|
||||
|
||||
#define HEADING_FONT "-*-helvetica-bold-r-normal--14-*-*-*-p-*-*-*"
|
||||
#define TITLE_FONT "-*-helvetica-bold-r-normal--12-*-*-*-p-*-*-*"
|
||||
#define DAY_HEADING_FONT "-*-helvetica-medium-r-normal--10-*-*-*-p-*-*-*"
|
||||
#define NORMAL_DAY_FONT "-*-helvetica-medium-r-normal--10-*-*-*-p-*-*-*"
|
||||
#define CURRENT_DAY_FONT "-*-helvetica-bold-r-normal--12-*-*-*-p-*-*-*"
|
||||
#define BIG_DAY_HEADING_FONT "-*-helvetica-bold-r-normal--14-*-*-*-p-*-*-*"
|
||||
#define BIG_NORMAL_DAY_FONT "-*-helvetica-medium-r-normal--14-*-*-*-p-*-*-*"
|
||||
#define BIG_CURRENT_DAY_FONT "-*-helvetica-bold-r-normal--14-*-*-*-p-*-*-*"
|
||||
#define HEADING_FONTSET "-adobe-helvetica-medium-r-*-*-14-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-17-*-*-*-p-*-koi8-r"
|
||||
#define TITLE_FONTSET "-adobe-helvetica-bold-r-normal--12-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r"
|
||||
#define DAY_HEADING_FONTSET "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
|
||||
#define NORMAL_DAY_FONTSET "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
|
||||
#define CURRENT_DAY_FONTSET "-adobe-helvetica-bold-r-normal--12-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r"
|
||||
#define BIG_DAY_HEADING_FONTSET "-adobe-helvetica-bold-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-bold-r-normal-*-17-*-*-*-p-*-koi8-r"
|
||||
#define BIG_NORMAL_DAY_FONTSET "-adobe-helvetica-medium-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-17-*-*-*-p-*-koi8-r"
|
||||
#define BIG_CURRENT_DAY_FONTSET "-adobe-helvetica-bold-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-bold-r-normal-*-17-*-*-*-p-*-koi8-r"
|
||||
#define EVENT_FONTSET "-adobe-helvetica-medium-r-*-*-10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
|
||||
|
||||
|
||||
/* Functions of this type are used by the marking functions to fetch color specifications. Such
|
||||
|
@ -22,9 +22,6 @@
|
||||
/* Padding between day borders and event text */
|
||||
#define EVENT_PADDING 3
|
||||
|
||||
/* Font for the month view events */
|
||||
#define EVENT_FONT "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*"
|
||||
|
||||
|
||||
static void month_view_class_init (MonthViewClass *class);
|
||||
static void month_view_init (MonthView *mv);
|
||||
@ -416,7 +413,7 @@ month_view_init (MonthView *mv)
|
||||
mv->title = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (mv)),
|
||||
gnome_canvas_text_get_type (),
|
||||
"anchor", GTK_ANCHOR_N,
|
||||
"font", HEADING_FONT,
|
||||
"fontset", HEADING_FONTSET,
|
||||
"fill_color", "black",
|
||||
NULL);
|
||||
|
||||
@ -429,8 +426,8 @@ month_view_init (MonthView *mv)
|
||||
"day_anchor", GTK_ANCHOR_NE,
|
||||
"start_on_monday", week_starts_on_monday,
|
||||
"heading_padding", 2.0,
|
||||
"heading_font", BIG_DAY_HEADING_FONT,
|
||||
"day_font", BIG_NORMAL_DAY_FONT,
|
||||
"heading_fontset", BIG_DAY_HEADING_FONTSET,
|
||||
"day_fontset", BIG_NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
|
||||
/* Arrows and text items. The arrows start hidden by default; they will be shown as
|
||||
@ -473,7 +470,7 @@ month_view_init (MonthView *mv)
|
||||
|
||||
mv->text[i] = gnome_canvas_item_new (GNOME_CANVAS_GROUP (day_group),
|
||||
gnome_canvas_text_get_type (),
|
||||
"font", EVENT_FONT,
|
||||
"fontset", EVENT_FONTSET,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG),
|
||||
"clip", TRUE,
|
||||
@ -714,7 +711,7 @@ mark_current_day (MonthView *mv)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + mv->old_current_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG),
|
||||
"font", BIG_NORMAL_DAY_FONT,
|
||||
"fontset", BIG_NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
|
||||
mv->old_current_index = -1;
|
||||
@ -733,7 +730,7 @@ mark_current_day (MonthView *mv)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + mv->old_current_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_CURRENT_DAY_FG),
|
||||
"font", BIG_CURRENT_DAY_FONT,
|
||||
"fontset", BIG_CURRENT_DAY_FONTSET,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ set_current_day (void)
|
||||
item = gnome_month_item_num2child (GNOME_MONTH_ITEM (month_item), GNOME_MONTH_ITEM_DAY_LABEL + day_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_picker (COLOR_PROP_CURRENT_DAY_FG),
|
||||
"font", CURRENT_DAY_FONT,
|
||||
"fontset", CURRENT_DAY_FONTSET,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "main.h"
|
||||
|
||||
|
||||
#define QUICK_VIEW_FONT "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*"
|
||||
#define QUICK_VIEW_FONTSET "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r"
|
||||
|
||||
|
||||
static void quick_view_class_init (QuickViewClass *class);
|
||||
@ -138,7 +138,7 @@ create_items_for_event (QuickView *qv, CalendarObject *co, double *y, double *ma
|
||||
"y", *y,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"text", str,
|
||||
"font", QUICK_VIEW_FONT,
|
||||
"fontset", QUICK_VIEW_FONTSET,
|
||||
NULL);
|
||||
|
||||
g_free (str);
|
||||
@ -173,7 +173,7 @@ setup_event_list (QuickView *qv, GList *event_list)
|
||||
"y", 0.0,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"text", _("No appointments for this day"),
|
||||
"font", QUICK_VIEW_FONT,
|
||||
"fontset", QUICK_VIEW_FONTSET,
|
||||
NULL);
|
||||
|
||||
/* Measure the text and set the proper sizes */
|
||||
|
@ -497,7 +497,7 @@ year_view_init (YearView *yv)
|
||||
yv->heading = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (yv)),
|
||||
gnome_canvas_text_get_type (),
|
||||
"anchor", GTK_ANCHOR_N,
|
||||
"font", HEADING_FONT,
|
||||
"fontset", HEADING_FONTSET,
|
||||
"fill_color", "black",
|
||||
NULL);
|
||||
|
||||
@ -513,7 +513,7 @@ year_view_init (YearView *yv)
|
||||
gnome_canvas_text_get_type (),
|
||||
"text", buf,
|
||||
"anchor", GTK_ANCHOR_N,
|
||||
"font", TITLE_FONT,
|
||||
"fontset", TITLE_FONTSET,
|
||||
"fill_color", "black",
|
||||
NULL);
|
||||
|
||||
@ -523,8 +523,8 @@ year_view_init (YearView *yv)
|
||||
gnome_canvas_item_set (yv->mitems[i],
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"start_on_monday", week_starts_on_monday,
|
||||
"heading_font", DAY_HEADING_FONT,
|
||||
"day_font", NORMAL_DAY_FONT,
|
||||
"heading_fontset", DAY_HEADING_FONTSET,
|
||||
"day_fontset", NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
setup_month_item (yv, i);
|
||||
}
|
||||
@ -638,7 +638,7 @@ mark_current_day (YearView *yv)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + day_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG),
|
||||
"font", NORMAL_DAY_FONT,
|
||||
"fontset", NORMAL_DAY_FONTSET,
|
||||
NULL);
|
||||
|
||||
yv->old_marked_day = -1;
|
||||
@ -658,7 +658,7 @@ mark_current_day (YearView *yv)
|
||||
GNOME_MONTH_ITEM_DAY_LABEL + day_index);
|
||||
gnome_canvas_item_set (item,
|
||||
"fill_color", color_spec_from_prop (COLOR_PROP_CURRENT_DAY_FG),
|
||||
"font", CURRENT_DAY_FONT,
|
||||
"fontset", CURRENT_DAY_FONTSET,
|
||||
NULL);
|
||||
|
||||
yv->old_marked_day = month_index * 42 + day_index;
|
||||
|
Reference in New Issue
Block a user