I would be all in favour of adding this functionality officially to JPilot!
Eamann O Ruairc
Johan Vromans wrote:
> Johan Vromans <jvromans at squirrel.nl> writes:
>
>
>> Some small remarks that may help to make JPilot even more nice and
>> shiny.
>> ...
>> In the Week and Month views, you cannot see what day is today. Maybe
>> highlight with a different colour? (Note that I do not consider
>> "Annotate today" to be a big help as it hardly stands out.)
>>
>
> In the deafening silence that followed I worked out this little patch
> that makes the background of the current day yellow, making it stick
> out properly.
>
> This is a "works for me" type of patch. I need the functionality. If
> you like it, feel free to apply this patch.
>
> Should there be any interest in adding this functionality officially
> to JPilot then the background colour should be made configurable
> through the jpilotrc.* (colour config) files. In this patch, it is
> fixed.
>
> -- Johan
>
>
> ------------------------------------------------------------------------
>
> *** monthview_gui.c~ 2006-06-23 15:38:22.000000000 +0200
> --- monthview_gui.c 2007-02-25 22:30:05.000000000 +0100
> ***************
> *** 188,193 ****
> --- 188,197 ----
> GtkWidget *text;
> #ifdef ENABLE_GTK2
> char *markup_str;
> + GdkColor color, bcolor;
> +
> + gdk_color_parse ("yellow", &color);
> + gdk_color_parse ("white", &bcolor);
> #endif
>
> /* Determine today for highlighting */
> ***************
> *** 219,226 ****
> --- 223,232 ----
> if (d == now_today)
> {
> markup_str = g_markup_printf_escaped("<b>%s</b>", str);
> + gtk_widget_modify_base (GTK_WIDGET(text), GTK_STATE_NORMAL, &color);
> } else {
> markup_str = g_markup_printf_escaped("%s", str);
> + gtk_widget_modify_base (GTK_WIDGET(text), GTK_STATE_NORMAL, &bcolor);
> }
> gtk_label_set_markup(GTK_LABEL(glob_month_labels[n]), markup_str);
> g_free(markup_str);
> *** weekview_gui.c~ 2006-06-23 15:38:32.000000000 +0200
> --- weekview_gui.c 2007-02-25 22:30:07.000000000 +0100
> ***************
> *** 183,188 ****
> --- 183,192 ----
> #ifdef ENABLE_GTK2
> GObject *text_buffer;
> char *markup_str;
> + GdkColor color, bcolor;
> +
> + gdk_color_parse ("yellow", &color);
> + gdk_color_parse ("white", &bcolor);
> #endif
>
> a_list = NULL;
> ***************
> *** 208,215 ****
> --- 212,221 ----
> if (date.tm_mday == now_today)
> {
> markup_str = g_markup_printf_escaped("<b>%s</b>", str);
> + gtk_widget_modify_base (GTK_WIDGET(text[i]), GTK_STATE_NORMAL, &color);
> } else {
> markup_str = g_markup_printf_escaped("%s", str);
> + gtk_widget_modify_base (GTK_WIDGET(text[i]), GTK_STATE_NORMAL, &bcolor);
> }
> gtk_label_set_markup(GTK_LABEL(glob_dow_labels[i]), markup_str);
> g_free(markup_str);
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> jpilot mailing list
> jpilot at jpilot.org
> http://lists.jpilot.org/mailman/listinfo/jpilot
>
More information about the jpilot mailing list