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

Dist the examples.

2004-06-30  Richard Hult  <richard@imendio.com>

	* Makefile.am:
	* configure.in:
	* examples/sample-1.planner:  Dist the examples.

	* data/ui/xml-planner-plugin.ui: Fix string.

	* docs/user-guide/C/planner.xml: Make the man version the same as
	the app version, looks silly otherwise.

	* libplanner/mrp-parser.c: (mrp_parser_save):
	* libplanner/mrp-project.c: (mrp_project_save_as):
	* src/planner-application.c: (application_init):
	* src/planner-window.c: (window_do_save_as), (planner_window_open):
	* src/planner-xml-planner-plugin.c: (xml_planner_plugin_export):
	Fix up filename extensions and mime types.

	* planner.spec.in: Get this baby working.
parent 19276896
2004-06-30 Richard Hult <richard@imendio.com>
* Makefile.am:
* configure.in:
* examples/sample-1.planner: Dist the examples.
* data/ui/xml-planner-plugin.ui: Fix string.
* docs/user-guide/C/planner.xml: Make the man version the same as
the app version, looks silly otherwise.
* libplanner/mrp-parser.c: (mrp_parser_save):
* libplanner/mrp-project.c: (mrp_project_save_as):
* src/planner-application.c: (application_init):
* src/planner-window.c: (window_do_save_as), (planner_window_open):
* src/planner-xml-planner-plugin.c: (xml_planner_plugin_export):
Fix up filename extensions and mime types.
* planner.spec.in: Get this baby working.
2004-06-30 Alvaro del Castillo <acs@barrapunto.com>
* configure.in
......
......@@ -13,6 +13,7 @@ SUBDIRS = \
src \
data \
docs \
examples \
$(python_DIR) \
$(dotnet_DIR)
......
......@@ -25,7 +25,6 @@ fi
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
AM_CONDITIONAL(HAVE_NEW_MIME, test x$UPDATE_MIME_DATABASE != xno)
dnl -------------
dnl | API docs |--------------------------------------------
dnl -------------
......@@ -269,6 +268,7 @@ docs/libplanner/Makefile
docs/user-guide/Makefile
docs/user-guide/C/Makefile
docs/sql/Makefile
examples/Makefile
po/Makefile.in
data/Makefile
data/images/Makefile
......
<Root>
<commands>
<cmd name="XML Planner Export" _label="Planner File pre 0.12"/>
<cmd name="XML Planner Export" _label="Planner 0.11 Format"/>
</commands>
<menu>
<submenu name="File">
......
......@@ -3,7 +3,7 @@
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml">
<!ENTITY appversion "0.12">
<!ENTITY manrevision "1.6">
<!ENTITY manrevision "0.12">
<!ENTITY date "24 Apr 2004">
<!ENTITY app "Planner">
<!-- Information about the entities
......
<?xml version="1.0"?>
<project name="" company="" manager="" phase="" project-start="20030224T000000Z" mrproject-version="2" calendar="1">
<project name="Project X" company="Planner Community" manager="Richard Hult" phase="Implementation" project-start="20030224T000000Z" mrproject-version="2" calendar="1">
<properties>
<property name="My-Property" type="text" owner="project" label="My Property" description="Just a test"/>
<property name="cost" type="cost" owner="resource" label="Cost" description="standard cost for a resource"/>
</properties>
<phases/>
<properties>
<property name="My-Property" value="Testing custom properties"/>
</properties>
<phases>
<phase name="Design"/>
<phase name="Implementation"/>
<phase name="Testing"/>
</phases>
<calendars>
<day-types>
<day-type id="0" name="Working" description="A default working day"/>
<day-type id="1" name="Nonworking" description="A default non working day"/>
<day-type id="2" name="Use base" description="Use day from base calendar"/>
<day-type id="0" name="Arbete" description="En standardarbetsdag"/>
<day-type id="1" name="Ledigt" description="En ledig standarddag"/>
<day-type id="2" name="Anv&#xE4;nd bas" description="Anv&#xE4;nd dag fr&#xE5;n baskalender"/>
</day-types>
<calendar id="1" name="Default">
<default-week mon="0" tue="0" wed="0" thu="0" fri="0" sat="1" sun="1"/>
......@@ -22,59 +30,59 @@
</calendar>
</calendars>
<tasks>
<task id="1" name="Project X" note="" work="1224000" start="20030224T000000Z" end="20030423T120000Z" percent-complete="0" type="normal" scheduling="fixed-work">
<task id="2" name="Analyis" note="" work="230400" start="20030224T000000Z" end="20030305T170000Z" percent-complete="0" type="normal" scheduling="fixed-work"/>
<task id="3" name="Report" note="" work="0" start="20030305T170000Z" end="20030305T170000Z" percent-complete="0" type="milestone" scheduling="fixed-work">
<task id="1" name="Project X" note="" work="1300800" start="20030224T000000Z" end="20030428T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
<task id="2" name="Analyis" note="" work="230400" start="20030224T000000Z" end="20030310T142000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
<task id="3" name="Report" note="" work="0" start="20030310T142000Z" end="20030310T142000Z" percent-complete="0" priority="0" type="milestone" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="2" type="FS"/>
</predecessors>
</task>
<task id="4" name="Prototype" note="" work="172800" start="20030305T170000Z" end="20030313T170000Z" percent-complete="0" type="normal" scheduling="fixed-work">
<task id="4" name="Prototype" note="" work="172800" start="20030310T142000Z" end="20030318T142000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="3" type="FS"/>
</predecessors>
<task id="5" name="Design prototype" note="" work="144000" start="20030305T170000Z" end="20030312T170000Z" percent-complete="0" type="normal" scheduling="fixed-work"/>
<task id="6" name="Implementation" note="" work="144000" start="20030305T170000Z" end="20030312T170000Z" percent-complete="0" type="normal" scheduling="fixed-work"/>
<task id="7" name="Evaluation" note="" work="28800" start="20030312T170000Z" end="20030313T170000Z" percent-complete="0" type="normal" scheduling="fixed-work">
<task id="5" name="Design prototype" note="" work="144000" start="20030310T142000Z" end="20030317T142000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
<task id="6" name="Implementation" note="" work="144000" start="20030310T142000Z" end="20030317T142000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
<task id="7" name="Evaluation" note="" work="28800" start="20030317T142000Z" end="20030318T142000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="5" type="FS"/>
<predecessor id="1" predecessor-id="6" type="FS"/>
</predecessors>
</task>
<task id="8" name="Report" note="" work="0" start="20030313T170000Z" end="20030313T170000Z" percent-complete="0" type="milestone" scheduling="fixed-work">
<task id="8" name="Report" note="" work="0" start="20030318T142000Z" end="20030318T142000Z" percent-complete="0" priority="0" type="milestone" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="7" type="FS"/>
</predecessors>
</task>
</task>
<task id="9" name="Product" note="" work="820800" start="20030313T170000Z" end="20030423T120000Z" percent-complete="0" type="normal" scheduling="fixed-work">
<task id="9" name="Product" note="" work="820800" start="20030318T142000Z" end="20030428T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="8" type="FS"/>
</predecessors>
<task id="10" name="Summarize issues" note="" work="86400" start="20030313T170000Z" end="20030317T120000Z" percent-complete="0" type="normal" scheduling="fixed-work"/>
<task id="11" name="Finalize design" note="" work="144000" start="20030317T120000Z" end="20030324T120000Z" percent-complete="0" type="normal" scheduling="fixed-work">
<task id="10" name="Summarize issues" note="" work="86400" start="20030318T142000Z" end="20030320T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
<task id="11" name="Finalize design" note="" work="144000" start="20030320T092000Z" end="20030327T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="10" type="FS"/>
</predecessors>
</task>
<task id="12" name="Implementation" note="" work="432000" start="20030324T120000Z" end="20030414T120000Z" percent-complete="0" type="normal" scheduling="fixed-work">
<task id="12" name="Implementation" note="" work="432000" start="20030327T092000Z" end="20030417T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="11" type="FS"/>
</predecessors>
<task id="13" name="Back-end" note="" work="432000" start="20030324T120000Z" end="20030414T120000Z" percent-complete="0" type="normal" scheduling="fixed-work"/>
<task id="14" name="Front-end" note="" work="432000" start="20030324T120000Z" end="20030414T120000Z" percent-complete="0" type="normal" scheduling="fixed-work"/>
<task id="13" name="Back-end" note="" work="432000" start="20030327T092000Z" end="20030417T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
<task id="14" name="Front-end" note="" work="432000" start="20030327T092000Z" end="20030417T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
</task>
<task id="15" name="Evaluation" note="" work="57600" start="20030414T120000Z" end="20030416T120000Z" percent-complete="0" type="normal" scheduling="fixed-work">
<task id="15" name="Evaluation" note="" work="57600" start="20030417T092000Z" end="20030421T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="12" type="FS"/>
</predecessors>
</task>
<task id="16" name="QA" note="" work="144000" start="20030416T120000Z" end="20030423T120000Z" percent-complete="0" type="normal" scheduling="fixed-work">
<task id="16" name="QA" note="" work="144000" start="20030421T092000Z" end="20030428T092000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="15" type="FS"/>
</predecessors>
</task>
<task id="17" name="Report" note="" work="0" start="20030423T120000Z" end="20030423T120000Z" percent-complete="0" type="milestone" scheduling="fixed-work">
<task id="17" name="Report" note="" work="0" start="20030428T092000Z" end="20030428T092000Z" percent-complete="0" priority="0" type="milestone" scheduling="fixed-work">
<predecessors>
<predecessor id="1" predecessor-id="16" type="FS"/>
</predecessors>
......@@ -84,37 +92,37 @@
</tasks>
<resource-groups/>
<resources>
<resource id="1" name="QA" type="1" units="0" email="" note="" std-rate="0">
<resource id="1" name="Alvaro del Castillo" short-name="ACS" type="1" units="0" email="" note="" std-rate="0">
<properties>
<property name="cost" value=""/>
</properties>
</resource>
<resource id="2" name="Mikael Hallendal" type="1" units="0" email="" note="" std-rate="0">
<resource id="2" name="Richard Hult" short-name="RH" type="1" units="0" email="" note="" std-rate="0">
<properties>
<property name="cost" value=""/>
</properties>
</resource>
<resource id="3" name="Richard Hult" type="1" units="0" email="" note="" std-rate="0">
<resource id="3" name="Mikael Hallendal" short-name="MH" type="1" units="0" email="" note="" std-rate="0">
<properties>
<property name="cost" value=""/>
</properties>
</resource>
<resource id="4" name="Alvaro del Castillo" type="1" units="0" email="" note="" std-rate="0">
<resource id="4" name="Lincoln Phipps" short-name="LP" type="1" units="0" email="" note="" std-rate="0">
<properties>
<property name="cost" value=""/>
</properties>
</resource>
</resources>
<allocations>
<allocation task-id="16" resource-id="1" units="100"/>
<allocation task-id="2" resource-id="1" units="75"/>
<allocation task-id="15" resource-id="1" units="100"/>
<allocation task-id="10" resource-id="2" units="100"/>
<allocation task-id="6" resource-id="2" units="100"/>
<allocation task-id="14" resource-id="2" units="100"/>
<allocation task-id="13" resource-id="2" units="100"/>
<allocation task-id="11" resource-id="2" units="100"/>
<allocation task-id="5" resource-id="2" units="100"/>
<allocation task-id="10" resource-id="3" units="100"/>
<allocation task-id="13" resource-id="3" units="100"/>
<allocation task-id="11" resource-id="3" units="100"/>
<allocation task-id="5" resource-id="3" units="100"/>
<allocation task-id="2" resource-id="4" units="100"/>
<allocation task-id="15" resource-id="4" units="100"/>
<allocation task-id="6" resource-id="3" units="100"/>
<allocation task-id="14" resource-id="3" units="100"/>
<allocation task-id="16" resource-id="4" units="100"/>
</allocations>
</project>
......@@ -1087,8 +1087,8 @@ mrp_parser_save (MrpStorageMrproject *module,
g_return_val_if_fail (MRP_IS_STORAGE_MRPROJECT (module), FALSE);
g_return_val_if_fail (filename != NULL && filename[0] != 0, FALSE);
if (!strstr (filename, ".mrproject")) {
real_filename = g_strconcat (filename, ".mrproject", NULL);
if (!strstr (filename, ".mrproject") && !strstr (filename, ".planner")) {
real_filename = g_strconcat (filename, ".planner", NULL);
} else {
real_filename = g_strdup (filename);
}
......
......@@ -858,8 +858,8 @@ mrp_project_save_as (MrpProject *project,
is_sql = FALSE;
/* Hack for now. */
if (!strstr (uri, ".mrproject")) {
real_uri = g_strconcat (uri, ".mrproject", NULL);
if (!strstr (uri, ".mrproject") && !strstr (uri, ".planner")) {
real_uri = g_strconcat (uri, ".planner", NULL);
} else {
real_uri = g_strdup (uri);
}
......
......@@ -79,15 +79,15 @@ rm -rf "%{buildroot}"
%post
scrollkeeper-update
if test x$UPDATE_MIME_DATABASE != xno ; then
$(UPDATE_MIME_DATABASE) "%{_datadir}/mime"
endif
if (update-mime-database -v &> /dev/null); then
update-mime-database "%{_datadir}/mime"
fi
%postun
scrollkeeper-update
if test x$UPDATE_MIME_DATABASE != xno ; then
$(UPDATE_MIME_DATABASE) "%{_datadir}/mime"
endif
if (update-mime-database -v &> /dev/null); then
update-mime-database "%{_datadir}/mime"
fi
%files
%defattr(-,root,root)
......@@ -113,6 +113,8 @@ endif
%exclude %{_libdir}/planner/plugins/libsql-plugin*
%exclude %{_datadir}/planner/glade/sql.glade
%exclude %{_datadir}/planner/ui/sql-plugin.ui
%exclude %{_datadir}/planner/sql/*
%exclude %{_datadir}/doc/planner/README.sql
# Database (GDA) package
%package database
......
......@@ -182,7 +182,10 @@ application_init (PlannerApplication *app)
priv->windows = NULL;
priv->recent_model = egg_recent_model_new (EGG_RECENT_MODEL_SORT_MRU);
egg_recent_model_set_filter_mime_types (priv->recent_model, "application/x-mrproject", NULL);
egg_recent_model_set_filter_mime_types (priv->recent_model,
"application/x-planner",
"application/x-mrproject",
NULL);
egg_recent_model_set_filter_uri_schemes (priv->recent_model, "file", NULL);
g_object_set (priv->recent_model, "limit", 5, NULL);
......
......@@ -1399,7 +1399,7 @@ window_do_save_as (PlannerWindow *window)
if (success) {
/* Add the file to the recent list */
item = egg_recent_item_new_from_uri (mrp_project_get_uri (priv->project));
egg_recent_item_set_mime_type (item, "application/x-mrproject");
egg_recent_item_set_mime_type (item, "application/x-planner");
egg_recent_model_add_full (planner_application_get_recent_model (priv->application), item);
egg_recent_item_unref (item);
} else {
......@@ -1525,7 +1525,7 @@ planner_window_open (PlannerWindow *window, const gchar *uri)
/* Add the file to the recent list */
item = egg_recent_item_new_from_uri (uri);
egg_recent_item_set_mime_type (item, "application/x-mrproject");
egg_recent_item_set_mime_type (item, "application/x-planner");
egg_recent_model_add_full (planner_application_get_recent_model (priv->application), item);
egg_recent_item_unref (item);
......
......@@ -95,6 +95,7 @@ xml_planner_plugin_export (BonoboUIComponent *component,
GtkWidget *dialog;
gint response;
const gchar *filename = NULL;
gchar *real_filename;
gchar *last_dir;
GConfClient *gconf_client;
......@@ -116,7 +117,14 @@ xml_planner_plugin_export (BonoboUIComponent *component,
filename = gtk_file_selection_get_filename (
GTK_FILE_SELECTION (file_sel));
if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
if (!strstr (filename, ".mrproject") || !strstr (filename, ".planner")) {
real_filename = g_strconcat (filename, ".mrproject", NULL);
} else {
real_filename = g_strdup (filename);
}
if (g_file_test (real_filename, G_FILE_TEST_EXISTS)) {
dialog = gtk_message_dialog_new (GTK_WINDOW (priv->main_window),
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
......@@ -124,7 +132,7 @@ xml_planner_plugin_export (BonoboUIComponent *component,
GTK_BUTTONS_YES_NO,
_("File \"%s\" exists, "
"do you want to overwrite it?"),
filename);
real_filename);
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
......@@ -133,6 +141,7 @@ xml_planner_plugin_export (BonoboUIComponent *component,
case GTK_RESPONSE_YES:
break;
default:
g_free (real_filename);
continue;
}
}
......@@ -142,8 +151,8 @@ xml_planner_plugin_export (BonoboUIComponent *component,
}
project = planner_window_get_project (priv->main_window);
if (!mrp_project_export (project, filename,
if (!mrp_project_export (project, real_filename,
"Planner XML pre-0.12",
TRUE,
&error)) {
......@@ -152,12 +161,13 @@ xml_planner_plugin_export (BonoboUIComponent *component,
gconf_client = planner_application_get_gconf_client ();
last_dir = g_path_get_dirname (filename);
last_dir = g_path_get_dirname (real_filename);
gconf_client_set_string (gconf_client,
GCONF_PATH "/general/last_dir",
last_dir,
NULL);
g_free (last_dir);
g_free (real_filename);
gtk_widget_destroy (file_sel);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment