aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/Makefile.am1
-rw-r--r--calendar/gui/gnome-month-item.c16
-rw-r--r--calendar/gui/main.c13
-rw-r--r--calendar/gui/main.h1
-rw-r--r--calendar/gui/month-view.c8
-rw-r--r--calendar/gui/prop.c6
6 files changed, 25 insertions, 20 deletions
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
index 59260889c2..039e866306 100644
--- a/calendar/gui/Makefile.am
+++ b/calendar/gui/Makefile.am
@@ -37,6 +37,7 @@ gnomecal_SOURCES = \
getdate.y \
gnome-cal.c \
gnome-cal.h \
+ goto.c \
main.c \
main.h \
month-view.c \
diff --git a/calendar/gui/gnome-month-item.c b/calendar/gui/gnome-month-item.c
index f5e3a5b8df..9b00d4d3c8 100644
--- a/calendar/gui/gnome-month-item.c
+++ b/calendar/gui/gnome-month-item.c
@@ -452,8 +452,6 @@ static void
create_days (GnomeMonthItem *mitem)
{
int i;
- char buf[100];
- GdkColor *c;
/* Just create the items; they will be positioned and configured by a call to reshape() */
@@ -465,13 +463,11 @@ create_days (GnomeMonthItem *mitem)
NULL);
/* Box */
- c = &GTK_WIDGET (GNOME_CANVAS_ITEM (mitem)->canvas)->style->bg[GTK_STATE_NORMAL];
- sprintf (buf, "#%04x%04x%04x", c->red, c->green, c->blue);
mitem->items[ITEM_DAY_BOX + i] =
gnome_canvas_item_new (GNOME_CANVAS_GROUP (mitem->items[ITEM_DAY_GROUP + i]),
gnome_canvas_rect_get_type (),
"outline_color", "black",
- "fill_color", buf,
+ "fill_color", "#d6d6d6",
NULL);
/* Label */
@@ -667,12 +663,6 @@ reanchor (GnomeMonthItem *mitem)
}
static void
-recalc_month (GnomeMonthItem *mitem)
-{
- /* FIXME */
-}
-
-static void
gnome_month_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
GnomeMonthItem *mitem;
@@ -684,12 +674,12 @@ gnome_month_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
switch (arg_id) {
case ARG_YEAR:
mitem->year = GTK_VALUE_UINT (*arg);
- recalc_month (mitem);
+ set_days (mitem);
break;
case ARG_MONTH:
mitem->month = GTK_VALUE_UINT (*arg);
- recalc_month (mitem);
+ set_days (mitem);
break;
case ARG_X:
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index 6d2a334163..ebb008927f 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -134,7 +134,10 @@ about_calendar_cmd (GtkWidget *widget, void *data)
authors,
_("The GNOME personal calendar and schedule manager."),
NULL);
+ gnome_dialog_run_and_destroy (GNOME_DIALOG (about));
+#if 0
gtk_widget_show (about);
+#endif
}
static void
@@ -224,6 +227,12 @@ today_clicked (GtkWidget *widget, GnomeCalendar *gcal)
}
static void
+goto_clicked (GtkWidget *widget, GnomeCalendar *gcal)
+{
+ goto_dialog (gcal);
+}
+
+static void
new_calendar_cmd (GtkWidget *widget, void *data)
{
new_calendar (full_name, NULL, NULL, NULL);
@@ -375,6 +384,10 @@ static GnomeUIInfo gnome_toolbar [] = {
{ GNOME_APP_UI_ITEM, N_("Next"), N_("Go forward in time"), next_clicked, 0, 0,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_FORWARD },
+ GNOMEUIINFO_SEPARATOR,
+
+ GNOMEUIINFO_ITEM_STOCK (N_("Go to"), N_("Go to a specific date"), goto_clicked, GNOME_STOCK_PIXMAP_STOP),
+
GNOMEUIINFO_END
};
diff --git a/calendar/gui/main.h b/calendar/gui/main.h
index 81605a55f6..374f8199e6 100644
--- a/calendar/gui/main.h
+++ b/calendar/gui/main.h
@@ -7,5 +7,6 @@ extern int am_pm_flag;
void properties (void);
void day_range_changed (void);
+void goto_dialog (GnomeCalendar *gcal);
#endif
diff --git a/calendar/gui/month-view.c b/calendar/gui/month-view.c
index 4b96aa4bcb..a23938b350 100644
--- a/calendar/gui/month-view.c
+++ b/calendar/gui/month-view.c
@@ -65,9 +65,9 @@ month_view_init (MonthView *mv)
"y", 0.0,
"anchor", GTK_ANCHOR_NW,
"day_anchor", GTK_ANCHOR_NE,
-
+#if 0
"start_on_monday", TRUE,
-
+#endif
NULL);
}
@@ -115,7 +115,7 @@ month_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
gnome_canvas_set_scroll_region (GNOME_CANVAS (mv), 0, 0, allocation->width, allocation->height);
gnome_canvas_item_set (mv->mitem,
- "width", (double) allocation->width,
- "height", (double) allocation->height,
+ "width", (double) (allocation->width - 1),
+ "height", (double) (allocation->height - 1),
NULL);
}
diff --git a/calendar/gui/prop.c b/calendar/gui/prop.c
index eab5d00be0..58abe2f8db 100644
--- a/calendar/gui/prop.c
+++ b/calendar/gui/prop.c
@@ -6,13 +6,13 @@
*/
#include <config.h>
#include <gnome.h>
-#include "main.h"
#include "gnome-cal.h"
+#include "main.h"
static GtkWidget *prop_win, *r1;
static GtkObject *sa, *ea;
-void
+static void
start_changed (GtkAdjustment *sa, GtkAdjustment *ea)
{
if (sa->value > 23.0){
@@ -27,7 +27,7 @@ start_changed (GtkAdjustment *sa, GtkAdjustment *ea)
gnome_property_box_changed (GNOME_PROPERTY_BOX (prop_win));
}
-void
+static void
end_changed (GtkAdjustment *ea, GtkAdjustment *sa)
{
if (ea->value < 1.0){