glom r1988 - in trunk: . glom glom/libglom glom/libglom/connectionpool_backends glom/mode_design/print_layouts glom/utility_widgets
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1988 - in trunk: . glom glom/libglom glom/libglom/connectionpool_backends glom/mode_design/print_layouts glom/utility_widgets
- Date: Fri, 13 Mar 2009 18:47:17 +0000 (UTC)
Author: arminb
Date: Fri Mar 13 18:47:17 2009
New Revision: 1988
URL: http://svn.gnome.org/viewvc/glom?rev=1988&view=rev
Log:
Modified:
trunk/ChangeLog
trunk/glom/dialog_existing_or_new.cc
trunk/glom/libglom/connectionpool_backends/postgres_self.cc
trunk/glom/libglom/glade_utils.h
trunk/glom/main.cc
trunk/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
trunk/glom/utility_widgets/layouttoolbar.cc
trunk/glom/utility_widgets/layouttoolbarbutton.cc
Modified: trunk/glom/dialog_existing_or_new.cc
==============================================================================
--- trunk/glom/dialog_existing_or_new.cc (original)
+++ trunk/glom/dialog_existing_or_new.cc Fri Mar 13 18:47:17 2009
@@ -157,8 +157,8 @@
#ifndef GLOM_ENABLE_CLIENT_ONLY
#ifdef G_OS_WIN32
- gchar* dir = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/glom/doc/examples");
- std::string path(dir);
+ gchar* dir = g_win32_get_package_installation_directory_of_module(NULL);
+ std::string path = Glib::build_filename(dir, "share/glom/doc/examples");
g_free(dir);
if(!Glib::file_test(path, Glib::FILE_TEST_EXISTS))
Modified: trunk/glom/libglom/connectionpool_backends/postgres_self.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/postgres_self.cc (original)
+++ trunk/glom/libglom/connectionpool_backends/postgres_self.cc Fri Mar 13 18:47:17 2009
@@ -79,9 +79,9 @@
// share/postgresql which would be nice to separate the postgres stuff
// from the other shared data. We can perhaps still change this later by
// building postgres with another prefix than /local/pgsql.
- gchar* bin_subdir = g_win32_get_package_installation_subdirectory(NULL, NULL, "bin");
- std::string test = Glib::build_filename(bin_subdir, real_program);
- g_free(bin_subdir);
+ gchar* installation_directory = g_win32_get_package_installation_directory_of_module(NULL);
+ std::string test = Glib::build_filename(installation_directory, Glib::build_filename("bin", real_program));
+ g_free(installation_directory);
if(Glib::file_test(test, Glib::FILE_TEST_IS_EXECUTABLE))
return test;
Modified: trunk/glom/libglom/glade_utils.h
==============================================================================
--- trunk/glom/libglom/glade_utils.h (original)
+++ trunk/glom/libglom/glade_utils.h Fri Mar 13 18:47:17 2009
@@ -33,9 +33,9 @@
inline std::string get_glade_file_path(const std::string& filename)
{
#ifdef G_OS_WIN32
- gchar* packdir = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/glom/glade");
- std::string result = Glib::build_filename(packdir, filename);
- g_free(packdir);
+ gchar* directory = g_win32_get_package_installation_directory_of_module(NULL);
+ std::string result = Glib::build_filename(directory, Glib::build_filename("share/glom/glade", filename));
+ g_free(directory);
return result;
#else
return GLOM_GLADEDIR + filename;
Modified: trunk/glom/main.cc
==============================================================================
--- trunk/glom/main.cc (original)
+++ trunk/glom/main.cc Fri Mar 13 18:47:17 2009
@@ -121,6 +121,10 @@
}
#endif
+ gchar* installation_dir_c = g_win32_get_package_installation_directory_of_module(NULL);
+ const std::string installation_dir(installation_dir_c);
+ g_free(installation_dir_c);
+
// TODO: I am not sure why, but this does not work. PYTHONPATH is set
// correctly according to getenv(), but python still does not look in it.
// For now, the installer installs all the python stuff directly into the
@@ -130,11 +134,10 @@
#ifdef G_OS_WIN32
// Set PYTHONPATH to point to python/ because that's where the installer
// installs all the python modules into.
- gchar* python_path = g_win32_get_package_installation_subdirectory(NULL, NULL, "python");
+ std::string python_path = Glib::build_filename(installation_dir, "python");
std::string current_path = Glib::getenv("PYTHONPATH");
if(current_path.empty()) current_path = python_path;
else current_path += (std::string(";") + python_path); // PATH-like variables are separated by ; on Windows because : is a valid character in paths.
- g_free(python_path);
std::cout << "Setting " << current_path << ":" << std::endl;
std::cout << Glib::setenv("PYTHONPATH", current_path) << std::endl;
std::cout << getenv("PYTHONPATH") << std::endl;
@@ -144,16 +147,12 @@
#ifdef G_OS_WIN32
// Add glom's bin directory to PATH so that g_spawn* finds the
// gspawn-win32-helper.exe helper program. The installer installs it there.
- gchar* app_dir = g_win32_get_package_installation_subdirectory(NULL, NULL, "bin");
- Glib::setenv("PATH", Glib::getenv("PATH") + ";" + app_dir);
- g_free(app_dir);
+ Glib::setenv("PATH", Glib::getenv("PATH") + ";" + Glib::build_filename(installation_dir, "bin"));
#endif
#ifdef G_OS_WIN32
// Load translations relative to glom.exe on Windows
- gchar* dir = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/locale");
- bindtextdomain(GETTEXT_PACKAGE, dir);
- g_free(dir);
+ bindtextdomain(GETTEXT_PACKAGE, Glib::build_filename(installation_dir, "share/locale").c_str());
#else
//Make this application use the current locale for _() translation:
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); //LOCALEDIR is defined in the Makefile.am
Modified: trunk/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/print_layout_toolbar_button.cc (original)
+++ trunk/glom/mode_design/print_layouts/print_layout_toolbar_button.cc Fri Mar 13 18:47:17 2009
@@ -28,8 +28,8 @@
std::string get_icon_path(const std::string& filename)
{
#ifdef G_OS_WIN32
- gchar* basepath = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/glom/pixmaps");
- const std::string result = Glib::build_filename(basepath, filename);
+ gchar* basepath = g_win32_get_package_installation_directory_of_module(NULL);
+ const std::string result = Glib::build_filename(basepath, Glib::build_filename("share/glom/pixmaps", filename));
g_free(basepath);
return result;
#else
Modified: trunk/glom/utility_widgets/layouttoolbar.cc
==============================================================================
--- trunk/glom/utility_widgets/layouttoolbar.cc (original)
+++ trunk/glom/utility_widgets/layouttoolbar.cc Fri Mar 13 18:47:17 2009
@@ -33,8 +33,8 @@
Glib::ustring get_icon_path(const Glib::ustring& filename)
{
#ifdef G_OS_WIN32
- gchar* basepath = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/glom/pixmaps");
- Glib::ustring result = Glib::build_filename(basepath, filename);
+ gchar* basepath = g_win32_get_package_installation_directory_of_module(NULL);
+ Glib::ustring result = Glib::build_filename(basepath, Glib::build_filename("share/glom/pixmaps", filename));
g_free(basepath);
return result;
#else
Modified: trunk/glom/utility_widgets/layouttoolbarbutton.cc
==============================================================================
--- trunk/glom/utility_widgets/layouttoolbarbutton.cc (original)
+++ trunk/glom/utility_widgets/layouttoolbarbutton.cc Fri Mar 13 18:47:17 2009
@@ -26,8 +26,8 @@
std::string get_icon_path(const std::string& filename)
{
#ifdef G_OS_WIN32
- gchar* basepath = g_win32_get_package_installation_subdirectory(NULL, NULL, "share/glom/pixmaps");
- const std::string result = Glib::build_filename(basepath, filename);
+ gchar* basepath = g_win32_get_package_installation_directory_of_module(NULL);
+ const std::string result = Glib::build_filename(basepath, Glib::build_filename("share/glom/pixmaps", filename));
g_free(basepath);
return result;
#else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]