Skip to content

Commit

Permalink
Use correct index for calendar month labels; remove unused identifiers.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15700 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
jsled committed Mar 9, 2007
1 parent 4b5589a commit 10e4b91
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/gnome-utils/gnc-dense-cal.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ static const gchar* MONTH_THAT_COLOR = "SlateGray1";

static const gchar* MARK_COLOR = "Yellow";

static QofLogModule log_module = GNC_MOD_SX;
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gnc.gui.dense-cal"

Expand Down Expand Up @@ -289,10 +288,8 @@ gnc_dense_cal_init(GncDenseCal *dcal)
{
gint i;
gint maxWidth, maxHeight;
gint width;
GtkStyle *style;
PangoLayout *layout;
const PangoFontDescription *existing_font_desc;
PangoFontDescription *font_desc;
gint font_size;
gint font_size_reduction_units = 1;
Expand Down Expand Up @@ -465,7 +462,6 @@ gnc_dense_cal_get_year(GncDenseCal *dcal)
static void
gnc_dense_cal_dispose (GObject *object)
{
int i;
GncDenseCal *dcal;
g_return_if_fail(object != NULL);
g_return_if_fail(GNC_IS_DENSE_CAL(object));
Expand Down Expand Up @@ -815,7 +811,7 @@ gnc_dense_cal_draw_to_buffer(GncDenseCal *dcal)
{
int i;
int x1, x2, y1, y2;
GdkColor markColor, black;
GdkColor markColor;
GdkGCValues current_values;

gdk_gc_get_values(widget->style->fg_gc[widget->state], &current_values);
Expand Down Expand Up @@ -936,12 +932,12 @@ gnc_dense_cal_draw_to_buffer(GncDenseCal *dcal)

for (i=0; i<12; i++)
{
guint x, y, idx;
guint idx;

if (dcal->monthPositions[i].x == -1)
break;
idx = (dcal->month - 1 + i) % 12;
pango_layout_set_text(layout, month_name(i), -1);
pango_layout_set_text(layout, month_name(idx), -1);
gdk_draw_layout(GDK_DRAWABLE(dcal->drawbuf),
widget->style->fg_gc[widget->state],
dcal->leftPadding + dcal->monthPositions[i].x,
Expand Down

0 comments on commit 10e4b91

Please sign in to comment.