[evolution-rss] Use UIDIR instead of GLADEDIR for ui files



commit 78933999ee8cb0f21bfe2f353f4dc9aa5aec4333
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date:   Wed Apr 7 12:47:25 2010 +0200

    Use UIDIR instead of GLADEDIR for ui files

 configure.ac             |    8 +++-----
 src/Makefile.am          |    6 +++---
 src/rss-config-factory.c |   26 +++++++++++++-------------
 src/rss.h                |    6 +++---
 4 files changed, 22 insertions(+), 24 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1f2cf1b..2d4469d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,6 @@ LIBGLIB_REQUIRED=2.16.2
 LIBGTK_REQUIRED=2.12.0
 EVOLUTION_REQUIRED=2.4.1
 LIBSOUP_REQUIRED=2.2
-LIBGLADE_REQUIRED=2.0
 LIBGTKHTML_REQUIRED=3.18.3
 
 PKG_CHECK_MODULES(EVOLUTION_RSS_EPLUGIN,
@@ -92,7 +91,6 @@ PKG_CHECK_MODULES(EVOLUTION_RSS_EPLUGIN,
    libebook-1.2 dnl
    libgnomecanvas-2.0 dnl
    dnl evolution-data-server-1.2 dnl
-   libglade-2.0 dnl
    libgtkhtml-3.14 >= $LIBGTKHTML_REQUIRED
 ])
 
@@ -343,8 +341,8 @@ fi
 privdatadir='${datadir}'/evolution/$EVOLUTION_EXEC_VERSION
 AC_SUBST(privdatadir)
 
-gladedir="$privdatadir/glade"
-AC_SUBST(gladedir)
+uidir="$privdatadir/ui"
+AC_SUBST(uidir)
 
 privlibdir='${libdir}'/evolution/$EVOLUTION_EXEC_VERSION
 AC_SUBST(privlibdir)
@@ -355,7 +353,7 @@ case "$host" in
 *-mingw*)
     os_win32=yes
     NO_UNDEFINED='-no-undefined'
-	if test $evolution_int_version -ge 22700; then
+	if test $evolution_int_version -ge 22700 -a $evolution_int_version -lt 22900; then
 		NO_UNDEFINED_LIBS='$(EVOLUTION_RSS_EPLUGIN_LIBS) -levolution-mail-shared -levolution-mail -lemiscwidgets'
 	else
 		NO_UNDEFINED_LIBS='$(EVOLUTION_RSS_EPLUGIN_LIBS) -levolution-mail -lemiscwidgets'
diff --git a/src/Makefile.am b/src/Makefile.am
index d445000..cc01a65 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -12,7 +12,7 @@ INCLUDES =							\
 	-DEVOLUTION_VERSION_STRING=\"$(EVOLUTION_EXEC_VERSION)\"\
 	-DEVOLUTION_VERSION=$(evolution_version_int)		\
 	-DDATASERVER_VERSION=$(DATASERVER_VERSION)		\
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"			\
+	-DEVOLUTION_UIDIR=\""$(uidir)"\"			\
 	-DEVOLUTION_ICONDIR=\""$(ICON_DIR)"\"			\
 	-DGTK_VERSION="$(GTK_VERSION)"				\
 	-DLIBSOUP_VERSION="$(SOUP_VERSION)"			\
@@ -141,7 +141,7 @@ uninstall-local:
 
 DISTCLEANFILES = $(schema_DATA)
 
-glade_DATA =                    \
+ui_DATA =                    \
 	rss-main.ui		\
 	rss-html-rendering.ui
 
@@ -155,7 +155,7 @@ CLEANFILES	= $(BUILT_SOURCES)	\
 	$(schema_DATA)
 
 EXTRA_DIST =					\
-	$(glade_DATA)				\
+	$(ui_DATA)				\
 	$(server_in_files)			\
 	$(schema_in_files)			\
 	rss.h network.h				\
diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c
index ec229b5..b3be961 100644
--- a/src/rss-config-factory.c
+++ b/src/rss-config-factory.c
@@ -434,7 +434,7 @@ disable_widget_cb(GtkWidget *widget, GtkBuilder *data)
 add_feed *
 build_dialog_add(gchar *url, gchar *feed_text)
 {
-	char *gladefile;
+	char *uifile;
 	add_feed *feed = g_new0(add_feed, 1);
 	GtkBuilder  *gui;
 	gchar *flabel = NULL;
@@ -472,15 +472,15 @@ build_dialog_add(gchar *url, gchar *feed_text)
 	GError* error = NULL;
 
 	feed->enabled = TRUE;
-	gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+	uifile = g_build_filename (EVOLUTION_UIDIR,
 		"rss-main.ui",
 		NULL);
 	gui = gtk_builder_new ();
-	if (!gtk_builder_add_from_file (gui, gladefile, &error)) {
+	if (!gtk_builder_add_from_file (gui, uifile, &error)) {
 		g_warning ("Couldn't load builder file: %s", error->message);
 		g_error_free (error);
 	}
-	g_free (gladefile);
+	g_free (uifile);
 
 	dialog1 = GTK_WIDGET (gtk_builder_get_object(gui, "feed_dialog"));
 	child = GTK_WIDGET (gtk_builder_get_object(gui, "dialog-vbox9"));
@@ -2969,22 +2969,22 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
 	GtkCellRenderer *renderer;
 	guint i, render;
 	UIData *ui = g_new0 (UIData, 1);
-	char *gladefile;
+	char *uifile;
 	gdouble adj;
 	GError* error = NULL;
 	gchar *toplevel[] = {(gchar *)"settingsbox", NULL};
 	GtkAdjustment *adjustment;
 
 
-	gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+	uifile = g_build_filename (EVOLUTION_UIDIR,
 		"rss-html-rendering.ui",
 		NULL);
 	ui->xml = gtk_builder_new ();
-	if (!gtk_builder_add_objects_from_file (ui->xml, gladefile, toplevel, &error)) {
+	if (!gtk_builder_add_objects_from_file (ui->xml, uifile, toplevel, &error)) {
 		g_warning ("Couldn't load builder file: %s", error->message);
 		g_error_free (error);
 	}
-	g_free (gladefile);
+	g_free (uifile);
 
 	ui->combobox = GTK_WIDGET (gtk_builder_get_object(ui->xml, "hbox1"));
 	renderer = gtk_cell_renderer_text_new ();
@@ -3447,7 +3447,7 @@ rss_config_control_new (void)
 {
 	GtkWidget *control_widget;
 	GtkWidget *button1, *button2, *button3;
-	gchar *gladefile;
+	gchar *uifile;
 	setupfeed *sf;
 	GtkListStore  *store;
 	GtkTreeIter    iter;
@@ -3461,16 +3461,16 @@ rss_config_control_new (void)
 	d("rf->%p\n", rf);
 	sf = g_new0(setupfeed, 1);
 
-	gladefile = g_build_filename (
-			EVOLUTION_GLADEDIR,
+	uifile = g_build_filename (
+			EVOLUTION_UIDIR,
 			"rss-main.ui",
 			NULL);
 	sf->gui = gtk_builder_new ();
-	if (!gtk_builder_add_from_file (sf->gui, gladefile, &error)) {
+	if (!gtk_builder_add_from_file (sf->gui, uifile, &error)) {
 		g_warning ("Couldn't load builder file: %s", error->message);
 		g_error_free (error);
 	}
-	g_free (gladefile);
+	g_free (uifile);
 
 	treeview = (GtkTreeView *)gtk_builder_get_object(
 					sf->gui,
diff --git a/src/rss.h b/src/rss.h
index 21a2e49..2c86581 100644
--- a/src/rss.h
+++ b/src/rss.h
@@ -515,11 +515,11 @@ void rebase_feeds(gchar *old_name, gchar *new_name);
 #ifdef _WIN32
 char *strcasestr(const char *a, const char *b);
 
-const char *_e_get_gladedir (void) G_GNUC_CONST;
+const char *_e_get_uidir (void) G_GNUC_CONST;
 const char *_e_get_imagesdir (void) G_GNUC_CONST;
 
-#undef EVOLUTION_GLADEDIR
-#define EVOLUTION_GLADEDIR _e_get_gladedir ()
+#undef EVOLUTION_UIDIR
+#define EVOLUTION_UIDIR _e_get_uidir ()
 
 #undef EVOLUTION_ICONDIR
 #define EVOLUTION_ICONDIR _e_get_imagesdir ()



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