Commit 4134dbd3 authored by Richard Hult's avatar Richard Hult Committed by Richard Hult

Remove some old pre-GNOME 2.10 cruft.

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

	* configure.in:
	* data/images/Makefile.am:
	* data/mime/Makefile.am: Remove some old pre-GNOME 2.10 cruft.

	* libplanner/Makefile.am:
	* src/Makefile.am:
	* libplanner/mrp-paths.h:
	* libplanner/mrp-paths-gnome.c:
	* libplanner/mrp-paths-win32.c:
	* libplanner/*.[c]:
	* src/*.[c]: Implement path handling for the data files in a cross
	platform way, based on patch from Jani Tiainen.

	* src/planner-gantt-view.c:
	* src/planner-task-popup.c:
	* src/planner-task-view.c:
	* src/planner-usage-view.c:
	* src/planner-resource-view.c:
	* src/planner-window.c: (window_add_stock_icon),
	(window_add_stock_icons), (window_populate): Add all the stock
	icons we're using once, instead of in all the views etc.
parent 1b108208
2005-04-23 Richard Hult <richard@imendio.com>
* configure.in:
* data/images/Makefile.am:
* data/mime/Makefile.am: Remove some old pre-GNOME 2.10 cruft.
* libplanner/Makefile.am:
* src/Makefile.am:
* libplanner/mrp-paths.h:
* libplanner/mrp-paths-gnome.c:
* libplanner/mrp-paths-win32.c:
* libplanner/*.[c]:
* src/*.[c]: Implement path handling for the data files in a cross
platform way, based on patch from Jani Tiainen.
* src/planner-gantt-view.c:
* src/planner-task-popup.c:
* src/planner-task-view.c:
* src/planner-usage-view.c:
* src/planner-resource-view.c:
* src/planner-window.c: (window_add_stock_icon),
(window_add_stock_icons), (window_populate): Add all the stock
icons we're using once, instead of in all the views etc.
2005-04-21 Francisco Moraes <fmoraes@nc.rr.com>
* configure.in:
......
......@@ -26,10 +26,8 @@ if test x$PKG_CONFIG = xno ; then
fi
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
AM_CONDITIONAL(HAVE_NEW_MIME, test x$UPDATE_MIME_DATABASE != xno)
AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
AM_CONDITIONAL(HAVE_NEWER_MIME, test x$UPDATE_DESKTOP_DATABASE != xno)
AC_ARG_ENABLE(update-mimedb,
AC_HELP_STRING([--disable-update-mimedb],
......@@ -71,7 +69,7 @@ GLIB_REQUIRED=2.6.0
GTK_REQUIRED=2.6.0
LIBGNOMECANVAS_REQUIRED=2.10.0
LIBGNOMEUI_REQUIRED=2.10.0
LIBGLADE_REQUIRED=2.4.0
LIBGLADE_REQUIRED=2.3.0
LIBGNOMEPRINTUI_REQUIRED=2.10.0
GNOME_VFS_REQUIRED=2.10.0
GCONF_REQUIRED=2.10.0
......@@ -133,8 +131,7 @@ dnl -----------------------------------------------------------
dnl ================================
dnl | HTML output file-module |---------------------------
dnl ================================
PKG_CHECK_MODULES(XSLT, libxslt >= $LIBXSLT_REQUIRED)
XSLT_LIBS="$XSLT_LIBS -lexslt"
PKG_CHECK_MODULES(XSLT, libxslt >= $LIBXSLT_REQUIRED libexslt)
dnl -----------------------------------------------------------
......@@ -167,6 +164,7 @@ fi
AC_DEFINE_UNQUOTED(GNOMELOCALEDIR, "$GNOMELOCALEDIR", [The locale dir to use])
dnl -----------------------------------------------------------
dnl --------------
dnl | Python setup |--------------------------------------------
dnl --------------
......
imagesdir = $(datadir)/pixmaps/planner
images_DATA = \
imagesdir = $(datadir)/planner/images
images_DATA = \
tasks.png \
gantt.png \
resources.png \
......@@ -15,18 +15,17 @@ images_DATA = \
24_edit_resource.png \
24_groups.png \
24_task_down.png \
24_task_up.png
24_task_up.png \
gnome-planner.png
mimeiconsdir = $(datadir)/icons/hicolor/48x48/mimetypes
mimeicons_DATA = gnome-mime-application-x-planner.png
# Install the mime icon for the old system as well
pixmapdir = $(datadir)/pixmaps
pixmap_DATA = gnome-planner.png gnome-mime-application-x-planner.png
#pixmapdir = $(datadir)/pixmaps
#pixmap_DATA = gnome-planner.png gnome-mime-application-x-planner.png
#$(pixmap_DATA)
EXTRA_DIST = \
$(pixmap_DATA) \
EXTRA_DIST = \
$(images_DATA) \
$(mimeicons_DATA)
keys_in_files = planner.keys.in
keys_files = $(keys_in_files:.keys.in=.keys)
@INTLTOOL_KEYS_RULE@
xml_in_files = planner.xml.in
xml_files = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
mimedir = $(datadir)/mime-info
mime_DATA = $(keys_files) planner.mime
applicationsdir = $(datadir)/application-registry
applications_DATA = planner.applications
newmimedir = $(datadir)/mime/packages
newmime_DATA = $(xml_files)
EXTRA_DIST = \
$(keys_in_files) \
$(mime_DATA) \
$(applications_DATA) \
$(xml_in_files)
mimedir = $(datadir)/mime/packages
mime_DATA = $(xml_files)
CLEANFILES = $(keys_files) $(xml_files)
EXTRA_DIST = $(xml_in_files)
CLEANFILES = $(xml_files)
install-data-hook:
if ENABLE_UPDATE_MIMEDB
if HAVE_NEW_MIME
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
endif
if HAVE_NEWER_MIME
$(UPDATE_DESKTOP_DATABASE)
endif
endif
uninstall-hook:
if ENABLE_UPDATE_MIMEDB
if HAVE_NEW_MIME
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime"
endif
if HAVE_NEWER_MIME
$(UPDATE_DESKTOP_DATABASE)
endif
endif
......@@ -4,8 +4,9 @@ INCLUDES = \
-I$(top_builddir) \
-I$(top_builddir)/libplanner \
$(LIBPLANNER_CFLAGS) $(WARN_CFLAGS) \
-DMRP_STORAGEMODULEDIR=\""$(libdir)/planner/storage-modules"\" \
-DMRP_FILE_MODULES_DIR=\""$(libdir)/planner/file-modules"\" \
-DSTORAGEMODULEDIR=\""$(libdir)/planner/storage-modules"\" \
-DFILEMODULEDIR=\""$(libdir)/planner/file-modules"\" \
-DPLUGINDIR=\""$(libdir)/planner/plugins"\" \
-DDATADIR=\""$(datadir)"\"
lib_LTLIBRARIES = libplanner-1.la
......@@ -33,7 +34,8 @@ libplanner_1_la_SOURCES = \
mrp-private.h \
mrp-property.c \
mrp-time.c \
mrp-error.c
mrp-error.c \
mrp-paths-gnome.c
libplannerinclude_HEADERS = \
planner.h \
......@@ -51,7 +53,8 @@ libplannerinclude_HEADERS = \
mrp-relation.h \
mrp-types.h \
mrp-time.h \
mrp-error.h
mrp-error.h \
mrp-paths.h
libplanner_1_la_LIBADD = $(LIBPLANNER_LIBS)
......
......@@ -24,6 +24,7 @@
#include <config.h>
#include <string.h>
#include <glib/gi18n.h>
#include "libplanner/mrp-paths.h"
#include "mrp-file-module.h"
static MrpFileModule *
......@@ -53,10 +54,14 @@ mrp_file_module_load_all (MrpApplication *app)
GDir* dir;
const gchar *name;
MrpFileModule *module;
gchar *path;
dir = g_dir_open (MRP_FILE_MODULES_DIR, 0, NULL);
path = mrp_paths_get_file_modules_dir (NULL);
dir = g_dir_open (path, 0, NULL);
if (dir == NULL) {
if (dir == NULL) {
g_free (path);
return;
}
......@@ -64,7 +69,7 @@ mrp_file_module_load_all (MrpApplication *app)
if (g_str_has_suffix (name, G_MODULE_SUFFIX)) {
gchar *plugin;
plugin = g_build_filename (MRP_FILE_MODULES_DIR,
plugin = g_build_filename (path,
name,
NULL);
......@@ -72,11 +77,12 @@ mrp_file_module_load_all (MrpApplication *app)
if (module) {
mrp_file_module_init (module, app);
}
g_free (plugin);
}
}
g_free (path);
g_dir_close (dir);
}
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2005 Imendio AB
* Copyright (C) 2005 Jani Tiainen
*
* This library 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 library 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 library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Path generation
* Gnome specific versions
*/
#include <config.h>
#include "mrp-paths.h"
static const gchar *plugin_dir = PLUGINDIR;
static const gchar *storagemodule_dir = STORAGEMODULEDIR;
static const gchar *file_modules_dir = FILEMODULEDIR;
static const gchar *glade_dir = DATADIR "/planner/glade";
static const gchar *image_dir = DATADIR "/planner/images";
static const gchar *dtd_dir = DATADIR "/planner/dtd";
static const gchar *stylesheet_dir = DATADIR "/planner/stylesheets";
static const gchar *ui_dir = DATADIR "/planner/ui";
gchar *
mrp_paths_get_glade_dir (const gchar *filename)
{
return g_build_filename (glade_dir, filename, NULL);
}
gchar *
mrp_paths_get_image_dir (const gchar *filename)
{
return g_build_filename (image_dir, filename, NULL);
}
gchar *
mrp_paths_get_plugin_dir (const gchar *filename)
{
return g_build_filename (plugin_dir, filename, NULL);
}
gchar *
mrp_paths_get_dtd_dir (const gchar *filename)
{
return g_build_filename (dtd_dir, filename, NULL);
}
gchar *
mrp_paths_get_stylesheet_dir (const gchar *filename)
{
return g_build_filename (stylesheet_dir, filename, NULL);
}
gchar *
mrp_paths_get_storagemodule_dir (const gchar *filename)
{
return g_build_filename (storagemodule_dir, filename, NULL);
}
gchar *
mrp_paths_get_file_modules_dir (const gchar *filename)
{
return g_build_filename (file_modules_dir, filename, NULL);
}
gchar *
mrp_paths_get_ui_dir (const gchar *filename)
{
return g_build_filename (ui_dir, filename, NULL);
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2005 Jani Tiainen
*
* This library 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 library 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 library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Path generation
* Win32 specific versions
*/
#include "mrp-paths.h"
static gchar *glade_dir = NULL;
static gchar *image_dir = NULL;
static gchar *plugin_dir = NULL;
static gchar *dtd_dir = NULL;
static gchar *stylesheet_dir = NULL;
static gchar *ui_dir = NULL;
static gchar *storagemodule_dir = NULL;
static gchar *file_modules_dir = NULL;
gchar *
mrp_paths_get_glade_dir (const gchar *filename)
{
if (!glade_dir) {
glade_dir = g_win32_get_package_installation_subdirectory (NULL, NULL, GLADEDIR);
}
return g_build_filename (glade_dir, filename, NULL);
}
gchar *
mrp_paths_get_image_dir (const gchar *filename)
{
if (!image_dir) {
image_dir = g_win32_get_package_installation_subdirectory (NULL, NULL, IMAGEDIR);
}
return g_build_filename (image_dir, filename, NULL);
}
gchar *
mrp_paths_get_plugin_dir (const gchar *filename)
{
if (!plugin_dir) {
plugin_dir = g_win32_get_package_installation_subdirectory (NULL, NULL, PLUGINDIR);
}
return g_build_filename (plugin_dir, filename, NULL);
}
gchar *
mrp_paths_get_dtd_dir (const gchar *filename)
{
if (!dtd_dir) {
dtd_dir = g_win32_get_package_installation_subdirectory (NULL, NULL, DTDDIR);
}
return g_build_filename (dtd_dir, filename, NULL);
}
gchar *
mrp_paths_get_stylesheet_dir (const gchar *filename)
{
if (!stylesheet_dir) {
stylesheet_dir = g_win32_get_package_installation_subdirectory (NULL, NULL, STYLESHEETDIR);
}
return g_build_filename (stylesheet_dir, filename, NULL);
}
gchar *
mrp_paths_get_ui_dir (const gchar *filename)
{
if (!ui_dir) {
ui_dir = g_win32_get_package_installation_subdirectory (NULL, NULL, UIDIR);
}
return g_build_filename (ui_dir, filename, NULL);
}
gchar *
mrp_paths_get_storagemodule_dir (const gchar *filename)
{
if (!storagemodule_dir) {
storagemodule_dir = g_win32_get_package_installation_subdirectory (NULL, NULL, STORAGEMODULEDIR);
}
return g_build_filename (storagemodule_dir, filename, NULL);
}
gchar *
mrp_paths_get_file_modules_dir (const gchar *filename)
{
if (!file_modules_dir) {
file_modules_dir = g_win32_get_package_installation_subdirectory (NULL, NULL, FILEMODULEDIR);
}
return g_build_filename (file_modules_dir, filename, NULL);
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2005 Imendio AB
* Copyright (C) 2005 Jani Tiainen
*
* This library 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 library 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 library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Path generation functions
*/
#ifndef __MRP_PATHS_H__
#define __MRP_PATHS_H__
#include <glib.h>
gchar *mrp_paths_get_plugin_dir (const gchar *filename);
gchar *mrp_paths_get_storagemodule_dir (const gchar *filename);
gchar *mrp_paths_get_file_modules_dir (const gchar *filename);
gchar *mrp_paths_get_glade_dir (const gchar *filename);
gchar *mrp_paths_get_image_dir (const gchar *filename);
gchar *mrp_paths_get_dtd_dir (const gchar *filename);
gchar *mrp_paths_get_stylesheet_dir (const gchar *filename);
gchar *mrp_paths_get_ui_dir (const gchar *filename);
#endif /* __MRP_PATHS_H__ */
......@@ -22,7 +22,7 @@
#include <config.h>
#include <gmodule.h>
#include "mrp-paths.h"
#include "mrp-storage-module-factory.h"
#include "mrp-storage-module.h"
......@@ -131,11 +131,14 @@ mrp_storage_module_factory_get (const gchar *name)
{
MrpStorageModuleFactory *factory;
gchar *fullname, *libname;
gchar *path;
fullname = g_strconcat ("storage-", name, NULL);
libname = g_module_build_path (MRP_STORAGEMODULEDIR, fullname);
path = mrp_paths_get_storagemodule_dir (NULL);
libname = g_module_build_path (path, fullname);
g_free (path);
if (!module_hash) {
module_hash = g_hash_table_new (g_str_hash, g_str_equal);
}
......
......@@ -28,6 +28,7 @@
#include <libplanner/mrp-file-module.h>
#include <libplanner/mrp-private.h>
#include "mrp-paths.h"
#include "mrp-old-xml.h"
typedef enum {
......@@ -121,13 +122,20 @@ static XmlType
xml_locate_type (xmlDoc *doc)
{
XmlType ret_val = XML_TYPE_UNKNOWN;
gchar *filename;
if (xml_validate (doc, DTDDIR "/mrproject-0.6.dtd")) {
filename = mrp_paths_get_dtd_dir ("mrproject-0.6.dtd");
if (xml_validate (doc, filename)) {
ret_val = XML_TYPE_MRP_0_6;
} else {
g_free (filename);
filename = mrp_paths_get_dtd_dir ("mrproject-0.5.1.dtd");
if (xml_validate (doc, filename)) {
ret_val = XML_TYPE_MRP_0_5_1;
}
}
else if (xml_validate (doc, DTDDIR "/mrproject-0.5.1.dtd")) {
ret_val = XML_TYPE_MRP_0_5_1;
}
g_free (filename);
return ret_val;
}
......
......@@ -32,7 +32,7 @@
#include <string.h>
#include <libplanner/mrp-file-module.h>
#include <libplanner/mrp-private.h>
#include "libplanner/mrp-paths.h"
void init (MrpFileModule *module,
MrpApplication *application);
......@@ -60,6 +60,7 @@ html_write (MrpFileWriter *writer,
xmlDoc *doc;
xmlDoc *final_doc;
gboolean ret;
gchar *filename;
if (!mrp_project_save_to_xml (project, &xml_project, error)) {
return FALSE;
......@@ -70,7 +71,9 @@ html_write (MrpFileWriter *writer,
xmlLoadExtDtdDefaultValue = 1;
exsltRegisterAll ();
stylesheet = xsltParseStylesheetFile (STYLESHEETDIR "/planner2html.xsl");
filename = mrp_paths_get_stylesheet_dir ("planner2html.xsl");
stylesheet = xsltParseStylesheetFile (filename);
g_free (filename);
doc = xmlParseMemory (xml_project, strlen (xml_project));
final_doc = xsltApplyStylesheet (stylesheet, doc, NULL);
......@@ -105,6 +108,7 @@ xml_planner_pre012_write (MrpFileWriter *writer,
xmlDoc *doc;
xmlDoc *final_doc;
gboolean ret;
gchar *filename;
if (!mrp_project_save_to_xml (project, &xml_project, error)) {
return FALSE;
......@@ -115,7 +119,9 @@ xml_planner_pre012_write (MrpFileWriter *writer,
xmlLoadExtDtdDefaultValue = 1;
exsltRegisterAll ();
stylesheet = xsltParseStylesheetFile (STYLESHEETDIR "/planner2plannerv011.xsl");
filename = mrp_paths_get_stylesheet_dir ("planner2plannerv011.xsl");
stylesheet = xsltParseStylesheetFile (filename);
g_free (filename);
doc = xmlParseMemory (xml_project, strlen (xml_project));
final_doc = xsltApplyStylesheet (stylesheet, doc, NULL);
......
......@@ -8,12 +8,7 @@ INCLUDES = \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DIMAGEDIR=\""$(datadir)/pixmaps/planner"\" \
-DGLADEDIR=\""$(datadir)/planner/glade"\" \
-DPLUGINDIR=\""$(libdir)/planner/plugins"\" \
-DSTYLESHEETDIR=\""$(datadir)/planner/stylesheets"\" \
-DDTDDIR=\""$(datadir)/planner/dtd"\"
-DDATADIR=\""$(datadir)"\"
if HAVE_PYTHON_PLUGIN
INCLUDES += $(PYTHON_INCLUDES)
......
......@@ -29,6 +29,7 @@
#include <libplanner/mrp-day.h>
#include <libplanner/mrp-object.h>
#include <libplanner/mrp-project.h>
#include <libplanner/mrp-paths.h>
#include "planner-calendar.h"
#include "planner-working-time-dialog.h"
#include "planner-default-week-dialog.h"
......@@ -587,12 +588,17 @@ planner_calendar_dialog_new (PlannerWindow *window)
GtkWidget *w;
GtkTreeSelection *selection;
gint i;
gchar *filename;
g_return_val_if_fail (PLANNER_IS_WINDOW (window), NULL);
glade = glade_xml_new (GLADEDIR "/calendar-dialog.glade",
filename = mrp_paths_get_glade_dir ("calendar-dialog.glade");
glade = glade_xml_new (filename ,
"calendar_dialog",
GETTEXT_PACKAGE);
g_free (filename);
if (!glade) {
g_warning ("Could not create calendar dialog.");
return NULL;
......@@ -1254,10 +1260,13 @@ cal_dialog_new_dialog_run (DialogData *data)
GtkWidget *tree_view;
const gchar *name;
GtkTreePath *path;
gchar *filename;
glade = glade_xml_new (GLADEDIR "/calendar-dialog.glade",
filename = mrp_paths_get_glade_dir ("calendar-dialog.glade");
glade = glade_xml_new (filename,
"new_calendar_dialog",
GETTEXT_PACKAGE);
g_free (filename);
dialog = glade_xml_get_widget (glade, "new_calendar_dialog");
......
......@@ -27,6 +27,7 @@
#include <libplanner/mrp-day.h>
#include <libplanner/mrp-object.h>
#include <libplanner/mrp-project.h>
#include "libplanner/mrp-paths.h"
#include "planner-calendar.h"
#include "planner-calendar-selector.h"
......@@ -68,19 +69,22 @@ static void cal_selector_selection_changed_cb (GtkTreeSelection *selec
GtkWidget *
planner_calendar_selector_new (PlannerWindow *window,
const gchar *caption)
const gchar *caption)
{
DialogData *data;
GladeXML *glade;
GtkWidget *selector;
GtkWidget *w;
GtkTreeSelection *selection;
gchar *filename;
g_return_val_if_fail (PLANNER_IS_WINDOW (window), NULL);
glade = glade_xml_new (GLADEDIR "/calendar-dialog.glade",
filename = mrp_paths_get_glade_dir ("calendar-dialog.glade");
glade = glade_xml_new (filename,
"calendar_selector",
GETTEXT_PACKAGE);
g_free (filename);
if (!glade) {
g_warning ("Could not create calendar selector.");
return NULL;
......
......@@ -22,6 +22,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include "libplanner/mrp-paths.h"
#include "planner-column-dialog.h"
typedef struct {
......@@ -476,8 +477,12 @@ planner_column_dialog_show (PlannerWindow *window,
DialogData *data;
GladeXML *glade;
GtkWidget *close_button;
gchar *filename;
filename = mrp_paths_get_glade_dir ("column-dialog.glade");
glade = glade_xml_new (filename, NULL, NULL);
g_free (filename);
glade = glade_xml_new (GLADEDIR "/column-dialog.glade", NULL, NULL);
if (!glade) {
g_warning ("Could not create column dialog.");
return;
......
......@@ -26,6 +26,7 @@
#include <glade/glade.h>
#include <gtk/gtk.h>
#include <libplanner/mrp-project.h>
#include "libplanner/mrp-paths.h"
#include "planner-day-type-dialog.h"
#define RESPONSE_ADD 1
......@@ -148,12 +149,16 @@ planner_day_type_dialog_new (PlannerWindow *window)
GtkCellRenderer *cell;
GtkTreeViewColumn *col;
GtkTreeSelection *selection;
gchar *filename;
g_return_val_if_fail (PLANNER_IS_WINDOW (window), NULL);
glade = glade_xml_new (GLADEDIR "/calendar-dialog.glade",
filename = mrp_paths_get_glade_dir ("calendar-dialog.glade");
glade = glade_xml_new (filename ,
"day_type_dialog",
GETTEXT_PACKAGE);
g_free (filename);
if (!glade) {
g_warning ("Could not create day_type dialog.");
return NULL;
......@@ -419,10 +424,13 @@ day_type_dialog_new_dialog_run (DialogData *data)
GtkWidget *entry;
GtkWidget *button;
const gchar *name;
gchar *filename;
glade = glade_xml_new (GLADEDIR "/calendar-dialog.glade",
filename = mrp_paths_get_glade_dir ("calendar-dialog.glade");
glade = glade_xml_new (filename,
"new_day_dialog",
GETTEXT_PACKAGE);
g_free (filename);
dialog = glade_xml_get_widget (glade, "new_day_dialog");
......
......@@ -26,6 +26,7 @@
#include <glade/glade.h>
#include <gtk/gtk.h>