glom r1398 - in trunk: . glom glom/layout_item_dialogs glom/libglom glom/mode_data glom/mode_design/fields glom/mode_design/print_layouts glom/mode_design/script_library glom/mode_design/users glom/reports glom/translation glom/utility_widgets



Author: arminb
Date: Sun Jan 27 19:39:43 2008
New Revision: 1398
URL: http://svn.gnome.org/viewvc/glom?rev=1398&view=rev

Log:
2008-01-27  Armin Burgmeier  <armin openismus com>

	* glom/libglom/glade_utils.h: Added Utils::get_glade_file_path() to
	locate the glade file relative to the application executable on
	Windows.

	* glom/dialog_invalid_data.cc:
	* glom/libglom/spawn_with_feedback.cc:
	* glom/utility_widgets/datawidget.cc:
	* glom/frame_glom.cc:
	* glom/layout_item_dialogs/dialog_field_layout.cc:
	* glom/layout_item_dialogs/dialog_group_by.cc:
	* glom/reports/dialog_layout_report.cc:
	* glom/translation/window_translations.cc:
	* glom/base_db.cc:
	* glom/main.cc:
	* glom/mode_data/dialog_layout_details.cc:
	* glom/mode_data/flowtablewithfields.cc:
	* glom/mode_data/box_data_list_related.cc:
	* glom/mode_data/box_data_list.cc:
	* glom/mode_data/box_data_details.cc:
	* glom/filechooser_export.cc:
	* glom/application.cc:
	* glom/mode_design/script_library/dialog_script_library.cc:
	* glom/mode_design/users/dialog_users_list.cc:
	* glom/mode_design/users/dialog_groups_list.cc:
	* glom/mode_design/fields/dialog_fielddefinition.cc:
	* glom/mode_design/fields/box_db_table_definition.cc:
	* glom/mode_design/print_layouts/dialog_text_formatting.cc:
	* glom/mode_design/print_layouts/canvas_print_layout.cc: Use
	Utils::get_glade_file_path() to load the glade files.


Modified:
   trunk/ChangeLog
   trunk/glom/application.cc
   trunk/glom/base_db.cc
   trunk/glom/dialog_invalid_data.cc
   trunk/glom/filechooser_export.cc
   trunk/glom/frame_glom.cc
   trunk/glom/layout_item_dialogs/dialog_field_layout.cc
   trunk/glom/layout_item_dialogs/dialog_group_by.cc
   trunk/glom/libglom/glade_utils.h
   trunk/glom/libglom/spawn_with_feedback.cc
   trunk/glom/main.cc
   trunk/glom/mode_data/box_data_details.cc
   trunk/glom/mode_data/box_data_list.cc
   trunk/glom/mode_data/box_data_list_related.cc
   trunk/glom/mode_data/dialog_layout_details.cc
   trunk/glom/mode_data/flowtablewithfields.cc
   trunk/glom/mode_design/fields/box_db_table_definition.cc
   trunk/glom/mode_design/fields/dialog_fielddefinition.cc
   trunk/glom/mode_design/print_layouts/canvas_print_layout.cc
   trunk/glom/mode_design/print_layouts/dialog_text_formatting.cc
   trunk/glom/mode_design/script_library/dialog_script_library.cc
   trunk/glom/mode_design/users/dialog_groups_list.cc
   trunk/glom/mode_design/users/dialog_users_list.cc
   trunk/glom/reports/dialog_layout_report.cc
   trunk/glom/translation/window_translations.cc
   trunk/glom/utility_widgets/datawidget.cc

Modified: trunk/glom/application.cc
==============================================================================
--- trunk/glom/application.cc	(original)
+++ trunk/glom/application.cc	Sun Jan 27 19:39:43 2008
@@ -778,10 +778,10 @@
 Bakery::App* App_Glom::new_instance() //Override
 {
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "window_main");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "window_main");
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "window_main", "", error);
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "window_main", "", error);
   if(error.get()) return NULL;
 #endif
   App_Glom* pApp_Glom = 0;
@@ -1127,10 +1127,10 @@
 {
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   //Offer to load an existing document, or start a new one.
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "dialog_existing_or_new");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "dialog_existing_or_new");
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "dialog_existing_or_new", "", error);
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "dialog_existing_or_new", "", error);
   if(error.get())
     return false;
 #endif
@@ -1449,7 +1449,7 @@
   //Show the user that something is happening, because the INSERTS might take time.
   //TOOD: This doesn't actually show up until near the end, even with Gtk::Main::instance()->iteration().
   std::auto_ptr<Dialog_ProgressCreating> dialog_progress;
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "window_progress");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "window_progress");
   if(refXml)
   {
     Dialog_ProgressCreating* dialog_progress_temp = 0;
@@ -2283,7 +2283,7 @@
 
 void App_Glom::on_menu_developer_changelanguage()
 {
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_change_language");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_change_language");
   if(refXml)
   {
     Dialog_ChangeLanguage* dialog = 0;
@@ -2314,7 +2314,7 @@
 {
   if(!m_window_translations)
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_translations");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_translations");
     refXml->get_widget_derived("window_translations", m_window_translations);
     if(m_window_translations)
     {

Modified: trunk/glom/base_db.cc
==============================================================================
--- trunk/glom/base_db.cc	(original)
+++ trunk/glom/base_db.cc	Sun Jan 27 19:39:43 2008
@@ -37,6 +37,7 @@
 
 //#include "reports/dialog_layout_report.h"
 #include <glom/libglom/utils.h>
+#include <glom/libglom/glade_utils.h>
 #include <glom/libglom/data_structure/glomconversions.h>
 #include <glom/libglom/data_structure/layout/report_parts/layoutitem_summary.h>
 #include <glom/libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.h>
@@ -1299,7 +1300,7 @@
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
-    refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_field");
+    refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field");
   }
   catch(const Gnome::Glade::XmlError& ex)
   {
@@ -1308,7 +1309,7 @@
   }
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_field", "", error);
+  refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field", "", error);
   if(error.get())
   {
     std::cerr << error->what() << std::endl;
@@ -1346,7 +1347,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_layout_field_properties");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_layout_field_properties");
 
     Dialog_FieldLayout* dialog = 0;
     refXml->get_widget_derived("dialog_layout_field_properties", dialog);
@@ -1386,7 +1387,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_textobject");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_textobject");
 
     Dialog_TextObject* dialog = 0;
     refXml->get_widget_derived("window_textobject", dialog);
@@ -1421,7 +1422,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_imageobject");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_imageobject");
 
     Dialog_ImageObject* dialog = 0;
     refXml->get_widget_derived("window_imageobject", dialog);
@@ -1456,7 +1457,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "dialog_notebook");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "dialog_notebook");
 
     Dialog_Notebook* dialog = 0;
     refXml->get_widget_derived("dialog_notebook", dialog);

Modified: trunk/glom/dialog_invalid_data.cc
==============================================================================
--- trunk/glom/dialog_invalid_data.cc	(original)
+++ trunk/glom/dialog_invalid_data.cc	Sun Jan 27 19:39:43 2008
@@ -21,6 +21,7 @@
 #include "dialog_invalid_data.h"
 #include <glom/libglom/data_structure/glomconversions.h>
 #include <glom/libglom/utils.h>
+#include <glom/libglom/glade_utils.h>
 
 namespace Glom
 {
@@ -32,10 +33,10 @@
 {
   //TODO: Share a global instance, to make this quicker?
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "dialog_data_invalid_format");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "dialog_data_invalid_format");
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "dialog_data_invalid_format", "", error);
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "dialog_data_invalid_format", "", error);
   if(error.get())
   {
     std::cerr << "glom_show_dialog_invalid_data() failed: " << error->what() << std::endl;

Modified: trunk/glom/filechooser_export.cc
==============================================================================
--- trunk/glom/filechooser_export.cc	(original)
+++ trunk/glom/filechooser_export.cc	Sun Jan 27 19:39:43 2008
@@ -21,6 +21,7 @@
 #include "filechooser_export.h"
 #include "mode_data/dialog_layout_export.h"
 #include <glom/libglom/utils.h>
+#include <glom/libglom/glade_utils.h>
 #include <gtkmm/stock.h>
 #include <glibmm/i18n.h>
 
@@ -47,10 +48,10 @@
 
   //TODO: Use a generic layout dialog?
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_data_layout_export");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_data_layout_export");
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "window_data_layout_export", "", error);
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_data_layout_export", "", error);
   // Ignore error, refXml is checked below
 #endif
 

Modified: trunk/glom/frame_glom.cc
==============================================================================
--- trunk/glom/frame_glom.cc	(original)
+++ trunk/glom/frame_glom.cc	Sun Jan 27 19:39:43 2008
@@ -745,7 +745,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_add_related_table");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_add_related_table");
 
     refXml->get_widget_derived("dialog_add_related_table", m_dialog_addrelatedtable);
   }
@@ -1191,7 +1191,7 @@
   Dialog_Database_Preferences* dialog = 0;
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_database_preferences");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_database_preferences");
     refXml->get_widget_derived("dialog_database_preferences", dialog);
     if(dialog)
     {
@@ -1228,7 +1228,7 @@
   {
     try
     {
-      Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_design");
+      Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_design");
 
       refXml->get_widget_derived("window_design", m_pDialog_Fields);
       m_pDialog_Fields->signal_hide().connect( sigc::mem_fun(*this, &Frame_Glom::on_developer_dialog_hide));
@@ -1315,7 +1315,7 @@
   Dialog_GroupsList* dialog = 0;
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_groups");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_groups");
 
     refXml->get_widget_derived("window_groups", dialog);
   }
@@ -1415,7 +1415,7 @@
 void Frame_Glom::on_menu_developer_script_library()
 {
   Dialog_ScriptLibrary* dialog = 0;
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_script_library");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_script_library");
   refXml->get_widget_derived("dialog_script_library", dialog);
   dialog->set_transient_for(*(get_app_window()));
   add_view(dialog); //Give it access to the document.
@@ -1512,7 +1512,7 @@
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
     try
     {
-      refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_new_self_hosted_connection");
+      refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_new_self_hosted_connection");
     }
     catch(const Gnome::Glade::XmlError& ex)
     {
@@ -1521,7 +1521,7 @@
     }
 #else
     std::auto_ptr<Gnome::Glade::XmlError> error;
-    refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_new_self_hosted_connection", error);
+    refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_new_self_hosted_connection", error);
     if(error.get())
     {
       std::cerr << error->what() << std::endl;
@@ -1840,7 +1840,7 @@
       try
       {
          // TODO: Tell the user what has gone wrong (ex.what())
-        Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_error_create_database");
+        Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_error_create_database");
         refXml->get_widget("dialog_error_create_database", dialog);
         dialog->set_transient_for(*pWindowApp);
         Glom::Utils::dialog_run_with_help(dialog, "dialog_error_create_database");

Modified: trunk/glom/layout_item_dialogs/dialog_field_layout.cc
==============================================================================
--- trunk/glom/layout_item_dialogs/dialog_field_layout.cc	(original)
+++ trunk/glom/layout_item_dialogs/dialog_field_layout.cc	Sun Jan 27 19:39:43 2008
@@ -20,6 +20,7 @@
 
 #include "dialog_field_layout.h"
 #include <glom/libglom/data_structure/glomconversions.h>
+#include <glom/libglom/glade_utils.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -53,7 +54,7 @@
   //Get the formatting stuff:
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXmlFormatting = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "box_formatting");
+    Glib::RefPtr<Gnome::Glade::Xml> refXmlFormatting = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "box_formatting");
     refXmlFormatting->get_widget_derived("box_formatting", m_box_formatting);
   }
   catch(const Gnome::Glade::XmlError& ex)

Modified: trunk/glom/layout_item_dialogs/dialog_group_by.cc
==============================================================================
--- trunk/glom/layout_item_dialogs/dialog_group_by.cc	(original)
+++ trunk/glom/layout_item_dialogs/dialog_group_by.cc	Sun Jan 27 19:39:43 2008
@@ -20,6 +20,7 @@
 
 #include "dialog_group_by.h"
 #include <glom/libglom/data_structure/glomconversions.h>
+#include <glom/libglom/glade_utils.h>
 #include <sstream> //For stringstream
 #include <glibmm/i18n.h>
 
@@ -128,7 +129,7 @@
 {
   if(!m_dialog_choose_sort_fields)
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_groupby_sort_fields");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_groupby_sort_fields");
     if(refXml)
     {
       refXml->get_widget_derived("dialog_groupby_sort_fields", m_dialog_choose_sort_fields);
@@ -158,7 +159,7 @@
 {
   if(!m_dialog_choose_secondary_fields)
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_groupby_secondary_fields");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_groupby_secondary_fields");
     if(refXml)
     {
       refXml->get_widget_derived("dialog_groupby_secondary_fields", m_dialog_choose_secondary_fields);

Modified: trunk/glom/libglom/glade_utils.h
==============================================================================
--- trunk/glom/libglom/glade_utils.h	(original)
+++ trunk/glom/libglom/glade_utils.h	Sun Jan 27 19:39:43 2008
@@ -21,6 +21,7 @@
 #ifndef GLOM_GLADE_UTILS_H
 #define GLOM_GLADE_UTILS_H
 
+#include <iostream> // For std::cerr
 #include <libglademm.h>
 
 namespace Glom
@@ -29,6 +30,18 @@
 namespace Utils
 {
 
+inline std::string get_glade_file_path(const std::string& filename)
+{
+#ifdef G_OS_WIN32
+  gchar* packdir = g_win32_get_package_installation_directory(NULL, NULL);
+  std::string result = Glib::build_filename(packdir, filename);
+  g_free(packdir);
+  return result;
+#else
+  return GLOM_GLADEDIR + filename;
+#endif
+}
+
 template<class T_Widget>
 void get_glade_widget_derived_with_warning(const Glib::ustring& id, T_Widget*& widget)
 {
@@ -37,7 +50,7 @@
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
-    refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", id);
+    refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), id);
   }
   catch(const Gnome::Glade::XmlError& ex)
   {
@@ -45,7 +58,7 @@
   }
 #else
   error.reset(NULL);
-  refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", id, "", error);
+  refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), id, "", error);
   if(error.get()) std::cerr << error->what() << std::endl;
 #endif
 
@@ -63,7 +76,7 @@
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
-    refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", id);
+    refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), id);
   }
   catch(const Gnome::Glade::XmlError& ex)
   {
@@ -71,7 +84,7 @@
   }
 #else
   error.reset(NULL);
-  refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", id, "", error);
+  refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), id, "", error);
   if(error.get()) std::cerr << error->what() << std::endl;
 #endif
 
@@ -89,7 +102,7 @@
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
-    refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", id);
+    refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), id);
   }
   catch(const Gnome::Glade::XmlError& ex)
   {
@@ -97,7 +110,7 @@
   }
 #else
   error.reset(NULL);
-  refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", id, "", error);
+  refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), id, "", error);
   if(error.get()) std::cerr << error->what() << std::endl;
 #endif
 

Modified: trunk/glom/libglom/spawn_with_feedback.cc
==============================================================================
--- trunk/glom/libglom/spawn_with_feedback.cc	(original)
+++ trunk/glom/libglom/spawn_with_feedback.cc	Sun Jan 27 19:39:43 2008
@@ -20,6 +20,7 @@
 
 #include <glom/libglom/spawn_with_feedback.h>
 #include <glom/libglom/dialog_progress_creating.h>
+#include <glom/libglom/glade_utils.h>
 #include <bakery/bakery.h>
 #include <glibmm/i18n.h>
 #include <iostream>
@@ -133,10 +134,10 @@
 static Dialog_ProgressCreating* get_and_show_pulse_dialog(const Glib::ustring& message, Gtk::Window* parent_window)
 {
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "window_progress");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "window_progress");
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "window_progress", "", error);
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "window_progress", "", error);
   if(error.get()) return NULL;
 #endif
 

Modified: trunk/glom/main.cc
==============================================================================
--- trunk/glom/main.cc	(original)
+++ trunk/glom/main.cc	Sun Jan 27 19:39:43 2008
@@ -41,6 +41,7 @@
 #endif
 
 #include "application.h"
+#include <glom/libglom/glade_utils.h>
 
 namespace Glom
 {
@@ -214,10 +215,10 @@
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
     // Main app
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "window_main");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Glom::Utils::get_glade_file_path("glom.glade"), "window_main");
 #else
     std::auto_ptr<Gnome::Glade::XmlError> error;
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "window_main", "", error);
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Glom::Utils::get_glade_file_path("glom.glade"), "window_main", "", error);
     if(error.get())
     {
       std::cerr << "Glom: exception: \n  " << error->what() << std::endl;

Modified: trunk/glom/mode_data/box_data_details.cc
==============================================================================
--- trunk/glom/mode_data/box_data_details.cc	(original)
+++ trunk/glom/mode_data/box_data_details.cc	Sun Jan 27 19:39:43 2008
@@ -24,6 +24,7 @@
 #include <glom/libglom/data_structure/relationship.h>
 #include <glom/libglom/data_structure/glomconversions.h>
 #include "dialog_layout_details.h"
+#include <glom/libglom/glade_utils.h>
 #include <glom/libglom/utils.h>
 #include <glom/glom_privs.h>
 #include "../xsl_utils.h"
@@ -60,7 +61,7 @@
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //TODO_Performance: Instantiate this only when needed:
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_data_layout"); //TODO: Use a generic layout dialog?
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_data_layout"); //TODO: Use a generic layout dialog?
   if(refXml)
   {
     Dialog_Layout_Details* dialog = 0;

Modified: trunk/glom/mode_data/box_data_list.cc
==============================================================================
--- trunk/glom/mode_data/box_data_list.cc	(original)
+++ trunk/glom/mode_data/box_data_list.cc	Sun Jan 27 19:39:43 2008
@@ -20,6 +20,7 @@
 
 #include "box_data_list.h"
 #include <glom/libglom/data_structure/glomconversions.h>
+#include <glom/libglom/glade_utils.h>
 #include <glom/reports/report_builder.h>
 #include "dialog_layout_list.h"
 #include <glom/glom_privs.h>
@@ -38,7 +39,7 @@
   m_layout_name = "list";
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_data_layout"); //TODO: Use a generic layout dialog?
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_data_layout"); //TODO: Use a generic layout dialog?
   if(refXml)
   {
     Dialog_Layout_List* dialog = 0;

Modified: trunk/glom/mode_data/box_data_list_related.cc
==============================================================================
--- trunk/glom/mode_data/box_data_list_related.cc	(original)
+++ trunk/glom/mode_data/box_data_list_related.cc	Sun Jan 27 19:39:43 2008
@@ -21,6 +21,7 @@
 #include "box_data_list_related.h"
 #include "dialog_layout_list_related.h"
 #include <glom/libglom/data_structure/glomconversions.h>
+#include <glom/libglom/glade_utils.h>
 #include <glom/frame_glom.h> //For show_ok_dialog()
 #include <bakery/App/App_Gtk.h> //For util_bold_message().
 #include <glibmm/i18n.h>
@@ -65,7 +66,7 @@
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_data_layout");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_data_layout");
   if(refXml)
   {
     Dialog_Layout_List_Related* dialog = 0;

Modified: trunk/glom/mode_data/dialog_layout_details.cc
==============================================================================
--- trunk/glom/mode_data/dialog_layout_details.cc	(original)
+++ trunk/glom/mode_data/dialog_layout_details.cc	Sun Jan 27 19:39:43 2008
@@ -22,6 +22,7 @@
 #include "dialog_choose_relationship.h"
 #include "../layout_item_dialogs/dialog_buttonscript.h"
 #include "../layout_item_dialogs/dialog_notebook.h"
+#include <glom/libglom/glade_utils.h>
 #include "../frame_glom.h" //For show_ok_dialog()
 //#include <libgnome/gnome-i18n.h>
 #include <bakery/App/App_Gtk.h> //For util_bold_message().
@@ -523,7 +524,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_button_script");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_button_script");
 
     Dialog_ButtonScript* dialog = 0;
     refXml->get_widget_derived("window_button_script", dialog);
@@ -558,7 +559,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_textobject");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_textobject");
 
     Dialog_TextObject* dialog = 0;
     refXml->get_widget_derived("window_textobject", dialog);
@@ -598,7 +599,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_relationship");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_relationship");
 
     Dialog_ChooseRelationship* dialog = 0;
     refXml->get_widget_derived("dialog_choose_relationship", dialog);

Modified: trunk/glom/mode_data/flowtablewithfields.cc
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.cc	(original)
+++ trunk/glom/mode_data/flowtablewithfields.cc	Sun Jan 27 19:39:43 2008
@@ -28,6 +28,7 @@
 #include "../application.h"
 #include <gtkmm/checkbutton.h>
 #include <glom/libglom/data_structure/glomconversions.h>
+#include <glom/libglom/glade_utils.h>
 #include "box_data_list_related.h"
 #include "dialog_choose_relationship.h"
 #include <bakery/App/App_Gtk.h> //For util_bold_message().
@@ -1007,7 +1008,7 @@
   {
     try
     {
-      Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_relationship");
+      Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_relationship");
 
       Dialog_ChooseRelationship* dialog = 0;
       refXml->get_widget_derived("dialog_choose_relationship", dialog);
@@ -1274,7 +1275,7 @@
   sharedptr<LayoutItem_Portal> layout_item(0);
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "dialog_choose_relationship");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "dialog_choose_relationship");
 
     Dialog_ChooseRelationship* dialog = 0;
     refXml->get_widget_derived("dialog_choose_relationship", dialog);

Modified: trunk/glom/mode_design/fields/box_db_table_definition.cc
==============================================================================
--- trunk/glom/mode_design/fields/box_db_table_definition.cc	(original)
+++ trunk/glom/mode_design/fields/box_db_table_definition.cc	Sun Jan 27 19:39:43 2008
@@ -20,6 +20,7 @@
 
 #include "box_db_table_definition.h"
 #include <glom/frame_glom.h>
+#include <glom/libglom/glade_utils.h>
 #include <bakery/App/App_Gtk.h> //For util_bold_message().
 #include <glom/glom_postgres.h>
 #include "../../../config.h"
@@ -43,7 +44,7 @@
 {
   //m_strHint = _("Click [Edit] to edit the field definition in more detail.\nUse the Mode menu to see Data or perform a Find.");
 
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_field_definition_edit");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_field_definition_edit");
   if(refXml)
     refXml->get_widget_derived("window_field_definition_edit", m_pDialog);
 

Modified: trunk/glom/mode_design/fields/dialog_fielddefinition.cc
==============================================================================
--- trunk/glom/mode_design/fields/dialog_fielddefinition.cc	(original)
+++ trunk/glom/mode_design/fields/dialog_fielddefinition.cc	Sun Jan 27 19:39:43 2008
@@ -20,6 +20,7 @@
 
 #include "dialog_fielddefinition.h"
 #include "dialog_fieldcalculation.h"
+#include <glom/libglom/glade_utils.h>
 #include "../../box_db_table.h"
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
@@ -84,7 +85,7 @@
   //Get the formatting stuff:
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXmlFormatting = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "box_formatting");
+    Glib::RefPtr<Gnome::Glade::Xml> refXmlFormatting = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "box_formatting");
     refXmlFormatting->get_widget_derived("box_formatting", m_box_formatting);
   }
   catch(const Gnome::Glade::XmlError& ex)

Modified: trunk/glom/mode_design/print_layouts/canvas_print_layout.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/canvas_print_layout.cc	(original)
+++ trunk/glom/mode_design/print_layouts/canvas_print_layout.cc	Sun Jan 27 19:39:43 2008
@@ -23,6 +23,7 @@
 #include <bakery/App/App_Gtk.h> //For util_bold_message().
 #include <gtkmm/stock.h>
 #include <glom/mode_design/print_layouts/dialog_text_formatting.h>
+#include <glom/libglom/glade_utils.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -337,7 +338,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXmlFormatting = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_text_format");
+    Glib::RefPtr<Gnome::Glade::Xml> refXmlFormatting = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_text_format");
     refXmlFormatting->get_widget_derived("window_text_format", m_dialog_format);
     add_view(m_dialog_format);
 

Modified: trunk/glom/mode_design/print_layouts/dialog_text_formatting.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/dialog_text_formatting.cc	(original)
+++ trunk/glom/mode_design/print_layouts/dialog_text_formatting.cc	Sun Jan 27 19:39:43 2008
@@ -20,6 +20,7 @@
 
 #include "dialog_text_formatting.h"
 #include <glom/box_db_table.h>
+#include <glom/libglom/glade_utils.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -41,7 +42,7 @@
   //Get the formatting stuff:
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXmlFormatting = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "box_formatting");
+    Glib::RefPtr<Gnome::Glade::Xml> refXmlFormatting = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "box_formatting");
     refXmlFormatting->get_widget_derived("box_formatting", m_box_formatting);
   }
   catch(const Gnome::Glade::XmlError& ex)

Modified: trunk/glom/mode_design/script_library/dialog_script_library.cc
==============================================================================
--- trunk/glom/mode_design/script_library/dialog_script_library.cc	(original)
+++ trunk/glom/mode_design/script_library/dialog_script_library.cc	Sun Jan 27 19:39:43 2008
@@ -22,6 +22,7 @@
 #include "dialog_script_library.h"
 #include "../../python_embed/glom_python.h"
 #include <glom/libglom/data_structure/glomconversions.h>
+#include <glom/libglom/glade_utils.h>
 #include <glom/mode_design/script_library/dialog_new_script.h>
 #include <gtksourceviewmm/sourcelanguagemanager.h>
 #include <glom/application.h>
@@ -90,7 +91,7 @@
   Dialog_NewScript* dialog = 0;
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_new_library_script");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_new_library_script");
 
     refXml->get_widget_derived("dialog_new_library_script", dialog);
   }

Modified: trunk/glom/mode_design/users/dialog_groups_list.cc
==============================================================================
--- trunk/glom/mode_design/users/dialog_groups_list.cc	(original)
+++ trunk/glom/mode_design/users/dialog_groups_list.cc	Sun Jan 27 19:39:43 2008
@@ -23,6 +23,7 @@
 #include "dialog_users_list.h"
 #include "dialog_new_group.h"
 #include <glom/libglom/standard_table_prefs_fields.h>
+#include <glom/libglom/glade_utils.h>
 #include <glom/glom_privs.h>
 //#include <libgnome/gnome-i18n.h>
 #include <bakery/App/App_Gtk.h> //For util_bold_message().
@@ -238,7 +239,7 @@
   Dialog_NewGroup* dialog = 0;
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_new_group");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_new_group");
 
     refXml->get_widget_derived("dialog_new_group", dialog);
   }
@@ -297,7 +298,7 @@
       Dialog_UsersList* dialog = 0;
       try
       {
-        Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "window_users");
+        Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "window_users");
 
         refXml->get_widget_derived("window_users", dialog);
       }

Modified: trunk/glom/mode_design/users/dialog_users_list.cc
==============================================================================
--- trunk/glom/mode_design/users/dialog_users_list.cc	(original)
+++ trunk/glom/mode_design/users/dialog_users_list.cc	Sun Jan 27 19:39:43 2008
@@ -22,6 +22,7 @@
 #include "dialog_user.h"
 #include "dialog_choose_user.h"
 #include <glom/glom_privs.h>
+#include <glom/libglom/glade_utils.h>
 #include <bakery/App/App_Gtk.h> //For util_bold_message().
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
@@ -187,7 +188,7 @@
   Dialog_ChooseUser* dialog = 0;
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_user");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_user");
 
     refXml->get_widget_derived("dialog_choose_user", dialog);
   }
@@ -234,7 +235,7 @@
   Dialog_User* dialog = 0;
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_user");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_user");
 
     refXml->get_widget_derived("dialog_user", dialog);
   }
@@ -300,7 +301,7 @@
       Dialog_User* dialog = 0;
       try
       {
-        Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_user");
+        Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_user");
 
         refXml->get_widget_derived("dialog_user", dialog);
       }

Modified: trunk/glom/reports/dialog_layout_report.cc
==============================================================================
--- trunk/glom/reports/dialog_layout_report.cc	(original)
+++ trunk/glom/reports/dialog_layout_report.cc	Sun Jan 27 19:39:43 2008
@@ -28,6 +28,7 @@
 #include <glom/libglom/data_structure/layout/layoutitem_field.h>
 #include <glom/libglom/data_structure/layout/layoutitem_text.h>
 #include <glom/libglom/data_structure/layout/layoutitem_image.h>
+#include <glom/libglom/glade_utils.h>
 #include "../mode_data/dialog_choose_field.h"
 #include "../layout_item_dialogs/dialog_field_layout.h"
 #include "../layout_item_dialogs/dialog_group_by.h"
@@ -682,7 +683,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_relationship");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_relationship");
 
     Dialog_ChooseRelationship* dialog = 0;
     refXml->get_widget_derived("dialog_choose_relationship", dialog);
@@ -819,7 +820,7 @@
       {
         try
         {
-          Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_field_summary");
+          Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_field_summary");
 
           Dialog_FieldSummary* dialog = 0;
           refXml->get_widget_derived("dialog_field_summary", dialog);
@@ -901,7 +902,7 @@
               {
                 try
                 {
-                  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_group_by");
+                  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_group_by");
   
                   Dialog_GroupBy* dialog = 0;
                   refXml->get_widget_derived("dialog_group_by", dialog);

Modified: trunk/glom/translation/window_translations.cc
==============================================================================
--- trunk/glom/translation/window_translations.cc	(original)
+++ trunk/glom/translation/window_translations.cc	Sun Jan 27 19:39:43 2008
@@ -24,6 +24,7 @@
 #include "dialog_copy_translation.h"
 #include <bakery/App/App_Gtk.h> //For util_bold_message().
 #include "glom/libglom/utils.h"
+#include "glom/libglom/glade_utils.h"
 
 #include <glibmm/i18n.h>
 
@@ -124,7 +125,7 @@
 
 void Window_Translations::on_button_identify()
 {
-  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_translation_identify_original");
+  Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_translation_identify_original");
   if(refXml)
   {
     Dialog_IdentifyOriginal* dialog = 0;
@@ -354,7 +355,7 @@
 
 void Window_Translations::on_button_copy_translation()
 {
-   Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_translation_copy");
+   Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_translation_copy");
   if(refXml)
   {
     Dialog_CopyTranslation* dialog = 0;

Modified: trunk/glom/utility_widgets/datawidget.cc
==============================================================================
--- trunk/glom/utility_widgets/datawidget.cc	(original)
+++ trunk/glom/utility_widgets/datawidget.cc	Sun Jan 27 19:39:43 2008
@@ -32,6 +32,7 @@
 #include "dialog_choose_date.h"
 #include "../layout_item_dialogs/dialog_field_layout.h"
 #include <glom/libglom/utils.h>
+#include <glom/libglom/glade_utils.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -566,7 +567,7 @@
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
-    refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_field");
+    refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field");
   }
   catch(const Gnome::Glade::XmlError& ex)
   {
@@ -575,7 +576,7 @@
   }
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_field", "", error);
+  refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_field", "", error);
   if(error.get())
   {
     std::cerr << error->what() << std::endl;
@@ -611,7 +612,7 @@
 
   try
   {
-    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_layout_field_properties");
+    Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_layout_field_properties");
 
     Dialog_FieldLayout* dialog = 0;
     refXml->get_widget_derived("dialog_layout_field_properties", dialog);
@@ -748,7 +749,7 @@
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
-    refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_date");
+    refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_date");
   }
   catch(const Gnome::Glade::XmlError& ex)
   {
@@ -757,7 +758,7 @@
   }
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom_developer.glade", "dialog_choose_date", "", error);
+  refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom_developer.glade"), "dialog_choose_date", "", error);
   if(error.get())
   {
     std::cerr << error->what() << std::endl;
@@ -805,7 +806,7 @@
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
-    refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "dialog_find_id");
+    refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "dialog_find_id");
   }
   catch(const Gnome::Glade::XmlError& ex)
   {
@@ -814,7 +815,7 @@
   }
 #else
   std::auto_ptr<Gnome::Glade::XmlError> error;
-  refXml = Gnome::Glade::Xml::create(GLOM_GLADEDIR "glom.glade", "dialog_find_id", "", error);
+  refXml = Gnome::Glade::Xml::create(Utils::get_glade_file_path("glom.glade"), "dialog_find_id", "", error);
   if(error.get())
   {
     std::cerr << error->what() << std::endl;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]