aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c3
-rw-r--r--calendar/gui/alarm-notify/config-data.c5
-rw-r--r--calendar/gui/dialogs/comp-editor.c6
-rw-r--r--calendar/gui/dialogs/event-page.c16
-rw-r--r--calendar/gui/dialogs/memo-page.c10
-rw-r--r--calendar/gui/dialogs/recurrence-page.c2
-rw-r--r--calendar/gui/dialogs/schedule-page.c4
-rw-r--r--calendar/gui/dialogs/task-details-page.c2
-rw-r--r--calendar/gui/dialogs/task-page.c2
-rw-r--r--calendar/gui/e-cal-model.c6
-rw-r--r--calendar/gui/e-calendar-selector.c14
-rw-r--r--calendar/gui/e-cell-date-edit-text.c2
-rw-r--r--calendar/gui/e-day-view-main-item.c4
-rw-r--r--calendar/gui/e-day-view-top-item.c14
-rw-r--r--calendar/gui/e-day-view.c104
-rw-r--r--calendar/gui/e-itip-control.c4
-rw-r--r--calendar/gui/e-meeting-time-sel-item.c8
-rw-r--r--calendar/gui/e-meeting-time-sel.c1
-rw-r--r--calendar/gui/e-week-view-event-item.c3
-rw-r--r--calendar/gui/e-week-view.c1
-rw-r--r--calendar/gui/ea-day-view-cell.c2
-rw-r--r--calendar/gui/ea-gnome-calendar.c3
-rw-r--r--calendar/gui/ea-week-view-cell.c2
-rw-r--r--calendar/gui/gnome-cal.c10
-rw-r--r--calendar/gui/itip-utils.c10
-rw-r--r--calendar/gui/print.c16
26 files changed, 44 insertions, 210 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index f7160451bb..d8ccda8d72 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -212,11 +212,10 @@ queue_midnight_refresh (void)
static void
add_client_alarms_cb (gpointer key, gpointer value, gpointer data)
{
- ClientAlarms *ca = (ClientAlarms *)data;
+ ClientAlarms *ca = (ClientAlarms *) value;
d(printf("%s:%d (add_client_alarms_cb) - Adding %p\n",__FILE__, __LINE__, ca));
- ca = value;
load_alarms_for_today (ca);
}
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index 406c28abd6..12d7aefa47 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -174,12 +174,9 @@ config_data_replace_string_list (const gchar *key,
for (tmp = source; tmp; tmp = tmp->next) {
if (strcmp (tmp->data, old) == 0) {
- gboolean state;
-
g_free (tmp->data);
tmp->data = g_strdup ((gchar *) new);
- /* Should this be checked somewhere? */
- state = gconf_client_set_list (conf_client,
+ gconf_client_set_list (conf_client,
key,
GCONF_VALUE_STRING,
source,
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 21384032d9..7e16d8924e 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -2516,12 +2516,6 @@ fill_widgets (CompEditor *editor)
view = E_ATTACHMENT_VIEW (editor->priv->attachment_view);
store = e_attachment_view_get_store (view);
- view = E_ATTACHMENT_VIEW (editor->priv->attachment_view);
- store = e_attachment_view_get_store (view);
-
- view = E_ATTACHMENT_VIEW (editor->priv->attachment_view);
- store = e_attachment_view_get_store (view);
-
priv = editor->priv;
/*Check if attachments are available here and set them*/
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 61ebb081e8..35339de8e4 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -1655,17 +1655,17 @@ edit_clicked_cb (GtkButton *btn, EventPage *epage)
EventPagePrivate *priv;
GtkTreePath *path = NULL;
GtkTreeViewColumn *focus_col;
- gint row = 0;
priv = epage->priv;
- gtk_tree_view_get_cursor (GTK_TREE_VIEW (priv->list_view), &path, NULL);
+ gtk_tree_view_get_cursor (
+ GTK_TREE_VIEW (priv->list_view), &path, NULL);
g_return_if_fail (path != NULL);
- row = gtk_tree_path_get_indices (path)[0];
-
- gtk_tree_view_get_cursor (GTK_TREE_VIEW (priv->list_view), &path, &focus_col);
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (priv->list_view), path, focus_col, TRUE);
+ gtk_tree_view_get_cursor (
+ GTK_TREE_VIEW (priv->list_view), &path, &focus_col);
+ gtk_tree_view_set_cursor (
+ GTK_TREE_VIEW (priv->list_view), path, focus_col, TRUE);
gtk_tree_path_free (path);
}
@@ -2472,13 +2472,11 @@ start_timezone_changed_cb (GtkWidget *widget,
EventPage *epage)
{
EventPagePrivate *priv = epage->priv;
- icaltimezone *zone;
if (priv->sync_timezones) {
- zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
comp_editor_page_set_updating (COMP_EDITOR_PAGE (epage), TRUE);
/*the earlier method caused an infinite recursion*/
- priv->end_timezone=priv->start_timezone;
+ priv->end_timezone = priv->start_timezone;
gtk_widget_show_all (priv->end_timezone);
comp_editor_page_set_updating (COMP_EDITOR_PAGE (epage), FALSE);
}
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 98b6545e18..949836a330 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -488,14 +488,12 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
for (l = list_dests; l; l = l->next) {
EDestination *dest = l->data;
- const gchar *name, *attendee = NULL;
+ const gchar *attendee = NULL;
- name = e_destination_get_name (dest);
-
- /* If we couldn't get the attendee prior, get the email address as the default */
- if (attendee == NULL || *attendee == '\0') {
+ /* If we couldn't get the attendee prior,
+ * get the email address as the default. */
+ if (attendee == NULL || *attendee == '\0')
attendee = e_destination_get_email (dest);
- }
if (attendee == NULL || *attendee == '\0')
continue;
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 448ba7546f..e71a3445ae 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -708,7 +708,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
r.by_day[i++] = ICAL_FRIDAY_WEEKDAY;
if (day_mask & (1 << 6))
- r.by_day[i++] = ICAL_SATURDAY_WEEKDAY;
+ r.by_day[i] = ICAL_SATURDAY_WEEKDAY;
break;
}
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 4c2b5cf9d0..32b6dffab8 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -252,12 +252,10 @@ static gboolean
schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
SchedulePage *spage;
- SchedulePagePrivate *priv;
ECalComponentDateTime start_date, end_date;
gboolean validated = TRUE;
spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
/* Clean the screen */
clear_widgets (spage);
@@ -291,10 +289,8 @@ static void
schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
{
SchedulePage *spage;
- SchedulePagePrivate *priv;
spage = SCHEDULE_PAGE (page);
- priv = spage->priv;
comp_editor_page_set_updating (page, TRUE);
update_time (spage, dates->start, dates->end);
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 96c2badf1a..4a5b5b094e 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -528,8 +528,6 @@ date_changed_cb (EDateEdit *dedit,
icalproperty_status status;
gboolean date_set;
- priv = tdpage->priv;
-
if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tdpage)))
return;
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index afc2368d2c..906e960c17 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1425,8 +1425,6 @@ date_changed_cb (EDateEdit *dedit,
struct icaltimetype start_tt = icaltime_null_time();
struct icaltimetype due_tt = icaltime_null_time();
- priv = tpage->priv;
-
if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tpage)))
return;
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index e53dd1d77d..015aa61cec 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -2193,12 +2193,10 @@ add_new_client (ECalModel *model, ECal *client, gboolean do_query)
void
e_cal_model_add_client (ECalModel *model, ECal *client)
{
- ECalModelClient *client_data;
-
g_return_if_fail (E_IS_CAL_MODEL (model));
g_return_if_fail (E_IS_CAL (client));
- /* Check this return value or drop the assignment? */
- client_data = add_new_client (model, client, TRUE);
+
+ add_new_client (model, client, TRUE);
}
static void
diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c
index 94bd5ae339..d46b4dad18 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -110,22 +110,14 @@ calendar_selector_data_dropped (ESourceSelector *selector,
GdkDragAction action,
guint info)
{
- GtkTreeView *tree_view;
- GtkTreeModel *model;
GtkTreePath *path = NULL;
ECal *client;
icalcomponent *icalcomp;
const gchar *string;
- gboolean remove_from_source;
gboolean success = FALSE;
gpointer object = NULL;
- tree_view = GTK_TREE_VIEW (selector);
- model = gtk_tree_view_get_model (tree_view);
-
string = (const gchar *) selection_data->data;
- remove_from_source = (action == GDK_ACTION_MOVE);
-
icalcomp = icalparser_parse_string (string);
if (icalcomp == NULL)
@@ -143,10 +135,8 @@ calendar_selector_data_dropped (ESourceSelector *selector,
destination, E_CAL_SOURCE_TYPE_EVENT);
if (client != NULL) {
- if (e_cal_open (client, TRUE, NULL)) {
- success = TRUE;
+ if (e_cal_open (client, TRUE, NULL))
calendar_selector_update_objects (client, icalcomp);
- }
g_object_unref (client);
}
@@ -162,7 +152,7 @@ exit:
if (object != NULL)
g_object_unref (object);
- return TRUE;
+ return success;
}
static void
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index 97dee085ea..bebec0fcda 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -115,7 +115,6 @@ cell_date_edit_text_get_text (ECellText *cell,
{
ECellDateEditText *ecd = E_CELL_DATE_EDIT_TEXT (cell);
ECellDateEditValue *dv = e_table_model_value_at (model, col, row);
- gboolean use_24_hour_format;
icaltimezone *timezone;
struct tm tmp_tm;
@@ -123,7 +122,6 @@ cell_date_edit_text_get_text (ECellText *cell,
return g_strdup ("");
timezone = e_cell_date_edit_text_get_timezone (ecd);
- use_24_hour_format = e_cell_date_edit_text_get_use_24_hour_format (ecd);
/* Note that although the property may be in a different
timezone, we convert it to the current timezone to display
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 16be4ffc89..6c234bf3d1 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -992,8 +992,6 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
{
EDayViewMainItem *main_item;
EDayView *day_view;
- GtkStyle *style;
- GdkGC *gc;
gint row, row_y, grid_x1, grid_x2;
gint day, grid_y1, grid_y2;
gint work_day_start_y, work_day_end_y;
@@ -1012,7 +1010,6 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
day_view = e_day_view_main_item_get_day_view (main_item);
g_return_if_fail (day_view != NULL);
- style = gtk_widget_get_style (GTK_WIDGET (day_view));
rect.x = 0;
rect.y = 0;
rect.width = width;
@@ -1021,7 +1018,6 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
/* Paint the background colors. */
work_day_start_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute) - y;
- gc = day_view->main_gc;
work_day_end_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_end_hour, day_view->work_day_end_minute) - y;
today_tt = icaltime_from_timet_with_zone (time (NULL), FALSE,
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 211faa5ec8..6b6a6fd8f7 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -71,7 +71,6 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
{
EDayView *day_view;
EDayViewEvent *event;
- GdkGC *gc;
GdkColor bg_color;
GdkPoint points[3];
gint c1, c2;
@@ -81,8 +80,6 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
day_view = e_day_view_top_item_get_day_view (top_item);
- gc = day_view->main_gc;
-
points[0].x = x;
points[0].y = y;
points[1].x = x + w;
@@ -165,7 +162,6 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
cairo_t *cr;
cairo_pattern_t *pat;
guint16 red, green, blue;
- GdkColor fg;
gdouble cc = 65535.0;
gboolean gradient;
gfloat alpha;
@@ -197,7 +193,6 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
style = gtk_widget_get_style (GTK_WIDGET (day_view));
gc = day_view->main_gc;
fg_gc = style->fg_gc[GTK_STATE_NORMAL];
- fg = style->fg[GTK_STATE_NORMAL];
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -584,14 +579,14 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
EDayViewTopItem *top_item;
EDayView *day_view;
GtkStyle *style;
- GdkGC *gc, *fg_gc, *bg_gc, *light_gc, *dark_gc;
+ GdkGC *fg_gc;
gchar buffer[128];
GdkRectangle clip_rect;
gint canvas_width, canvas_height, left_edge, day, date_width, date_x;
gint item_height, event_num;
PangoLayout *layout;
cairo_t *cr;
- GdkColor fg, bg, light, dark;
+ GdkColor bg, light, dark;
gboolean show_dates;
top_item = E_DAY_VIEW_TOP_ITEM (canvas_item);
@@ -602,17 +597,12 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
cr = gdk_cairo_create (drawable);
style = gtk_widget_get_style (GTK_WIDGET (day_view));
- gc = day_view->main_gc;
fg_gc = style->fg_gc[GTK_STATE_NORMAL];
- bg_gc = style->bg_gc[GTK_STATE_NORMAL];
- light_gc = style->light_gc[GTK_STATE_NORMAL];
- dark_gc = style->dark_gc[GTK_STATE_NORMAL];
canvas_width = GTK_WIDGET (canvas_item->canvas)->allocation.width;
canvas_height = (show_dates ? 1 : (MAX (1, day_view->rows_in_top_display) + 1)) * day_view->top_row_height;
left_edge = 0;
item_height = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP;
- fg = style->fg[GTK_STATE_NORMAL];
bg = style->bg[GTK_STATE_NORMAL];
light = style->light[GTK_STATE_NORMAL];
dark = style->dark[GTK_STATE_NORMAL];
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 3df4e6943e..3a276a5aef 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -321,8 +321,6 @@ static void e_day_view_reshape_day_event (EDayView *day_view,
gint day,
gint event_num);
static void e_day_view_reshape_main_canvas_resize_bars (EDayView *day_view);
-static void e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view);
-static void e_day_view_reshape_resize_rect_item (EDayView *day_view);
static void e_day_view_ensure_events_sorted (EDayView *day_view);
@@ -1975,17 +1973,12 @@ e_day_view_foreach_event (EDayView *day_view,
EDayViewForeachEventCallback callback,
gpointer data)
{
- /* event is never used after being set in the for loop below, why? */
- EDayViewEvent *event;
gint day, event_num;
for (day = 0; day < day_view->days_shown; day++) {
for (event_num = day_view->events[day]->len - 1;
event_num >= 0;
event_num--) {
- event = &g_array_index (day_view->events[day],
- EDayViewEvent, event_num);
-
if (!(*callback) (day_view, day, event_num, data))
return;
}
@@ -1994,9 +1987,6 @@ e_day_view_foreach_event (EDayView *day_view,
for (event_num = day_view->long_events->len - 1;
event_num >= 0;
event_num--) {
- event = &g_array_index (day_view->long_events,
- EDayViewEvent, event_num);
-
if (!(*callback) (day_view, E_DAY_VIEW_LONG_EVENT, event_num,
data))
return;
@@ -3520,9 +3510,6 @@ e_day_view_on_long_event_click (EDayView *day_view,
day_view->resize_start_row = start_day;
day_view->resize_end_row = end_day;
- /* Create the edit rect if necessary. */
- e_day_view_reshape_resize_long_event_rect_item (day_view);
-
/* Raise the event's item, above the rect as well. */
gnome_canvas_item_raise_to_top (event->canvas_item);
}
@@ -3598,9 +3585,6 @@ e_day_view_on_event_click (EDayView *day_view,
day_view->resize_bars_event_day = day;
day_view->resize_bars_event_num = event_num;
- /* Create the edit rect if necessary. */
- e_day_view_reshape_resize_rect_item (day_view);
-
e_day_view_reshape_main_canvas_resize_bars (day_view);
/* Raise the event's item, above the rect as well. */
@@ -3626,56 +3610,6 @@ e_day_view_on_event_click (EDayView *day_view,
}
static void
-e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view)
-{
- gint event_num, start_day, end_day;
- gint item_x, item_y, item_w, item_h;
- gdouble x1, y1, x2, y2;
-
- event_num = day_view->resize_event_num;
-
- /* If we're not resizing an event, or the event is not shown,
- hide the resize bars. */
- if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
- || !e_day_view_get_long_event_position (day_view, event_num,
- &start_day, &end_day,
- &item_x, &item_y,
- &item_w, &item_h)) {
- return;
- }
-
- x1 = item_x;
- y1 = item_y;
- x2 = item_x + item_w - 1;
- y2 = item_y + item_h - 1;
-}
-
-static void
-e_day_view_reshape_resize_rect_item (EDayView *day_view)
-{
- gint day, event_num;
- gint item_x, item_y, item_w, item_h;
- gdouble x1, y1, x2, y2;
-
- day = day_view->resize_event_day;
- event_num = day_view->resize_event_num;
-
- /* If we're not resizing an event, or the event is not shown,
- hide the resize bars. */
- if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
- || !e_day_view_get_event_position (day_view, day, event_num,
- &item_x, &item_y,
- &item_w, &item_h)) {
- return;
- }
-
- x1 = item_x;
- y1 = item_y;
- x2 = item_x + item_w - 1;
- y2 = item_y + item_h - 1;
-}
-
-static void
e_day_view_on_event_double_click (EDayView *day_view,
gint day,
gint event_num)
@@ -4012,8 +3946,6 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
&& day_view->pressed_event_day != E_DAY_VIEW_LONG_EVENT) {
GtkTargetList *target_list;
- event = &g_array_index (day_view->events[day_view->pressed_event_day], EDayViewEvent, day_view->pressed_event_num);
-
if ((abs (canvas_x - day_view->drag_event_x)
> E_DAY_VIEW_DRAG_START_OFFSET
|| abs (canvas_y - day_view->drag_event_y)
@@ -4176,8 +4108,6 @@ static void
e_day_view_update_long_event_resize (EDayView *day_view,
gint day)
{
- /* event is never used here either, what's up? */
- EDayViewEvent *event;
gint event_num;
gboolean need_reshape = FALSE;
@@ -4186,8 +4116,6 @@ e_day_view_update_long_event_resize (EDayView *day_view,
#endif
event_num = day_view->resize_event_num;
- event = &g_array_index (day_view->long_events, EDayViewEvent,
- event_num);
if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE) {
day = MIN (day, day_view->resize_end_row);
@@ -4207,7 +4135,6 @@ e_day_view_update_long_event_resize (EDayView *day_view,
/* FIXME: Optimise? */
if (need_reshape) {
e_day_view_reshape_long_event (day_view, event_num);
- e_day_view_reshape_resize_long_event_rect_item (day_view);
gtk_widget_queue_draw (day_view->top_canvas);
}
}
@@ -4256,7 +4183,6 @@ e_day_view_update_resize (EDayView *day_view,
/* FIXME: Optimise? */
if (need_reshape) {
e_day_view_reshape_day_event (day_view, day, event_num);
- e_day_view_reshape_resize_rect_item (day_view);
e_day_view_reshape_main_canvas_resize_bars (day_view);
gtk_widget_queue_draw (day_view->main_canvas);
}
@@ -5407,18 +5333,13 @@ e_day_view_change_duration_to_start_of_work_day (EDayView *day_view)
return;
else {
/* These are never used after being set? */
- gint work_start_row,work_end_row,selection_start_row,selection_end_row;
+ gint work_start_row,selection_start_row;
- work_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_start_hour,
- day_view->work_day_start_minute);
- work_end_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_end_hour - 1,
- day_view->work_day_end_minute + 30);
+ work_start_row = e_day_view_convert_time_to_row (
+ day_view,
+ day_view->work_day_start_hour,
+ day_view->work_day_start_minute);
selection_start_row = day_view->selection_start_row;
- selection_end_row = day_view->selection_end_row;
if (selection_start_row < work_start_row)
day_view->selection_end_row = work_start_row - 1;
else day_view->selection_start_row = work_start_row;
@@ -5444,16 +5365,13 @@ e_day_view_change_duration_to_end_of_work_day (EDayView *day_view)
if (day_view->selection_in_top_canvas)
return;
else {
- gint work_start_row,work_end_row,selection_start_row,selection_end_row;
- work_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_start_hour,
- day_view->work_day_start_minute);
- work_end_row = e_day_view_convert_time_to_row (day_view,
- day_view->work_day_end_hour-1,
- day_view->work_day_end_minute+30);
+ gint work_end_row,selection_start_row;
+
+ work_end_row = e_day_view_convert_time_to_row (
+ day_view,
+ day_view->work_day_end_hour-1,
+ day_view->work_day_end_minute+30);
selection_start_row = day_view->selection_start_row;
- selection_end_row = day_view->selection_end_row;
if (selection_start_row <= work_end_row)
day_view->selection_end_row = work_end_row;
else {
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 44ac2215e4..d1fe75a32d 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -348,7 +348,6 @@ find_server (EItipControl *itip, ECalComponent *comp, gboolean show_selector)
sources = e_source_group_peek_sources (group);
for (m = sources; m; m = m->next) {
ESource *source;
- ECal *ecal;
source = m->data;
@@ -360,7 +359,7 @@ find_server (EItipControl *itip, ECalComponent *comp, gboolean show_selector)
}
fd->count++;
/* Check this return too? */
- ecal = start_calendar_server (itip, source, priv->type, find_cal_opened_cb, fd);
+ start_calendar_server (itip, source, priv->type, find_cal_opened_cb, fd);
}
}
}
@@ -2004,6 +2003,7 @@ update_attendee_status (EItipControl *itip)
GTK_BUTTONS_OK,
"%s", _("Object is invalid and "
"cannot be updated\n"));
+ goto run;
} else {
e_cal_component_get_attendee_list (priv->comp, &attendees);
if (attendees != NULL) {
diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c
index 041ae6e403..6c4c2ad8dc 100644
--- a/calendar/gui/e-meeting-time-sel-item.c
+++ b/calendar/gui/e-meeting-time-sel-item.c
@@ -508,7 +508,6 @@ static void
e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, gint x, gint scroll_y, gint width, gint height)
{
EMeetingTimeSelector *mts;
- EMeetingAttendee *ia;
EMeetingFreeBusyType busy_type;
gint row, y;
GdkGC *gc;
@@ -526,11 +525,8 @@ e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelec
/* Get the first visible busy periods for all the attendees. */
first_periods = g_new (gint, e_meeting_store_count_actual_attendees (mts->model));
- for (row = 0; row < e_meeting_store_count_actual_attendees (mts->model); row++) {
- /* This is never used */
- ia = e_meeting_store_find_attendee_at_row (mts->model, row);
+ for (row = 0; row < e_meeting_store_count_actual_attendees (mts->model); row++)
first_periods[row] = e_meeting_time_selector_item_find_first_busy_period (mts_item, date, row);
- }
for (busy_type = 0;
busy_type < E_MEETING_FREE_BUSY_LAST;
@@ -713,11 +709,9 @@ e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorIt
EMeetingAttendee *ia;
const GArray *busy_periods;
EMeetingFreeBusyPeriod *period;
- GdkGC *gc;
gint period_num, x1, x2, x2_within_day, x2_within_col;
mts = mts_item->mts;
- gc = mts_item->main_gc;
ia = e_meeting_store_find_attendee_at_row (mts->model, row);
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 4bd1ed1bdb..9998cb2445 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -711,7 +711,6 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
menuitem = gtk_radio_menu_item_new_with_label (group, "");
mts->autopick_required_people_one_resource_item = menuitem;
- group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("Required people and _one resource"));
gtk_menu_shell_append (GTK_MENU_SHELL (mts->autopick_menu), menuitem);
g_signal_connect (menuitem, "activate",
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index f6560a4f15..3054201e34 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -472,7 +472,6 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
{
EWeekView *week_view;
EWeekViewEvent *event;
- GdkGC *gc;
GdkPoint points[3];
gint c1, c2;
cairo_t *cr;
@@ -485,7 +484,6 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
event = &g_array_index (week_view->events, EWeekViewEvent,
event_item->priv->event_num);
- gc = week_view->main_gc;
cr = gdk_cairo_create (drawable);
points[0].x = x;
@@ -700,7 +698,6 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
cr = gdk_cairo_create (drawable);
gradient = calendar_config_get_display_events_gradient ();
- icon_x = 0;
icon_y = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT + E_WEEK_VIEW_ICON_Y_PAD;
/* Get the start & end times in 24-hour format. */
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 222bdba465..a85ed63b82 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3528,7 +3528,6 @@ static gboolean e_week_view_event_move (ECalendarView *cal_view, ECalViewMoveDir
event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
- start_dt = event->start;
end_dt = event->end;
start_time = icalcomponent_get_dtstart (event->comp_data->icalcomp);
end_time = icalcomponent_get_dtend (event->comp_data->icalcomp);
diff --git a/calendar/gui/ea-day-view-cell.c b/calendar/gui/ea-day-view-cell.c
index 6760b7cc42..609b515526 100644
--- a/calendar/gui/ea-day-view-cell.c
+++ b/calendar/gui/ea-day-view-cell.c
@@ -208,7 +208,7 @@ ea_day_view_cell_get_name (AtkObject *accessible)
if (!accessible->name) {
AtkObject *ea_main_item;
GnomeCanvasItem *main_item;
- gchar *new_name = g_strdup ("");
+ gchar *new_name;
const gchar *row_label, *column_label;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c
index ad7d108c25..1f599c1790 100644
--- a/calendar/gui/ea-gnome-calendar.c
+++ b/calendar/gui/ea-gnome-calendar.c
@@ -115,7 +115,6 @@ ea_gnome_calendar_new (GtkWidget *widget)
{
GObject *object;
AtkObject *accessible;
- GnomeCalendar *gcal;
g_return_val_if_fail (GNOME_IS_CALENDAR (widget), NULL);
@@ -126,8 +125,6 @@ ea_gnome_calendar_new (GtkWidget *widget)
accessible->role = ATK_ROLE_FILLER;
- gcal = GNOME_CALENDAR (widget);
-
/* listen on view type change
*/
g_signal_connect (widget, "dates_shown_changed",
diff --git a/calendar/gui/ea-week-view-cell.c b/calendar/gui/ea-week-view-cell.c
index ea4c103ac4..de4c244ebf 100644
--- a/calendar/gui/ea-week-view-cell.c
+++ b/calendar/gui/ea-week-view-cell.c
@@ -208,7 +208,7 @@ ea_week_view_cell_get_name (AtkObject *accessible)
if (!accessible->name) {
AtkObject *ea_main_item;
GnomeCanvasItem *main_item;
- gchar *new_name = g_strdup ("");
+ gchar *new_name;
const gchar *row_label, *column_label;
gint new_column, new_row;
gint start_day;
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index abd6a36532..f4bfbe1d5e 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1307,13 +1307,10 @@ update_todo_view_cb (GnomeCalendar *gcal)
static gboolean
update_marcus_bains_line_cb (GnomeCalendar *gcal)
{
- GnomeCalendarPrivate *priv;
GnomeCalendarViewType view_type;
ECalendarView *view;
time_t now, day_begin;
- priv = gcal->priv;
-
view_type = gnome_calendar_get_view (gcal);
view = gnome_calendar_get_calendar_view (gcal, view_type);
@@ -1905,7 +1902,6 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w));
g_signal_connect(w, "destroy", G_CALLBACK(non_intrusive_error_remove), id);
- status = E_CALENDAR_STATUS_OK;
break;
case E_CALENDAR_STATUS_AUTHENTICATION_FAILED:
/* try to reopen calendar - it'll ask for a password once again */
@@ -2023,12 +2019,9 @@ typedef void (*open_func) (ECal *, ECalendarStatus, GnomeCalendar *);
static gboolean
open_ecal (GnomeCalendar *gcal, ECal *cal, gboolean only_if_exists, open_func of)
{
- GnomeCalendarPrivate *priv;
gchar *msg;
icaltimezone *zone;
- priv = gcal->priv;
-
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (cal, zone, NULL);
@@ -2550,14 +2543,11 @@ check_instance_cb (ECalComponent *comp,
void
gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
{
- GnomeCalendarPrivate *priv;
gchar *sexp, *start, *end;
GList *clients, *l;
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- priv = gcal->priv;
-
start = isodate_from_time_t (0);
end = isodate_from_time_t (older_than);
sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\")"
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 7f1e0780d9..804f5e004a 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -632,12 +632,16 @@ comp_subject (ECalComponentItipMethod method, ECalComponent *comp)
switch (e_cal_component_get_vtype (comp)) {
case E_CAL_COMPONENT_EVENT:
description = _("Event information");
+ break;
case E_CAL_COMPONENT_TODO:
description = _("Task information");
+ break;
case E_CAL_COMPONENT_JOURNAL:
description = _("Memo information");
+ break;
case E_CAL_COMPONENT_FREEBUSY:
description = _("Free/Busy information");
+ break;
default:
description = _("Calendar information");
}
@@ -896,7 +900,6 @@ comp_limit_attendees (ECalComponent *comp)
if (!match)
list = g_slist_prepend (list, prop);
- match = FALSE;
}
for (l = list; l != NULL; l = l->next) {
@@ -1555,10 +1558,9 @@ itip_publish_begin (ECalComponent *pub_comp, ECal *client,
if (e_cal_component_get_vtype (pub_comp) == E_CAL_COMPONENT_FREEBUSY) {
- if (!cloned) {
+ if (!cloned)
*clone = e_cal_component_clone (pub_comp);
- cloned = TRUE;
- } else {
+ else {
icomp = e_cal_component_get_icalcomponent (pub_comp);
icomp_clone = e_cal_component_get_icalcomponent (*clone);
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 010a60423b..1781788a57 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -581,7 +581,7 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
gint day, weekday, week_start_day;
gchar buf[100];
struct tm tm;
- double font_size, max_font_size;
+ double font_size;
double header_size, col_width, row_height, text_xpad, w;
double cell_top, cell_bottom, cell_left, cell_right, text_right;
@@ -614,14 +614,6 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
rough guess of just under the height of each row. */
font_size = row_height;
- /* Check that it isn't going to be too wide. The characters are about
- twice as high as they are wide, but we need to fit two characters
- into each cell, so we don't want to go over col_width. */
- max_font_size = col_width * 0.65;
-
- /* Why calculate this if we're not using it? */
- font_size = row_height;
-
/* get month days */
tm = *convert_timet_to_struct_tm (month, zone);
build_month (tm.tm_mon, tm.tm_year + 1900, days, NULL, NULL);
@@ -1532,7 +1524,7 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font,
gint span_num;
gchar *text;
gint num_days, start_x, start_y, start_h, end_x, end_y, end_h;
- double x1, x2, y1, y2;
+ double x1, x2, y1;
double red, green, blue;
GdkPixbuf *pixbuf = NULL;
@@ -1578,7 +1570,6 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font,
y1 = top + start_y * cell_height
+ psi->header_row_height
+ span->row * (psi->row_height + 2);
- y2 = y1 + psi->row_height * 0.5;
red = .9;
green = .9;
@@ -2088,7 +2079,6 @@ print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
gint i, days = 1;
double todo, l;
gchar buf[100];
- cairo_t *cr;
gdouble width, height;
setup = gtk_print_context_get_page_setup (context);
@@ -2099,8 +2089,6 @@ print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
for (i = 0; i < days; i++) {
todo = width * 0.75;
- cr = gtk_print_context_get_cairo_context (context);
-
/* Print the main view with all the events in. */
print_day_details (context, gcal, date,
0.0, todo - 2.0, HEADER_HEIGHT,