[nautilus-actions] Store UI elements in a dedicated subdirectory



commit adccda254f5f3c2be41d9cc62b36c53edbaf53d6
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Feb 22 22:54:59 2012 +0100

    Store UI elements in a dedicated subdirectory

 ChangeLog                             |   16 ++++++++++++++++
 src/core/Makefile.am                  |   10 ++++++----
 src/core/na-importer-ask.c            |    2 +-
 src/nact/Makefile.am                  |    8 +++++---
 src/nact/base-gtk-utils.c             |    4 ++--
 src/nact/nact-add-capability-dialog.c |    2 +-
 src/nact/nact-add-scheme-dialog.c     |    2 +-
 src/nact/nact-assistant-export.c      |    2 +-
 src/nact/nact-assistant-import.c      |    2 +-
 src/nact/nact-export-ask.c            |    2 +-
 src/nact/nact-icon-chooser.c          |    2 +-
 src/nact/nact-main-statusbar.c        |    2 +-
 src/nact/nact-main-window.c           |    2 +-
 src/nact/nact-menubar.c               |    4 ++--
 src/nact/nact-preferences-editor.c    |    2 +-
 15 files changed, 41 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3e808bb..18a669f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2012-02-22 Pierre Wieser <pwieser trychlos org>
 
+	* src/core/Makefile.am:
+	* src/nact/Makefile.am: Store UI elements in a dedicated dir.
+
+	* src/core/na-importer-ask.c:
+	* src/nact/base-gtk-utils.c:
+	* src/nact/nact-add-capability-dialog.c:
+	* src/nact/nact-add-scheme-dialog.c:
+	* src/nact/nact-assistant-export.c:
+	* src/nact/nact-assistant-import.c:
+	* src/nact/nact-export-ask.c:
+	* src/nact/nact-icon-chooser.c:
+	* src/nact/nact-main-statusbar.c:
+	* src/nact/nact-main-window.c:
+	* src/nact/nact-menubar.c:
+	* src/nact/nact-preferences-editor.c: Updated accordingly.
+
 	* src/core/Makefile.am: Store import mode images in dedicated dir.
 
 	* src/core/na-importer.c (get_mode_from_struct):
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 0850b3b..3218d1f 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -32,17 +32,19 @@ exportformat_datadir = $(pkgdatadir)/export-format
 
 importmode_datadir = $(pkgdatadir)/import-mode
 
+ui_datadir = $(pkgdatadir)/ui
+
 AM_CPPFLAGS += \
 	-I $(top_srcdir)									\
 	-I $(top_srcdir)/src								\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"			\
-	-DPKGDATADIR=\"$(pkgdatadir)\"						\
 	-DPKGLIBDIR=\""$(pkglibdir)"\"						\
 	-DPKGLIBEXECDIR=\""$(pkglibexecdir)"\"				\
 	-DSYSCONFDIR=\"$(sysconfdir)\"						\
 	-DG_LOG_DOMAIN=\"${NA_LOGDOMAIN_CORE}\"				\
 	-DPKGEXPORTFORMATDIR=\"$(exportformat_datadir)\"	\
-	-DPKGIMPORTMODEDIR=\"$(importmode_datadir)\"	\
+	-DPKGIMPORTMODEDIR=\"$(importmode_datadir)\"		\
+	-DPKGUIDIR=\"$(ui_datadir)\"						\
 	$(NAUTILUS_ACTIONS_CFLAGS)							\
 	$(NULL)
 
@@ -143,7 +145,7 @@ libna_core_la_LDFLAGS = \
 	-fPIC												\
 	$(NULL)
 
-pkgdata_DATA = \
+ui_data_DATA = \
 	na-importer-ask.ui									\
 	$(NULL)
 
@@ -163,7 +165,7 @@ CLEANFILES = \
 	$(NULL)
 
 EXTRA_DIST = \
-	$(pkgdata_DATA)										\
+	$(ui_data_DATA)										\
 	$(exportformat_data_DATA)							\
 	$(importmode_data_DATA)								\
 	na-marshal.def										\
diff --git a/src/core/na-importer-ask.c b/src/core/na-importer-ask.c
index b09a0e4..2e95e2b 100644
--- a/src/core/na-importer-ask.c
+++ b/src/core/na-importer-ask.c
@@ -63,7 +63,7 @@ struct _NAImporterAskPrivate {
 
 static GObjectClass  *st_parent_class = NULL;
 static NAImporterAsk *st_dialog       = NULL;
-static const gchar   *st_uixml        = PKGDATADIR "/na-importer-ask.ui";
+static const gchar   *st_uixml        = PKGUIDIR "/na-importer-ask.ui";
 
 static GType          register_type( void );
 static void           class_init( NAImporterAskClass *klass );
diff --git a/src/nact/Makefile.am b/src/nact/Makefile.am
index 0802964..10ea2ff 100644
--- a/src/nact/Makefile.am
+++ b/src/nact/Makefile.am
@@ -30,14 +30,16 @@ bin_PROGRAMS = \
 	nautilus-actions-config-tool						\
 	$(NULL)
 
+ui_datadir = $(pkgdatadir)/ui
+
 egg_platform_defines = -DEGG_SM_CLIENT_BACKEND_XSMP
 
 AM_CPPFLAGS += \
 	-I $(top_srcdir)									\
 	-I $(top_srcdir)/src								\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"			\
-	-DPKGDATADIR=\"$(pkgdatadir)\"						\
 	-DG_LOG_DOMAIN=\"${NA_LOGDOMAIN_NACT}\"				\
+	-DPKGUIDIR=\"$(ui_datadir)\"						\
 	$(egg_platform_defines)								\
 	$(NAUTILUS_ACTIONS_CFLAGS)							\
 	$(NULL)
@@ -191,7 +193,7 @@ images_files = \
 	transparent.png										\
 	$(NULL)
 
-pkgdata_DATA = \
+ui_data_DATA = \
 	$(actions_files)									\
 	$(ui_files)											\
 	$(images_files)										\
@@ -214,7 +216,7 @@ CLEANFILES = \
 
 EXTRA_DIST = \
 	$(applications_in_files)							\
-	$(pkgdata_DATA)										\
+	$(ui_data_DATA)										\
 	base-marshal.def									\
 	nact-marshal.def									\
 	$(NULL)
diff --git a/src/nact/base-gtk-utils.c b/src/nact/base-gtk-utils.c
index 73c74d0..8c66b16 100644
--- a/src/nact/base-gtk-utils.c
+++ b/src/nact/base-gtk-utils.c
@@ -304,7 +304,7 @@ base_gtk_utils_get_pixbuf( const gchar *name, GtkWidget *widget, GtkIconSize siz
 
 	if( !pixbuf ){
 		g_debug( "%s: null pixbuf, loading transparent image", thisfn );
-		pixbuf = gdk_pixbuf_new_from_file_at_size( PKGDATADIR "/transparent.png", width, height, NULL );
+		pixbuf = gdk_pixbuf_new_from_file_at_size( PKGUIDIR "/transparent.png", width, height, NULL );
 	}
 
 	return( pixbuf );
@@ -335,7 +335,7 @@ base_gtk_utils_render( const gchar *name, GtkImage *widget, GtkIconSize size )
 			width = DEFAULT_WIDTH;
 			height = DEFAULT_HEIGHT;
 		}
-		pixbuf = gdk_pixbuf_new_from_file_at_size( PKGDATADIR "/transparent.png", width, height, NULL );
+		pixbuf = gdk_pixbuf_new_from_file_at_size( PKGUIDIR "/transparent.png", width, height, NULL );
 	}
 
 	if( pixbuf ){
diff --git a/src/nact/nact-add-capability-dialog.c b/src/nact/nact-add-capability-dialog.c
index b12812f..7f76fab 100644
--- a/src/nact/nact-add-capability-dialog.c
+++ b/src/nact/nact-add-capability-dialog.c
@@ -80,7 +80,7 @@ static CapabilityTextStruct st_caps[] = {
 		{ NULL },
 };
 
-static const gchar  *st_xmlui_filename = PKGDATADIR "/nact-add-capability.ui";
+static const gchar  *st_xmlui_filename = PKGUIDIR "/nact-add-capability.ui";
 static const gchar  *st_toplevel_name  = "AddCapabilityDialog";
 static const gchar  *st_wsp_name       = NA_IPREFS_CAPABILITY_ADD_CAPABILITY_WSP;
 
diff --git a/src/nact/nact-add-scheme-dialog.c b/src/nact/nact-add-scheme-dialog.c
index e4013b3..9171f43 100644
--- a/src/nact/nact-add-scheme-dialog.c
+++ b/src/nact/nact-add-scheme-dialog.c
@@ -55,7 +55,7 @@ struct _NactAddSchemeDialogPrivate {
 	gchar   *scheme;
 };
 
-static const gchar  *st_xmlui_filename = PKGDATADIR "/nact-add-scheme.ui";
+static const gchar  *st_xmlui_filename = PKGUIDIR "/nact-add-scheme.ui";
 static const gchar  *st_toplevel_name  = "AddSchemeDialog";
 static const gchar  *st_wsp_name       = NA_IPREFS_SCHEME_ADD_SCHEME_WSP;
 
diff --git a/src/nact/nact-assistant-export.c b/src/nact/nact-assistant-export.c
index ee86cba..b5159b6 100644
--- a/src/nact/nact-assistant-export.c
+++ b/src/nact/nact-assistant-export.c
@@ -95,7 +95,7 @@ typedef struct {
 }
 	ExportStruct;
 
-static const gchar        *st_xmlui_filename = PKGDATADIR "/nact-assistant-export.ui";
+static const gchar        *st_xmlui_filename = PKGUIDIR "/nact-assistant-export.ui";
 static const gchar        *st_toplevel_name  = "ExportAssistant";
 static const gchar        *st_wsp_name       = NA_IPREFS_EXPORT_ASSISTANT_WSP;
 
diff --git a/src/nact/nact-assistant-import.c b/src/nact/nact-assistant-import.c
index 59888ae..76acabc 100644
--- a/src/nact/nact-assistant-import.c
+++ b/src/nact/nact-assistant-import.c
@@ -96,7 +96,7 @@ struct _NactAssistantImportPrivate {
 	GList       *overriden;
 };
 
-static const gchar        *st_xmlui_filename = PKGDATADIR "/nact-assistant-import.ui";
+static const gchar        *st_xmlui_filename = PKGUIDIR "/nact-assistant-import.ui";
 static const gchar        *st_toplevel_name  = "ImportAssistant";
 static const gchar        *st_wsp_name       = NA_IPREFS_IMPORT_ASSISTANT_WSP;
 
diff --git a/src/nact/nact-export-ask.c b/src/nact/nact-export-ask.c
index 67c3bf2..925eacf 100644
--- a/src/nact/nact-export-ask.c
+++ b/src/nact/nact-export-ask.c
@@ -64,7 +64,7 @@ struct _NactExportAskPrivate {
 	gboolean      keep_last_choice_mandatory;
 };
 
-static const gchar     *st_xmlui_filename = PKGDATADIR "/nact-assistant-export.ui";
+static const gchar     *st_xmlui_filename = PKGUIDIR "/nact-assistant-export.ui";
 static const gchar     *st_toplevel_name  = "ExportAskDialog";
 static const gchar     *st_wsp_name       = NA_IPREFS_EXPORT_ASK_USER_WSP;
 
diff --git a/src/nact/nact-icon-chooser.c b/src/nact/nact-icon-chooser.c
index f7652a5..dcfb8cb 100644
--- a/src/nact/nact-icon-chooser.c
+++ b/src/nact/nact-icon-chooser.c
@@ -90,7 +90,7 @@ enum {
 	THEME_ICON_N_COLUMN
 };
 
-static const gchar     *st_xmlui_filename = PKGDATADIR "/nact-icon-chooser.ui";
+static const gchar     *st_xmlui_filename = PKGUIDIR "/nact-icon-chooser.ui";
 static const gchar     *st_toplevel_name  = "IconChooserDialog";
 static const gchar     *st_wsp_name       = NA_IPREFS_ICON_CHOOSER_WSP;
 
diff --git a/src/nact/nact-main-statusbar.c b/src/nact/nact-main-statusbar.c
index 026c1c0..ffe66fa 100644
--- a/src/nact/nact-main-statusbar.c
+++ b/src/nact/nact-main-statusbar.c
@@ -44,7 +44,7 @@ typedef struct {
 }
 	StatusbarTimeoutDisplayStruct;
 
-#define LOCKED_IMAGE					PKGDATADIR "/locked.png"
+#define LOCKED_IMAGE					PKGUIDIR "/locked.png"
 
 static GtkStatusbar *get_statusbar( const NactMainWindow *window );
 static gboolean      display_timeout( StatusbarTimeoutDisplayStruct *stds );
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 6049b78..956cdf1 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -153,7 +153,7 @@ enum {
 	LAST_SIGNAL
 };
 
-static const gchar     *st_xmlui_filename         = PKGDATADIR "/nautilus-actions-config-tool.ui";
+static const gchar     *st_xmlui_filename         = PKGUIDIR "/nautilus-actions-config-tool.ui";
 static const gchar     *st_toplevel_name          = "MainWindow";
 static const gchar     *st_wsp_name               = NA_IPREFS_MAIN_WINDOW_WSP;
 
diff --git a/src/nact/nact-menubar.c b/src/nact/nact-menubar.c
index 799a4bc..8079649 100644
--- a/src/nact/nact-menubar.c
+++ b/src/nact/nact-menubar.c
@@ -216,8 +216,8 @@ enum {
 	LAST_SIGNAL
 };
 
-static const gchar  *st_ui_menubar_actions     = PKGDATADIR "/nautilus-actions-config-tool.actions";
-static const gchar  *st_ui_maintainer_actions  = PKGDATADIR "/nautilus-actions-maintainer.actions";
+static const gchar  *st_ui_menubar_actions     = PKGUIDIR "/nautilus-actions-config-tool.actions";
+static const gchar  *st_ui_maintainer_actions  = PKGUIDIR "/nautilus-actions-maintainer.actions";
 
 static gint          st_signals[ LAST_SIGNAL ] = { 0 };
 static GObjectClass *st_parent_class           = NULL;
diff --git a/src/nact/nact-preferences-editor.c b/src/nact/nact-preferences-editor.c
index 9121d84..2feb252 100644
--- a/src/nact/nact-preferences-editor.c
+++ b/src/nact/nact-preferences-editor.c
@@ -118,7 +118,7 @@ enum {
  *       and prefers rely on the runtime detection */
 static const NADesktopEnv st_no_desktop     = { "None", N_( "Rely on runtime detection" ) };
 
-static const gchar       *st_xmlui_filename = PKGDATADIR "/nact-preferences.ui";
+static const gchar       *st_xmlui_filename = PKGUIDIR "/nact-preferences.ui";
 static const gchar       *st_toplevel_name  = "PreferencesDialog";
 static const gchar       *st_wsp_name       = NA_IPREFS_PREFERENCES_WSP;
 



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