Commit da9de8ae authored by Richard Hult's avatar Richard Hult Committed by Richard Hult

Reorganize views and make them builtin. Simplify a lot.

2005-04-16  Richard Hult  <richard@imendio.com>

	* src/Makefile.am: Reorganize views and make them
	builtin. Simplify a lot.

	* src/planner-gantt-view.[ch]:
	* src/planner-resource-view.[ch]:
	* src/planner-ttable-view.[ch]:
	* src/planner-task-view.[ch]: Adapt to the new view interface.

	* src/planner-ttable-*: s/ttable/usage/.

	* src/planner-view-loader.[ch]:
	* src/planner-view.[ch]: Remove module loading.
	* src/planner-window.c: (window_populate): Create the builtin
	views.

2005-04-16  Richard Hult  <richard@imendio.com>

	* src/planner-gantt-row.c: Make the shadow and highlight colors to
	be a bit less pronounced, use separate colors for the critical
	path shadow and highlight.

	* src/planner-ttable-row.c: As above + use separate shadow and
	highlight colors for free/overuse/underuse. Also remove lots of
	code that's been commented out.

2005-04-16  Richard Hult  <richard@imendio.com>

	* src/planner-html-plugin.c (html_plugin_show_url): Patch from
	Francisco to use gnome_url_show.
parent d4f268d3
2005-04-16 Richard Hult <richard@imendio.com>
* src/Makefile.am: Reorganize views and make them
builtin. Simplify a lot.
* src/planner-gantt-view.[ch]:
* src/planner-resource-view.[ch]:
* src/planner-ttable-view.[ch]:
* src/planner-task-view.[ch]: Adapt to the new view interface.
* src/planner-ttable-*: s/ttable/usage/.
* src/planner-view-loader.[ch]:
* src/planner-view.[ch]: Remove module loading.
* src/planner-window.c: (window_populate): Create the builtin
views.
2005-04-16 Richard Hult <richard@imendio.com>
* src/planner-gantt-row.c: Make the shadow and highlight colors to
be a bit less pronounced, use separate colors for the critical
path shadow and highlight.
* src/planner-ttable-row.c: As above + use separate shadow and
highlight colors for free/overuse/underuse. Also remove lots of
code that's been commented out.
2005-04-16 Richard Hult <richard@imendio.com>
* src/planner-html-plugin.c (html_plugin_show_url): Patch from
Francisco to use gnome_url_show.
2005-04-15 Richard Hult <richard@imendio.com>
* data/stylesheets/html1_css.xsl:
......
......@@ -10,7 +10,6 @@ INCLUDES = \
-DIMAGEDIR=\""$(datadir)/pixmaps/planner"\" \
-DGLADEDIR=\""$(datadir)/planner/glade"\" \
-DVIEWDIR=\""$(libdir)/planner/views"\" \
-DPLUGINDIR=\""$(libdir)/planner/plugins"\" \
-DSTYLESHEETDIR=\""$(datadir)/planner/stylesheets"\" \
-DDTDDIR=\""$(datadir)/planner/dtd"\"
......@@ -60,6 +59,7 @@ planner_SOURCES = \
planner-list-model.c \
planner-list-model.h \
planner-main.c \
planner-marshal-main.c \
planner-phase-dialog.c \
planner-phase-dialog.h \
planner-plugin.c \
......@@ -104,34 +104,26 @@ planner_SOURCES = \
planner-task-input-dialog.h \
planner-view.c \
planner-view.h \
planner-view-loader.c \
planner-view-loader.h \
planner-window.c \
planner-window.h \
planner-working-time-dialog.c \
planner-working-time-dialog.h
planner-working-time-dialog.h \
$(gantt_task_source) \
$(task_source) \
$(resource_source) \
$(usage_source)
planner_LDFLAGS = -export-dynamic
planner_LDADD = \
$(top_builddir)/libplanner/libplanner-1.la \
$(top_builddir)/libegg/recent-files/libeggrecent.la \
libutil.la
$(PLANNER_LIBS)
noinst_LTLIBRARIES = libutil.la
libutil_la_SOURCES = planner-marshal-main.c
#
# Views
#
viewdir = $(libdir)/planner/views
view_LTLIBRARIES = libgantt-view.la libtask-view.la libresource-view.la libtimetable-view.la
libgantt_view_la_SOURCES = \
gantt_task_source = \
planner-gantt-background.c \
planner-gantt-background.h \
planner-gantt-header.c \
planner-gantt-header.h \
planner-gantt-model.c \
planner-gantt-model.h \
planner-task-tree.c \
planner-task-tree.h \
planner-task-popup.c \
planner-task-popup.h \
planner-relation-arrow.c \
planner-relation-arrow.h \
planner-gantt-chart.c \
......@@ -140,59 +132,30 @@ libgantt_view_la_SOURCES = \
planner-gantt-print.h \
planner-gantt-row.c \
planner-gantt-row.h \
planner-gantt-view.c
planner-gantt-view.c \
planner-gantt-view.h \
planner-task-view.c \
planner-task-view.h
libgantt_view_la_LDFLAGS = -avoid-version -module
libgantt_view_la_LIBADD = libgantt-task.la
resource_source = \
planner-resource-view.c \
planner-resource-view.h
libtask_view_la_SOURCES = \
planner-task-view.c
libtask_view_la_LDFLAGS = -avoid-version -module
libtask_view_la_LIBADD = libgantt-task.la
libresource_view_la_SOURCES = \
planner-resource-view.c
libresource_view_la_LDFLAGS = -avoid-version -module
libresource_view_la_LIBADD = libutil.la
libtimetable_view_la_SOURCES = \
usage_source = \
planner-ttable-view.c \
planner-ttable-chart.c \
planner-ttable-chart.h \
planner-ttable-model.c \
planner-ttable-model.h \
planner-ttable-print.c \
planner-ttable-print.h \
planner-ttable-row.c \
planner-ttable-row.h \
planner-ttable-tree.c \
planner-ttable-tree.h
libtimetable_view_la_LDFLAGS = -avoid-version -module
libtimetable_view_la_LIBADD = libgantt-task.la
# Small shared lib for the task, gantt, and resource usage views
gantt_taskdir = $(libdir)/planner
gantt_task_LTLIBRARIES = libgantt-task.la
libgantt_task_la_LIBADD = libutil.la
libgantt_task_la_LDFLAGS = -avoid-version
libgantt_task_la_SOURCES = \
planner-gantt-background.c \
planner-gantt-background.h \
planner-gantt-header.c \
planner-gantt-header.h \
planner-gantt-model.c \
planner-gantt-model.h \
planner-task-tree.c \
planner-task-tree.h \
planner-task-popup.c \
planner-task-popup.h
planner_LDADD = \
$(top_builddir)/libplanner/libplanner-1.la \
$(top_builddir)/libegg/recent-files/libeggrecent.la \
$(PLANNER_LIBS)
#
......
......@@ -94,9 +94,12 @@ struct _PlannerGanttRowPriv {
/* FIXME: Don't need those per gantt row. */
GdkColor color_normal;
GdkColor color_normal_light;
GdkColor color_normal_dark;
GdkColor color_critical;
GdkColor color_frame_light;
GdkColor color_frame_shadow;
GdkColor color_critical_light;
GdkColor color_critical_dark;
/* FIXME: Don't need this per gantt row? */
PangoLayout *layout;
......@@ -131,7 +134,8 @@ struct _PlannerGanttRowPriv {
/* Cached positions of each assigned resource. */
GArray *resource_widths;
/* FIXME: Don't need this per row. */
GtkItemFactory *popup_factory;
};
......@@ -806,15 +810,22 @@ gantt_row_realize (GnomeCanvasItem *item)
gnome_canvas_get_color (item->canvas,
"LightSkyBlue3",
&priv->color_normal);
gnome_canvas_get_color (item->canvas,
"#9ac7e0",
&priv->color_normal_light);
gnome_canvas_get_color (item->canvas,
"#7da1b5",
&priv->color_normal_dark);
gnome_canvas_get_color (item->canvas,
"indian red",
&priv->color_critical);
gnome_canvas_get_color (item->canvas,
"gray75",
&priv->color_frame_light);
"#de6464",
&priv->color_critical_light);
gnome_canvas_get_color (item->canvas,
"gray40",
&priv->color_frame_shadow);
"#ba5454",
&priv->color_critical_dark);
}
static void
......@@ -983,7 +994,12 @@ gantt_row_draw (GnomeCanvasItem *item,
gdk_draw_line (drawable, priv->frame_gc, rx1, cy1, rx2, cy1);
gdk_draw_line (drawable, priv->frame_gc, rx1, cy2, rx2, cy2);
gdk_gc_set_foreground (priv->fill_gc, &priv->color_frame_light);
if (!highlight_critical || !critical) {
gdk_gc_set_foreground (priv->fill_gc, &priv->color_normal_light);
} else {
gdk_gc_set_foreground (priv->fill_gc, &priv->color_critical_light);
}
gdk_draw_line (drawable,
priv->fill_gc,
rx1 + 0,
......@@ -1000,7 +1016,12 @@ gantt_row_draw (GnomeCanvasItem *item,
cy2 - 1);
}
gdk_gc_set_foreground (priv->fill_gc, &priv->color_frame_shadow);
if (!highlight_critical || !critical) {
gdk_gc_set_foreground (priv->fill_gc, &priv->color_normal_dark);
} else {
gdk_gc_set_foreground (priv->fill_gc, &priv->color_critical_dark);
}
gdk_draw_line (drawable,
priv->fill_gc,
rx1 + 0,
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2005 Imendio AB
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __PLANNER_GANTT_VIEW_H__
#define __PLANNER_GANTT_VIEW_H__
#include <gtk/gtk.h>
#include "planner-view.h"
#define PLANNER_TYPE_GANTT_VIEW (planner_gantt_view_get_type ())
#define PLANNER_GANTT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLANNER_TYPE_GANTT_VIEW, PlannerGanttView))
#define PLANNER_GANTT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PLANNER_TYPE_GANTT_VIEW, PlannerGanttViewClass))
#define PLANNER_IS_GANTT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLANNER_TYPE_GANTT_VIEW))
#define PLANNER_IS_GANTT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLANNER_TYPE_GANTT_VIEW))
#define PLANNER_GANTT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLANNER_TYPE_GANTT_VIEW, PlannerGanttViewClass))
typedef struct _PlannerGanttView PlannerGanttView;
typedef struct _PlannerGanttViewClass PlannerGanttViewClass;
typedef struct _PlannerGanttViewPriv PlannerGanttViewPriv;
struct _PlannerGanttView {
PlannerView parent;
PlannerGanttViewPriv *priv;
};
struct _PlannerGanttViewClass {
PlannerViewClass parent_class;
};
GType planner_gantt_view_get_type (void) G_GNUC_CONST;
PlannerView *planner_gantt_view_new (void);
#endif /* __PLANNER_GANTT_VIEW_H__ */
......@@ -23,6 +23,7 @@
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libgnome/gnome-url.h>
#include "planner-window.h"
#include "planner-plugin.h"
......@@ -49,38 +50,18 @@ static GtkActionEntry action_entries[] = {
};
/* Really ugly hack here... :) */
#include <gconf/gconf-client.h>
static void
html_plugin_show_url (PlannerPlugin *plugin, const char *url)
html_plugin_show_url (PlannerPlugin *plugin, const char *path)
{
GConfClient *gconf_client;
gchar *cmd, *tmp;
gchar *cmdline;
gconf_client = gconf_client_get_default ();
cmd = gconf_client_get_string (gconf_client,
"/desktop/gnome/url-handlers/http/command",
NULL);
g_object_unref (gconf_client);
if (!cmd) {
return;
}
gchar *url;
tmp = strchr (cmd, ' ');
if (tmp) {
tmp[0] = '\0';
}
url = g_filename_to_uri (path, NULL, NULL);
cmdline = g_strconcat (cmd, " ", url, NULL);
gdk_spawn_command_line_on_screen (gtk_widget_get_screen (GTK_WIDGET (plugin->priv->main_window)),
cmdline,
NULL);
if (!gnome_url_show (url, NULL)) {
/*g_warning ("Unable to follow link %s\n", link);*/
}
g_free (cmdline);
g_free (cmd);
g_free (url);
}
static void
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2005 Imendio AB
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __PLANNER_RESOURCE_VIEW_H__
#define __PLANNER_RESOURCE_VIEW_H__
#include <gtk/gtk.h>
#include "planner-view.h"
#define PLANNER_TYPE_RESOURCE_VIEW (planner_resource_view_get_type ())
#define PLANNER_RESOURCE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLANNER_TYPE_RESOURCE_VIEW, PlannerResourceView))
#define PLANNER_RESOURCE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PLANNER_TYPE_RESOURCE_VIEW, PlannerResourceViewClass))
#define PLANNER_IS_RESOURCE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLANNER_TYPE_RESOURCE_VIEW))
#define PLANNER_IS_RESOURCE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLANNER_TYPE_RESOURCE_VIEW))
#define PLANNER_RESOURCE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLANNER_TYPE_RESOURCE_VIEW, PlannerResourceViewClass))
typedef struct _PlannerResourceView PlannerResourceView;
typedef struct _PlannerResourceViewClass PlannerResourceViewClass;
typedef struct _PlannerResourceViewPriv PlannerResourceViewPriv;
struct _PlannerResourceView {
PlannerView parent;
PlannerResourceViewPriv *priv;
};
struct _PlannerResourceViewClass {
PlannerViewClass parent_class;
};
GType planner_resource_view_get_type (void) G_GNUC_CONST;
PlannerView *planner_resource_view_new (void);
#endif /* __PLANNER_RESOURCE_VIEW_H__ */
......@@ -24,24 +24,10 @@
#include <config.h>
#include <string.h>
#include <time.h>
#include <glib.h>
#include <gmodule.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkiconfactory.h>
#include <gtk/gtkitemfactory.h>
#include <gtk/gtkstock.h>
#include <gtk/gtkhpaned.h>
#include <gtk/gtkframe.h>
#include <gtk/gtktreeview.h>
#include <gtk/gtkcellrenderertext.h>
#include <gtk/gtktreeselection.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkmessagedialog.h>
#include <gtk/gtktoggleaction.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <libplanner/mrp-task.h>
#include "planner-view.h"
#include "planner-task-view.h"
#include "planner-conf.h"
#include "planner-cell-renderer-date.h"
#include "planner-task-dialog.h"
......@@ -52,7 +38,7 @@
#include "planner-column-dialog.h"
struct _PlannerViewPriv {
struct _PlannerTaskViewPriv {
GtkWidget *tree;
GtkWidget *frame;
PlannerTablePrintSheet *print_sheet;
......@@ -61,15 +47,21 @@ struct _PlannerViewPriv {
guint merged_id;
};
void activate (PlannerView *view);
void deactivate (PlannerView *view);
void init (PlannerView *view,
PlannerWindow *main_window);
const gchar *get_label (PlannerView *view);
const gchar *get_menu_label (PlannerView *view);
const gchar *get_icon (PlannerView *view);
const gchar *get_name (PlannerView *view);
GtkWidget *get_widget (PlannerView *view);
static void task_view_activate (PlannerView *view);
static void task_view_deactivate (PlannerView *view);
static void task_view_setup (PlannerView *view,
PlannerWindow *main_window);
static const gchar *task_view_get_label (PlannerView *view);
static const gchar *task_view_get_menu_label (PlannerView *view);
static const gchar *task_view_get_icon (PlannerView *view);
static const gchar *task_view_get_name (PlannerView *view);
static GtkWidget *task_view_get_widget (PlannerView *view);
static void task_view_print_init (PlannerView *view,
PlannerPrintJob *job);
static void task_view_print (PlannerView *view);
static gint task_view_print_get_n_pages (PlannerView *view);
static void task_view_print_cleanup (PlannerView *view);
static void task_view_tree_view_columns_changed_cb (GtkTreeView *tree_view,
PlannerView *view);
static void task_view_tree_view_destroy_cb (GtkTreeView *tree_view,
......@@ -116,11 +108,6 @@ static void task_view_update_ui (PlannerView *view);
static void task_view_save_columns (PlannerView *view);
static void task_view_load_columns (PlannerView *view);
void print_init (PlannerView *view,
PlannerPrintJob *job);
void print (PlannerView *view);
gint print_get_n_pages (PlannerView *view);
void print_cleanup (PlannerView *view);
static GtkActionEntry entries[] = {
......@@ -179,14 +166,43 @@ static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
#define CRITICAL_PATH_KEY "/views/task_view/highlight_critical_path"
G_MODULE_EXPORT void
activate (PlannerView *view)
G_DEFINE_TYPE (PlannerTaskView, planner_task_view, PLANNER_TYPE_VIEW);
static void
planner_task_view_class_init (PlannerTaskViewClass *klass)
{
PlannerViewPriv *priv;
gboolean show_critical;
GError *error = NULL;
PlannerViewClass *view_class;
priv = view->priv;
view_class = PLANNER_VIEW_CLASS (klass);
view_class->setup = task_view_setup;
view_class->get_label = task_view_get_label;
view_class->get_menu_label = task_view_get_menu_label;
view_class->get_icon = task_view_get_icon;
view_class->get_name = task_view_get_name;
view_class->get_widget = task_view_get_widget;
view_class->activate = task_view_activate;
view_class->deactivate = task_view_deactivate;
view_class->print_init = task_view_print_init;
view_class->print_get_n_pages = task_view_print_get_n_pages;
view_class->print = task_view_print;
view_class->print_cleanup = task_view_print_cleanup;
}
static void
planner_task_view_init (PlannerTaskView *view)
{
view->priv = g_new0 (PlannerTaskViewPriv, 1);
}
static void
task_view_activate (PlannerView *view)
{
PlannerTaskViewPriv *priv;
gboolean show_critical;
priv = PLANNER_TASK_VIEW (view)->priv;
priv->actions = gtk_action_group_new ("TaskView");
gtk_action_group_set_translation_domain (priv->actions, GETTEXT_PACKAGE);
......@@ -197,16 +213,11 @@ activate (PlannerView *view)
gtk_ui_manager_insert_action_group (priv->ui_manager, priv->actions, 0);
priv->merged_id = gtk_ui_manager_add_ui_from_file (priv->ui_manager,
DATADIR "/planner/ui/task-view.ui",
&error);
if (error != NULL) {
g_message ("Building menu failed: %s", error->message);
g_message ("Couldn't load: %s", DATADIR "/planner/ui/task-view.ui");
g_error_free(error);
}
NULL);
gtk_ui_manager_ensure_update (priv->ui_manager);
/* Set the initial UI state. */
show_critical = planner_conf_get_bool (CRITICAL_PATH_KEY, NULL);
planner_task_tree_set_highlight_critical (PLANNER_TASK_TREE (priv->tree),
......@@ -221,69 +232,58 @@ activate (PlannerView *view)
gtk_widget_grab_focus (priv->tree);
}
G_MODULE_EXPORT void
deactivate (PlannerView *view)
static void
task_view_deactivate (PlannerView *view)
{
PlannerViewPriv *priv;
PlannerTaskViewPriv *priv;
priv = view->priv;
priv = PLANNER_TASK_VIEW (view)->priv;
gtk_ui_manager_remove_ui (priv->ui_manager, priv->merged_id);
}
G_MODULE_EXPORT void
init (PlannerView *view, PlannerWindow *main_window)
static void
task_view_setup (PlannerView *view, PlannerWindow *main_window)
{
PlannerViewPriv *priv;
PlannerTaskViewPriv *priv;
priv = g_new0 (PlannerViewPriv, 1);
view->priv = priv;
priv = PLANNER_TASK_VIEW (view)->priv;
priv->ui_manager = planner_window_get_ui_manager(main_window);
priv->ui_manager = planner_window_get_ui_manager (main_window);
}
G_MODULE_EXPORT const gchar *
get_label (PlannerView *view)
static const gchar *
task_view_get_label (PlannerView *view)
{
g_return_val_if_fail (PLANNER_IS_VIEW (view), NULL);
return _("Tasks");
}
G_MODULE_EXPORT const gchar *
get_menu_label (PlannerView *view)
static const gchar *
task_view_get_menu_label (PlannerView *view)
{
g_return_val_if_fail (PLANNER_IS_VIEW (view), NULL);
return _("_Tasks");
}
G_MODULE_EXPORT const gchar *
get_icon (PlannerView *view)
static const gchar *
task_view_get_icon (PlannerView *view)
{
g_return_val_if_fail (PLANNER_IS_VIEW (view), NULL);
return IMAGEDIR "/tasks.png";
}
G_MODULE_EXPORT const gchar *
get_name (PlannerView *view)
static const gchar *
task_view_get_name (PlannerView *view)
{
g_return_val_if_fail (PLANNER_IS_VIEW (view), NULL);
return "task_view";
}
G_MODULE_EXPORT GtkWidget *
get_widget (PlannerView *view)
static GtkWidget *
task_view_get_widget (PlannerView *view)
{
PlannerViewPriv *priv;
MrpProject *project;
GtkWidget *sw;
PlannerGanttModel *model;
g_return_val_if_fail (PLANNER_IS_VIEW (view), NULL);
PlannerTaskViewPriv *priv;
MrpProject *project;
GtkWidget *sw;
PlannerGanttModel *model;
priv = view->priv;
priv = PLANNER_TASK_VIEW (view)->priv;
if (priv->tree == NULL) {
project = planner_window_get_project (view->main_window);
......@@ -383,18 +383,18 @@ task_view_tree_view_destroy_cb (GtkTreeView *tree_view,
}
static void
task_view_project_loaded_cb (MrpProject *project,
PlannerView *view)
task_view_project_loaded_cb (MrpProject *project,
PlannerView *view)
{
GtkTreeModel *model;
PlannerViewPriv *priv;
PlannerTaskViewPriv *priv;
GtkTreeModel *model;
priv = view->priv;
priv = PLANNER_TASK_VIEW (view)->priv;
model = GTK_TREE_MODEL (planner_gantt_model_new (project));
planner_task_tree_set_model (PLANNER_TASK_TREE (priv->tree),
PLANNER_GANTT_MODEL (model));
PLANNER_GANTT_MODEL (model));
g_object_unref (model);
}
......@@ -405,9 +405,9 @@ static void
task_view_insert_task_cb (GtkAction *action,
gpointer data)
{
PlannerView *view;
PlannerTaskView *view;
view = PLANNER_VIEW (data);
view = PLANNER_TASK_VIEW (data);
planner_task_tree_insert_task (PLANNER_TASK_TREE (view->priv->tree));
}
......@@ -416,7 +416,9 @@ static void
task_view_insert_tasks_cb (GtkAction *action,
gpointer data)
{
PlannerView *view = PLANNER_VIEW (data);
PlannerTaskView *view;
view = PLANNER_TASK_VIEW (data);
planner_task_tree_insert_tasks (PLANNER_TASK_TREE (view->priv->tree));
}
......@@ -425,9 +427,9 @@ static void
task_view_remove_task_cb (GtkAction *action,
gpointer data)
{
PlannerView *view;
PlannerTaskView *view;
view = PLANNER_VIEW (data);
view = PLANNER_TASK_VIEW (data);
planner_task_tree_remove_task (PLANNER_TASK_TREE (view->priv->tree));
}
......@@ -436,9 +438,9 @@ static void
task_view_edit_task_cb (GtkAction *action,
gpointer data)
{
PlannerView *view;
PlannerTaskView *view;
view = PLANNER_VIEW (data);
view = PLANNER_TASK_VIEW (data);
planner_task_tree_edit_task (PLANNER_TASK_TREE (view->priv->tree),
PLANNER_TASK_DIALOG_PAGE_GENERAL);
......@@ -448,9 +450,9 @@ static void
task_view_select_all_cb (GtkAction *action,
gpointer data)
{
PlannerView *view;
PlannerTaskView *view;
view = PLANNER_VIEW (data);
view = PLANNER_TASK_VIEW (data);
planner_task_tree_select_all (PLANNER_TASK_TREE (view->priv->tree));
}
......@@ -459,9 +461,9 @@ static void