[planner] Fix warning: misc variables set but not used
- From: Alexandre Franke <afranke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [planner] Fix warning: misc variables set but not used
- Date: Sun, 25 Dec 2011 02:53:29 +0000 (UTC)
commit aa62d8fdd7f1c2dd1b808f4cc6fc87c9d7be06fa
Author: Alexandre Franke <alexandre franke gmail com>
Date: Sun Dec 25 03:15:39 2011 +0100
Fix warning: misc variables set but not used
https://bugzilla.gnome.org/show_bug.cgi?id=662063
libplanner/mrp-resource.c | 3 ---
libplanner/mrp-task-manager.c | 11 +----------
libplanner/mrp-time.c | 6 ++----
src/eel-canvas-rect.c | 16 ++++++++++------
src/planner-calendar.c | 30 +-----------------------------
src/planner-cell-renderer-list.c | 5 -----
src/planner-gantt-background.c | 6 +-----
src/planner-gantt-chart.c | 12 +-----------
src/planner-gantt-header.c | 12 ------------
src/planner-gantt-model.c | 3 ---
src/planner-gantt-print.c | 3 ---
src/planner-gantt-row.c | 15 ++-------------
src/planner-group-dialog.c | 2 --
src/planner-predecessor-model.c | 4 ----
src/planner-resource-dialog.c | 5 -----
src/planner-resource-view.c | 10 ----------
src/planner-task-cmd.c | 11 +++++------
src/planner-task-dialog.c | 3 ---
src/planner-task-tree.c | 26 +++-----------------------
src/planner-usage-chart.c | 18 ++++--------------
src/planner-usage-row.c | 12 ++----------
src/planner-usage-view.c | 6 ++++--
22 files changed, 36 insertions(+), 183 deletions(-)
---
diff --git a/libplanner/mrp-resource.c b/libplanner/mrp-resource.c
index 16165e2..22180e3 100644
--- a/libplanner/mrp-resource.c
+++ b/libplanner/mrp-resource.c
@@ -591,15 +591,12 @@ void
imrp_resource_add_assignment (MrpResource *resource, MrpAssignment *assignment)
{
MrpResourcePriv *priv;
- MrpTask *task;
g_return_if_fail (MRP_IS_RESOURCE (resource));
g_return_if_fail (MRP_IS_ASSIGNMENT (assignment));
priv = resource->priv;
- task = mrp_assignment_get_task (assignment);
-
priv->assignments = g_list_prepend (priv->assignments,
g_object_ref (assignment));
diff --git a/libplanner/mrp-task-manager.c b/libplanner/mrp-task-manager.c
index 382528b..d06a303 100644
--- a/libplanner/mrp-task-manager.c
+++ b/libplanner/mrp-task-manager.c
@@ -509,8 +509,6 @@ mrp_task_manager_move_task (MrpTaskManager *manager,
GError **error)
{
MrpTask *old_parent;
- gint old_pos;
- MrpTask *grand_parent;
g_return_val_if_fail (MRP_IS_TASK_MANAGER (manager), FALSE);
g_return_val_if_fail (MRP_IS_TASK (task), FALSE);
@@ -518,9 +516,6 @@ mrp_task_manager_move_task (MrpTaskManager *manager,
g_return_val_if_fail (MRP_IS_TASK (parent), FALSE);
old_parent = mrp_task_get_parent (task);
- old_pos = mrp_task_get_position (task);
-
- grand_parent = mrp_task_get_parent (old_parent);
if (!mrp_task_manager_check_move (manager,
task,
@@ -1356,7 +1351,7 @@ task_manager_get_task_units_intervals (MrpTaskManager *manager,
MrpAssignment *assignment;
MrpResource *resource;
GList *assignments, *a;
- gint units, units_full, units_orig, priority;
+ gint units, units_full, units_orig;
mrptime i_start, i_end;
mrptime t;
@@ -1365,8 +1360,6 @@ task_manager_get_task_units_intervals (MrpTaskManager *manager,
guint len;
gint i;
- mrptime diffe;
-
gint res_n;
#ifdef WITH_SIMPLE_PRIORITY_SCHEDULING
@@ -1389,7 +1382,6 @@ task_manager_get_task_units_intervals (MrpTaskManager *manager,
assignments = mrp_task_get_assignments (task);
array = g_ptr_array_new ();
- priority = mrp_task_get_priority (task);
#ifdef WITH_SIMPLE_PRIORITY_SCHEDULING
v_tasks = mrp_task_manager_get_all_tasks (manager);
@@ -1412,7 +1404,6 @@ task_manager_get_task_units_intervals (MrpTaskManager *manager,
ival = l->data;
mrp_interval_get_absolute (ival, date, &i_start, &i_end);
units = units_orig;
- diffe = i_end - i_start;
#ifdef WITH_SIMPLE_PRIORITY_SCHEDULING
for (v_l = v_tasks; v_l; v_l = v_l->next) {
diff --git a/libplanner/mrp-time.c b/libplanner/mrp-time.c
index b8105bb..5093e53 100644
--- a/libplanner/mrp-time.c
+++ b/libplanner/mrp-time.c
@@ -308,6 +308,8 @@ mrp_time_from_string (const gchar *str,
/* FIXME: If we want to support reading times other than in UTC,
* implement that here.
*/
+ if (!is_utc) {
+ }
return mrp_time_compose (year,
month,
@@ -1200,7 +1202,6 @@ mrp_time2_set_from_string (MrpTime *t,
const gchar *str)
{
gint len;
- gboolean is_utc;
gboolean is_date;
gint year;
gint month;
@@ -1212,10 +1213,8 @@ mrp_time2_set_from_string (MrpTime *t,
len = strlen (str);
if (len == 15) { /* floating time */
- is_utc = FALSE;
is_date = FALSE;
} else if (len == 16) { /* UTC time, ends in 'Z' */
- is_utc = TRUE;
is_date = FALSE;
if (str[15] != 'Z') {
@@ -1223,7 +1222,6 @@ mrp_time2_set_from_string (MrpTime *t,
}
}
else if (len == 8) { /* A date. */
- is_utc = TRUE;
is_date = TRUE;
} else {
return FALSE;
diff --git a/src/eel-canvas-rect.c b/src/eel-canvas-rect.c
index 9046c54..9387618 100644
--- a/src/eel-canvas-rect.c
+++ b/src/eel-canvas-rect.c
@@ -361,13 +361,14 @@ eel_canvas_rect_update (GnomeCanvasItem *item,
static void
eel_canvas_rect_realize (GnomeCanvasItem *item)
{
- EelCanvasRect *rect;
- EelCanvasRectDetails *details;
+ EelCanvasRect *rect = EEL_CANVAS_RECT (item);
+
#ifdef HAVE_RENDER
+ EelCanvasRectDetails *details;
int event_base, error_base;
-#endif
- rect = EEL_CANVAS_RECT (item);
+
details = rect->details;
+#endif
eel_canvas_rect_update_outline_gc (rect, TRUE);
@@ -480,20 +481,23 @@ render_rect_alpha (EelCanvasRect *rect,
guchar *data;
int rowstride, i;
guchar r, g, b, a;
+
+#ifdef HAVE_RENDER
EelCanvasRectDetails *details;
+#endif
if (width <= 0 || height <= 0 ) {
return;
}
- details = rect->details;
-
r = (rgba >> 24) & 0xff;
g = (rgba >> 16) & 0xff;
b = (rgba >> 8) & 0xff;
a = (rgba >> 0) & 0xff;
#ifdef HAVE_RENDER
+ details = rect->details;
+
if (details->use_render) {
Display *dpy;
Picture pict;
diff --git a/src/planner-calendar.c b/src/planner-calendar.c
index ba91ab0..a1a2b44 100644
--- a/src/planner-calendar.c
+++ b/src/planner-calendar.c
@@ -770,12 +770,9 @@ static void
planner_calendar_set_year_next (PlannerCalendar *calendar)
{
gint month_len;
- GtkWidget *widget;
g_return_if_fail (GTK_IS_WIDGET (calendar));
- widget = GTK_WIDGET (calendar);
-
planner_calendar_freeze (calendar);
calendar->year++;
@@ -1427,10 +1424,8 @@ static gboolean
planner_calendar_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- PlannerCalendar *calendar;
PlannerCalendarPrivateData *private_data;
- calendar = PLANNER_CALENDAR (widget);
private_data = PLANNER_CALENDAR_PRIVATE_DATA (widget);
if (GTK_WIDGET_DRAWABLE (widget))
@@ -1464,7 +1459,7 @@ planner_calendar_paint_header (GtkWidget *widget)
GdkGC *gc;
char buffer[255];
int x, y;
- gint header_width, cal_height;
+ gint header_width;
gint max_month_width;
gint max_year_width;
PlannerCalendarPrivateData *private_data;
@@ -1486,7 +1481,6 @@ planner_calendar_paint_header (GtkWidget *widget)
gdk_window_clear (private_data->header_win);
header_width = widget->allocation.width - 2 * widget->style->xthickness;
- cal_height = widget->allocation.height;
max_month_width = private_data->max_month_width;
max_year_width = private_data->max_year_width;
@@ -1548,7 +1542,6 @@ planner_calendar_paint_day_names (GtkWidget *widget)
char buffer[255];
int day,i;
int day_width, cal_width;
- gint cal_height;
int day_wid_sep;
PangoLayout *layout;
PangoRectangle logical_rect;
@@ -1584,7 +1577,6 @@ planner_calendar_paint_day_names (GtkWidget *widget)
day_width = private_data->day_width;
cal_width = widget->allocation.width;
- cal_height = widget->allocation.height;
day_wid_sep = day_width + DAY_XSEP;
/*
@@ -1774,7 +1766,6 @@ planner_calendar_paint_day (GtkWidget *widget,
gint x_loc;
gint y_top;
gint y_loc;
- gint day_xspace;
gint focus_width;
PlannerCalendarPrivateData *private_data;
@@ -1801,8 +1792,6 @@ planner_calendar_paint_day (GtkWidget *widget,
day_height = row_height (calendar);
- day_xspace = private_data->day_width - private_data->max_day_char_width*2;
-
day = calendar->day[row][col];
x_left = left_x_for_column (calendar, col);
@@ -1915,13 +1904,6 @@ planner_calendar_paint_day (GtkWidget *widget,
if (GTK_WIDGET_HAS_FOCUS (calendar)
&& calendar->focus_row == row && calendar->focus_col == col)
{
- GtkStateType state;
-
- if (calendar->selected_day == day)
- state = GTK_WIDGET_HAS_FOCUS (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE;
- else
- state = GTK_STATE_NORMAL;
-
gtk_paint_focus (widget->style,
private_data->main_win,
(calendar->selected_day == day)
@@ -1939,14 +1921,12 @@ planner_calendar_paint_day (GtkWidget *widget,
static void
planner_calendar_paint_main (GtkWidget *widget)
{
- PlannerCalendar *calendar;
PlannerCalendarPrivateData *private_data;
gint row, col;
g_return_if_fail (PLANNER_IS_CALENDAR (widget));
g_return_if_fail (widget->window != NULL);
- calendar = PLANNER_CALENDAR (widget);
private_data = PLANNER_CALENDAR_PRIVATE_DATA (widget);
if (private_data->freeze_count)
@@ -2320,15 +2300,11 @@ planner_calendar_button_press (GtkWidget *widget,
{
PlannerCalendar *calendar;
PlannerCalendarPrivateData *private_data;
- gint x, y;
void (* action_func) (PlannerCalendar *);
calendar = PLANNER_CALENDAR (widget);
private_data = PLANNER_CALENDAR_PRIVATE_DATA (widget);
- x = (gint) (event->x);
- y = (gint) (event->y);
-
if (event->window == private_data->main_win)
planner_calendar_main_button (widget, event);
@@ -2396,10 +2372,8 @@ static gboolean
planner_calendar_enter_notify (GtkWidget *widget,
GdkEventCrossing *event)
{
- PlannerCalendar *calendar;
PlannerCalendarPrivateData *private_data;
- calendar = PLANNER_CALENDAR (widget);
private_data = PLANNER_CALENDAR_PRIVATE_DATA (widget);
if (event->window == private_data->arrow_win[ARROW_MONTH_LEFT])
@@ -2561,11 +2535,9 @@ planner_calendar_thaw (PlannerCalendar *calendar)
static void
planner_calendar_set_background (GtkWidget *widget)
{
- PlannerCalendar *calendar;
PlannerCalendarPrivateData *private_data;
gint i;
- calendar = PLANNER_CALENDAR (widget);
private_data = PLANNER_CALENDAR_PRIVATE_DATA (widget);
if (GTK_WIDGET_REALIZED (widget))
diff --git a/src/planner-cell-renderer-list.c b/src/planner-cell-renderer-list.c
index 8fe5597..bad6bb7 100644
--- a/src/planner-cell-renderer-list.c
+++ b/src/planner-cell-renderer-list.c
@@ -242,15 +242,10 @@ mcrl_select_index (PlannerCellRendererList *cell,
gint index)
{
GtkTreeView *tree_view;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
GtkTreePath *path;
tree_view = GTK_TREE_VIEW (cell->tree_view);
- model = gtk_tree_view_get_model (tree_view);
- selection = gtk_tree_view_get_selection (tree_view);
-
path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, index);
diff --git a/src/planner-gantt-background.c b/src/planner-gantt-background.c
index e5e84f6..3ec9a0a 100644
--- a/src/planner-gantt-background.c
+++ b/src/planner-gantt-background.c
@@ -253,11 +253,7 @@ gantt_background_get_bounds (PlannerGanttBackground *background,
gdouble *px2,
gdouble *py2)
{
- GnomeCanvasItem *item;
-
- item = GNOME_CANVAS_ITEM (background);
-
- /* Get the items bbox in canvas pixel coordinates. */
+ /* FIXME: Get the items bbox in canvas pixel coordinates. */
*px1 = -G_MAXINT;
*py1 = -G_MAXINT;
diff --git a/src/planner-gantt-chart.c b/src/planner-gantt-chart.c
index 8ded4b2..6ef89eb 100644
--- a/src/planner-gantt-chart.c
+++ b/src/planner-gantt-chart.c
@@ -251,14 +251,12 @@ gantt_chart_class_init (PlannerGanttChartClass *class)
GObjectClass *o_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
parent_class = g_type_class_peek_parent (class);
o_class = (GObjectClass *) class;
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- container_class = (GtkContainerClass *) class;
o_class->set_property = gantt_chart_set_property;
o_class->get_property = gantt_chart_get_property;
@@ -555,10 +553,6 @@ gantt_chart_realize (GtkWidget *widget)
static void
gantt_chart_unrealize (GtkWidget *widget)
{
- PlannerGanttChart *chart;
-
- chart = PLANNER_GANTT_CHART (widget);
-
if (GTK_WIDGET_CLASS (parent_class)->unrealize) {
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
@@ -587,9 +581,6 @@ gantt_chart_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
PlannerGanttChart *chart;
- gboolean height_changed;
-
- height_changed = widget->allocation.height != allocation->height;
GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
@@ -692,7 +683,6 @@ gantt_chart_row_inserted (GtkTreeModel *model,
PlannerGanttChart *chart;
gboolean free_path = FALSE;
MrpTask *task;
- TreeNode *node;
chart = data;
@@ -708,7 +698,7 @@ gantt_chart_row_inserted (GtkTreeModel *model,
task = planner_gantt_model_get_task (PLANNER_GANTT_MODEL (model), iter);
- node = gantt_chart_insert_task (chart, path, task);
+ gantt_chart_insert_task (chart, path, task);
gantt_chart_reflow (chart, TRUE);
diff --git a/src/planner-gantt-header.c b/src/planner-gantt-header.c
index 5afcf94..b59c887 100644
--- a/src/planner-gantt-header.c
+++ b/src/planner-gantt-header.c
@@ -141,14 +141,12 @@ gantt_header_class_init (PlannerGanttHeaderClass *class)
GObjectClass *o_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
parent_class = g_type_class_peek_parent (class);
o_class = (GObjectClass *) class;
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- container_class = (GtkContainerClass *) class;
/* GObject methods. */
o_class->set_property = gantt_header_set_property;
@@ -363,10 +361,6 @@ gantt_header_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- PlannerGanttHeader *header;
-
- header = PLANNER_GANTT_HEADER (object);
-
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -418,7 +412,6 @@ gantt_header_realize (GtkWidget *widget)
{
PlannerGanttHeader *header;
GdkWindowAttr attributes;
- GdkGCValues values;
gint attributes_mask;
header = PLANNER_GANTT_HEADER (widget);
@@ -461,11 +454,6 @@ gantt_header_realize (GtkWidget *widget)
attributes_mask);
gdk_window_set_user_data (header->priv->bin_window, widget);
- values.foreground = (widget->style->white.pixel == 0 ?
- widget->style->black : widget->style->white);
- values.function = GDK_XOR;
- values.subwindow_mode = GDK_INCLUDE_INFERIORS;
-
widget->style = gtk_style_attach (widget->style, widget->window);
gdk_window_set_background (widget->window,
&widget->style->base[widget->state]);
diff --git a/src/planner-gantt-model.c b/src/planner-gantt-model.c
index 8189b1c..1bffaee 100644
--- a/src/planner-gantt-model.c
+++ b/src/planner-gantt-model.c
@@ -792,7 +792,6 @@ gantt_model_get_value (GtkTreeModel *tree_model,
MrpProject *project;
mrptime t1, t2;
gint duration;
- MrpTaskType type;
const gchar *name;
const gchar *cached_str;
@@ -869,8 +868,6 @@ gantt_model_get_value (GtkTreeModel *tree_model,
break;
case COL_EDITABLE:
- type = mrp_task_get_task_type (task);
-
g_value_init (value, G_TYPE_BOOLEAN);
if (g_node_n_children (node) > 0) {
g_value_set_boolean (value, FALSE);
diff --git a/src/planner-gantt-print.c b/src/planner-gantt-print.c
index fe117a9..39d5668 100644
--- a/src/planner-gantt-print.c
+++ b/src/planner-gantt-print.c
@@ -900,7 +900,6 @@ planner_gantt_print_data_new (PlannerView *view,
gdouble max_name_width = 0.0;
gdouble ext;
GList *relations;
- gdouble x1;
gdouble y1, y2;
mrptime t1, t2, t0;
mrptime current_time;
@@ -1061,8 +1060,6 @@ planner_gantt_print_data_new (PlannerView *view,
tasks_on_this_page = data->tasks_per_page_without_header;
}
- x1 = data->tree_x2;
-
/* Loop through the tasks on this row of pages. */
for (i = 0; i < tasks_on_this_page; i++) {
ptask = l->data;
diff --git a/src/planner-gantt-row.c b/src/planner-gantt-row.c
index badce33..82dfeab 100644
--- a/src/planner-gantt-row.c
+++ b/src/planner-gantt-row.c
@@ -507,15 +507,12 @@ static gboolean
recalc_bounds (PlannerGanttRow *row)
{
PlannerGanttRowPriv *priv;
- GnomeCanvasItem *item;
gint width, height;
mrptime t;
MrpTaskType type;
gdouble old_x, old_x_start, old_width;
gboolean changed;
- item = GNOME_CANVAS_ITEM (row);
-
priv = row->priv;
old_x = priv->x;
@@ -600,13 +597,8 @@ gantt_row_set_property (GObject *object,
case PROP_HEIGHT:
tmp_dbl = g_value_get_double (value);
if (tmp_dbl != priv->height) {
- gboolean nonstd_days;
- PlannerGanttChart *chart;
double htask;
- chart = g_object_get_data (G_OBJECT (item->canvas), "chart");
- nonstd_days = planner_gantt_chart_get_nonstandard_days (chart);
-
priv->height = tmp_dbl;
htask = priv->height / 2.0;
@@ -1198,8 +1190,8 @@ gantt_row_draw (GnomeCanvasItem *item,
#ifdef WITH_SIMPLE_PRIORITY_SCHEDULING
gboolean is_dominant;
#endif
- gint rx1, ry1;
- gint rx2, ry2;
+ gint rx1;
+ gint rx2;
gint cx1, cy1, cx2, cy2;
GList *unit_ivals, *cal_ivals, *cur_unit;
@@ -1319,9 +1311,6 @@ gantt_row_draw (GnomeCanvasItem *item,
rx1 = MAX (cx1, 0);
rx2 = MIN (cx2, width);
- ry1 = MAX (cy1, 0);
- ry2 = MIN (cy2, height);
-
summary = (mrp_task_get_n_children (priv->task) > 0);
complete_width = 0;
complete_x2 = 0;
diff --git a/src/planner-group-dialog.c b/src/planner-group-dialog.c
index bf123eb..58ead59 100644
--- a/src/planner-group-dialog.c
+++ b/src/planner-group-dialog.c
@@ -753,12 +753,10 @@ group_dialog_add_column (GtkWidget *dialog,
{
DialogData *data;
GtkCellRenderer *cell = NULL;
- GtkTreeModel *model;
GtkTreeViewColumn *column_data;
gchar *tree_type = NULL;
data = g_object_get_data (G_OBJECT (dialog), "data");
- model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (gtk_tree_view_get_model (data->tree_view)));
switch (type) {
case TREE_VIEW_TEXT:
diff --git a/src/planner-predecessor-model.c b/src/planner-predecessor-model.c
index 698a903..0a24e58 100644
--- a/src/planner-predecessor-model.c
+++ b/src/planner-predecessor-model.c
@@ -293,10 +293,6 @@ mpm_predecessor_changed_cb (MrpRelation *relation, GParamSpec *pspec,
static void
mpm_connect_to_relation (MrpRelation *relation, PlannerPredecessorModel *model)
{
- MrpTask *predecessor;
-
- predecessor = mrp_relation_get_predecessor (relation);
-
g_signal_connect_object (relation, "notify::predecessor",
G_CALLBACK (mpm_predecessor_changed_cb),
model,
diff --git a/src/planner-resource-dialog.c b/src/planner-resource-dialog.c
index 922d856..f7f8158 100644
--- a/src/planner-resource-dialog.c
+++ b/src/planner-resource-dialog.c
@@ -1558,12 +1558,9 @@ resource_dialog_create_calendar_model (DialogData *data)
{
MrpProject *project;
GtkTreeStore *store;
- MrpCalendar *root;
project = planner_window_get_project (data->main_window);
- root = mrp_project_get_root_calendar (project);
-
store = gtk_tree_store_new (NUM_COLS,
G_TYPE_OBJECT,
G_TYPE_STRING,
@@ -1582,12 +1579,10 @@ static void
resource_dialog_setup_calendar_tree_view (DialogData *data)
{
GtkTreeView *tree_view;
- MrpProject *project;
GtkTreeModel *model;
GtkCellRenderer *cell;
GtkTreeViewColumn *col;
- project = planner_window_get_project (data->main_window);
tree_view = GTK_TREE_VIEW (data->calendar_tree_view);
model = resource_dialog_create_calendar_model (data);
diff --git a/src/planner-resource-view.c b/src/planner-resource-view.c
index c344db5..ddaa1f2 100644
--- a/src/planner-resource-view.c
+++ b/src/planner-resource-view.c
@@ -892,13 +892,10 @@ resource_view_insert_resources_cb (GtkAction *action,
{
PlannerView *view;
PlannerResourceViewPriv *priv;
- MrpProject *project;
view = PLANNER_VIEW (data);
priv = PLANNER_RESOURCE_VIEW (view)->priv;
- project = planner_window_get_project (view->main_window);
-
/* We only want one of these dialogs at a time. */
if (priv->resource_input_dialog) {
gtk_window_present (GTK_WINDOW (priv->resource_input_dialog));
@@ -1001,14 +998,9 @@ resource_view_remove_resource_cb (GtkAction *action,
gpointer data)
{
PlannerView *view;
- PlannerResourceViewPriv *priv;
- MrpProject *project;
GList *list, *node;
view = PLANNER_VIEW (data);
- priv = PLANNER_RESOURCE_VIEW (view)->priv;
-
- project = planner_window_get_project (view->main_window);
list = resource_view_selection_get_list (view);
@@ -1026,13 +1018,11 @@ resource_view_edit_resource_cb (GtkAction *action,
gpointer data)
{
PlannerView *view;
- PlannerResourceViewPriv *priv;
MrpResource *resource;
GtkWidget *dialog;
GList *list;
view = PLANNER_VIEW (data);
- priv = PLANNER_RESOURCE_VIEW (view)->priv;
list = resource_view_selection_get_list (view);
diff --git a/src/planner-task-cmd.c b/src/planner-task-cmd.c
index cdaa7da..8c5ef20 100644
--- a/src/planner-task-cmd.c
+++ b/src/planner-task-cmd.c
@@ -40,16 +40,15 @@ task_cmd_link_do (PlannerCmd *cmd_base)
{
TaskCmdLink *cmd;
GError *error = NULL;
- MrpRelation *relation;
gboolean retval;
cmd = (TaskCmdLink *) cmd_base;
- relation = mrp_task_add_predecessor (cmd->after,
- cmd->before,
- cmd->relationship,
- cmd->lag,
- &error);
+ mrp_task_add_predecessor (cmd->after,
+ cmd->before,
+ cmd->relationship,
+ cmd->lag,
+ &error);
if (!error) {
retval = TRUE;
} else {
diff --git a/src/planner-task-dialog.c b/src/planner-task-dialog.c
index 67b7d2c..ca078dc 100644
--- a/src/planner-task-dialog.c
+++ b/src/planner-task-dialog.c
@@ -2078,7 +2078,6 @@ task_dialog_pred_cell_edited (GtkCellRendererText *cell,
GtkTreePath *path;
GtkTreeIter iter;
GtkTreeModel *model;
- MrpProject *project;
MrpRelation *relation;
MrpTask *task_main;
MrpTask *task_pred;
@@ -2099,8 +2098,6 @@ task_dialog_pred_cell_edited (GtkCellRendererText *cell,
&iter));
task_main = data->task;
- project = mrp_object_get_project (MRP_OBJECT (task_main));
-
relation = mrp_task_get_relation (task_main, task_pred);
lag = mrp_relation_get_lag (relation) / (60*60);
type = mrp_relation_get_relation_type (relation);
diff --git a/src/planner-task-tree.c b/src/planner-task-tree.c
index 2a7a5af..4d1cc31 100644
--- a/src/planner-task-tree.c
+++ b/src/planner-task-tree.c
@@ -426,7 +426,6 @@ task_cmd_save_children (TaskCmdRemove *cmd)
static void
task_cmd_restore_children (TaskCmdRemove *cmd)
{
- PlannerGanttModel *model;
gint position, depth;
GtkTreePath *path;
MrpTask *parent;
@@ -438,8 +437,6 @@ task_cmd_restore_children (TaskCmdRemove *cmd)
cmd_child = l->data;
path = gtk_tree_path_copy (cmd_child->path);
- model = PLANNER_GANTT_MODEL (gtk_tree_view_get_model
- (GTK_TREE_VIEW (cmd_child->tree)));
depth = gtk_tree_path_get_depth (path);
position = gtk_tree_path_get_indices (path)[depth - 1];
@@ -489,17 +486,14 @@ task_cmd_remove_do (PlannerCmd *cmd_base)
static void
task_cmd_remove_undo (PlannerCmd *cmd_base)
{
- PlannerGanttModel *model;
TaskCmdRemove *cmd;
gint position, depth;
GtkTreePath *path;
MrpTask *parent;
- MrpTask *child_parent;
cmd = (TaskCmdRemove*) cmd_base;
path = gtk_tree_path_copy (cmd->path);
- model = PLANNER_GANTT_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (cmd->tree)));
depth = gtk_tree_path_get_depth (path);
position = gtk_tree_path_get_indices (path)[depth - 1];
@@ -518,8 +512,6 @@ task_cmd_remove_undo (PlannerCmd *cmd_base)
position,
cmd->task);
- child_parent = planner_gantt_model_get_indent_task_target (model, cmd->task);
-
if (cmd->children != NULL) {
task_cmd_restore_children (cmd);
}
@@ -1354,11 +1346,8 @@ task_tree_wbs_data_func (GtkTreeViewColumn *tree_column,
GtkTreeIter *iter,
gpointer data)
{
- PlannerTaskTree *tree;
gchar *str;
- tree = PLANNER_TASK_TREE (data);
-
gtk_tree_model_get (tree_model,
iter,
COL_WBS, &str,
@@ -1570,7 +1559,6 @@ task_tree_assigned_to_data_func (GtkTreeViewColumn *tree_column,
gchar *assigned_to;
GList *resources;
GList *l;
- MrpAssignment *assignment;
MrpResource *resource;
MrpTask *task;
const gchar *name;
@@ -1585,8 +1573,6 @@ task_tree_assigned_to_data_func (GtkTreeViewColumn *tree_column,
for (l = resources; l; l = l->next) {
resource = l->data;
- assignment = mrp_task_get_assignment (task, resource);
-
/* Try short name first. */
name = mrp_resource_get_short_name (resource);
@@ -2047,7 +2033,6 @@ task_view_custom_property_set_value (MrpProperty *property,
gchar *new_text,
GtkCellRendererText *cell)
{
- PlannerCellRendererDate *date;
GValue value = { 0 };
MrpPropertyType type;
gfloat fvalue;
@@ -2084,9 +2069,10 @@ task_view_custom_property_set_value (MrpProperty *property,
case MRP_PROPERTY_TYPE_DATE:
- date = PLANNER_CELL_RENDERER_DATE (cell);
/* FIXME: Currently custom properties can't be dates. Why? */
- /* mrp_object_set (MRP_OBJECT (task),
+ /*
+ * date = PLANNER_CELL_RENDERER_DATE (cell);
+ * mrp_object_set (MRP_OBJECT (task),
mrp_property_get_name (property),
&(date->time),
NULL);*/
@@ -3073,7 +3059,6 @@ planner_task_tree_indent_task (PlannerTaskTree *tree)
MrpTask *task;
MrpTask *new_parent;
MrpTask *first_task_parent;
- MrpProject *project;
GList *list, *l;
GList *indent_tasks = NULL;
GtkTreePath *path;
@@ -3082,7 +3067,6 @@ planner_task_tree_indent_task (PlannerTaskTree *tree)
gboolean many;
priv = tree->priv;
- project = priv->project;
model = PLANNER_GANTT_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (tree)));
@@ -3177,7 +3161,6 @@ planner_task_tree_unindent_task (PlannerTaskTree *tree)
MrpTask *task;
MrpTask *new_parent;
MrpTask *first_task_parent;
- MrpProject *project;
GList *list, *l;
GList *unindent_tasks = NULL;
GtkTreePath *path;
@@ -3185,7 +3168,6 @@ planner_task_tree_unindent_task (PlannerTaskTree *tree)
gboolean many;
priv = tree->priv;
- project = priv->project;
model = PLANNER_GANTT_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (tree)));
@@ -3278,7 +3260,6 @@ planner_task_tree_move_task_up (PlannerTaskTree *tree)
GtkTreeSelection *selection;
PlannerGanttModel *model;
GtkTreePath *path;
- MrpProject *project;
MrpTask *task, *parent, *sibling;
GList *list, *l, *m;
guint position;
@@ -3288,7 +3269,6 @@ planner_task_tree_move_task_up (PlannerTaskTree *tree)
gboolean many;
priv = tree->priv;
- project = priv->project;
list = planner_task_tree_get_selected_tasks (tree);
if (list == NULL) {
diff --git a/src/planner-usage-chart.c b/src/planner-usage-chart.c
index 96548af..9e00313 100644
--- a/src/planner-usage-chart.c
+++ b/src/planner-usage-chart.c
@@ -231,14 +231,12 @@ usage_chart_class_init (PlannerUsageChartClass * class)
GObjectClass *o_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
parent_class = g_type_class_peek_parent (class);
o_class = (GObjectClass *) class;
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- container_class = (GtkContainerClass *) class;
o_class->set_property = usage_chart_set_property;
o_class->get_property = usage_chart_get_property;
@@ -661,10 +659,6 @@ usage_chart_realize (GtkWidget *widget)
static void
usage_chart_unrealize (GtkWidget *widget)
{
- PlannerUsageChart *chart;
-
- chart = PLANNER_USAGE_CHART (widget);
-
if (GTK_WIDGET_CLASS (parent_class)->unrealize) {
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
@@ -694,9 +688,6 @@ static void
usage_chart_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
PlannerUsageChart *chart;
- gboolean height_changed;
-
- height_changed = widget->allocation.height != allocation->height;
GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
@@ -1074,7 +1065,6 @@ usage_chart_build_tree (PlannerUsageChart * chart)
PlannerUsageChartPriv *priv;
GtkTreeIter iter;
GtkTreePath *path;
- TreeNode *node;
GtkTreeIter child;
priv = chart->priv;
@@ -1095,7 +1085,7 @@ usage_chart_build_tree (PlannerUsageChart * chart)
&iter);
path = gtk_tree_model_get_path (priv->model, &iter);
- node = usage_chart_insert_resource (chart, path, res);
+ usage_chart_insert_resource (chart, path, res);
gtk_tree_path_free (path);
if (gtk_tree_model_iter_children (priv->model, &child, &iter)) {
do {
@@ -1105,9 +1095,9 @@ usage_chart_build_tree (PlannerUsageChart * chart)
&child);
path = gtk_tree_model_get_path (priv->model,
&child);
- node = usage_chart_insert_assignment (chart,
- path,
- assign);
+ usage_chart_insert_assignment (chart,
+ path,
+ assign);
gtk_tree_path_free (path);
} while (gtk_tree_model_iter_next
(priv->model, &child));
diff --git a/src/planner-usage-row.c b/src/planner-usage-row.c
index f5a1043..de589fd 100644
--- a/src/planner-usage-row.c
+++ b/src/planner-usage-row.c
@@ -440,14 +440,11 @@ static gboolean
recalc_bounds (PlannerUsageRow *row)
{
PlannerUsageRowPriv *priv;
- GnomeCanvasItem *item;
gint width;
gdouble x_debut, x_fin, x_debut_real;
gdouble old_x, old_x_start, old_width;
gboolean changed;
- item = GNOME_CANVAS_ITEM (row);
-
priv = row->priv;
old_x = priv->x;
@@ -1197,8 +1194,8 @@ usage_row_draw_assignment (PlannerUsageRow *row,
gboolean summary;
gint percent_complete;
gint complete_x2, complete_width;
- gint rx1, ry1;
- gint rx2, ry2;
+ gint rx1;
+ gint rx2;
gint cx1, cy1, cx2, cy2;
gdouble ass_x, ass_xend, ass_x_start;
@@ -1237,9 +1234,6 @@ usage_row_draw_assignment (PlannerUsageRow *row,
rx1 = MAX (cx1, 0);
rx2 = MIN (cx2, width);
- ry1 = MAX (cy1, 0);
- ry2 = MIN (cy2, height);
-
summary = (mrp_task_get_n_children (task) > 0);
complete_width = 0;
complete_x2 = 0;
@@ -1571,11 +1565,9 @@ usage_row_event (GnomeCanvasItem *item, GdkEvent *event)
PlannerUsageTree *tree;
GtkTreeView *tree_view;
GtkTreeIter iter;
- GtkWidget *canvas_widget;
row = PLANNER_USAGE_ROW (item);
priv = row->priv;
- canvas_widget = GTK_WIDGET (item->canvas);
chart = g_object_get_data (G_OBJECT (item->canvas), "chart");
tree = planner_usage_chart_get_view (chart);
diff --git a/src/planner-usage-view.c b/src/planner-usage-view.c
index c170faa..1a202d6 100644
--- a/src/planner-usage-view.c
+++ b/src/planner-usage-view.c
@@ -302,9 +302,11 @@ usage_view_get_widget (PlannerView *view)
static void
usage_view_print_init (PlannerView *view, PlannerPrintJob *job)
{
- PlannerUsageViewPriv *priv;
+ /* FIXME: initialize usage view printing
+ PlannerUsageViewPriv *priv;
- priv = PLANNER_USAGE_VIEW (view)->priv;
+ priv = PLANNER_USAGE_VIEW (view)->priv;
+ */
/*priv->print_data = planner_usage_print_data_new (view, job);*/
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]