[glom] Move .glade files into subdirectories under ui/
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Move .glade files into subdirectories under ui/
- Date: Thu, 23 Jun 2011 10:58:57 +0000 (UTC)
commit 61ac2c6f0efdec2720abe422b6d837d38a02f17a
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Jun 23 12:03:03 2011 +0200
Move .glade files into subdirectories under ui/
ChangeLog | 4 ++++
Makefile.am | 9 +++++++--
glom/glade_utils.h | 15 +++++++++------
po/POTFILES.in | 4 ++--
ui/{ => developer}/glom_developer.glade | 0
ui/{ => operator}/glom.glade | 0
6 files changed, 22 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 440d4de..ef9cbd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-06-23 Murray Cumming <murrayc murrayc com>
+ Move .glade files into subdirectories under ui/
+
+2011-06-23 Murray Cumming <murrayc murrayc com>
+
Move .glade files into a ui/ directory.
* glom/glom.glade:
diff --git a/Makefile.am b/Makefile.am
index 080965a..2c0d933 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -80,8 +80,13 @@ include Makefile_tests.am
dist_pkgdata_DATA = glom/glom_document.dtd
-gladedir = $(pkgdatadir)/glade
-dist_glade_DATA = ui/glom.glade ui/glom_developer.glade
+
+glade_operatordir = $(pkgdatadir)/glade/operator
+dist_glade_operator_DATA = ui/operator/glom.glade
+
+glade_developerdir = $(pkgdatadir)/glade/developer
+dist_glade_developer_DATA = ui/developer/glom_developer.glade
+
xsltdir = $(pkgdatadir)/xslt
dist_xslt_DATA = xslt/print_details_to_html.xsl xslt/print_report_to_html.xsl
diff --git a/glom/glade_utils.h b/glom/glade_utils.h
index ef1411a..efa7f02 100644
--- a/glom/glade_utils.h
+++ b/glom/glade_utils.h
@@ -34,7 +34,6 @@ namespace Utils
inline std::string get_glade_file_path(const std::string& filename)
{
- // Check the path to the installed .glade file:
#ifdef G_OS_WIN32
gchar* directory = g_win32_get_package_installation_directory_of_module(0);
const std::string result = Glib::build_filename(directory, Glib::build_filename("share/glom/glade", filename));
@@ -85,11 +84,13 @@ void helper_get_glade_widget_derived_with_warning(const std::string& filename, c
}
}
+/*
template<class T_Widget>
-void helper_get_glade_widget_derived_with_warning(const Glib::ustring& id, T_Widget*& widget)
+void helper_get_glade_widget_derived_with_warning(const Glib::ustring&id, T_Widget*& widget)
{
helper_get_glade_widget_derived_with_warning("glom.glade", id, widget);
}
+*/
/** This should be used with classes that have a static glade_id member.
*/
@@ -98,10 +99,12 @@ void get_glade_widget_derived_with_warning(T_Widget*& widget)
{
widget = 0;
- if(T_Widget::glade_developer)
- helper_get_glade_widget_derived_with_warning("glom_developer.glade", T_Widget::glade_id, widget);
- else
- helper_get_glade_widget_derived_with_warning("glom.glade", T_Widget::glade_id, widget);
+ // Check the path to the installed .glade file:
+ const Glib::ustring filename = T_Widget::glade_developer ?
+ Glib::build_filename("developer", "glom_developer.glade") :
+ Glib::build_filename("operator", "glom.glade");
+
+ helper_get_glade_widget_derived_with_warning(filename, T_Widget::glade_id, widget);
}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cf1df47..ed7f1de 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -132,5 +132,5 @@ glom/utility_widgets/layoutwidgetmenu.cc
glom/utility_widgets/layoutwidgetutils.cc
glom/utility_widgets/notebooklabelglom.cc
glom/xsl_utils.cc
-ui/glom_developer.glade
-ui/glom.glade
+ui/operator/glom.glade
+ui/developer/glom_developer.glade
diff --git a/ui/glom_developer.glade b/ui/developer/glom_developer.glade
similarity index 100%
rename from ui/glom_developer.glade
rename to ui/developer/glom_developer.glade
diff --git a/ui/glom.glade b/ui/operator/glom.glade
similarity index 100%
rename from ui/glom.glade
rename to ui/operator/glom.glade
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]