Commit cd91e1b7 authored by Maciej Stachowiak's avatar Maciej Stachowiak

Assorted build twiddling.

	* components/services/install/command-line/Makefile.am: Remove
	-I/usr/include/rpm

	* components/services/install/nautilus-view/Makefile.am: Likewise.

	* components/services/install/nautilus-view/nautilus-service-install-view.c:
	Remove gratuitous include of rpm header.

	* components/services/inventory/Makefile.am: Formatting tweaks.

	* components/services/summary/*: flatten this whole directory:
	summary/lib => summary
	summary/nautilus-view => summary
	summary/nautilus-view/test => summary
	summary/nautilus-view/icons/gray_tab_pieces =>summary/nautilus-view/icons

	* configure.in: Adjust for flattening of
	components/services/summary

	* libnautilus-extensions/nautilus-clickable-image.c
	(adjust_coordinates_for_window): Formatting tweak.

	* user-guide/gnugpl/.cvsignore: Silence cvs.
parent 2a694a66
2001-02-20 Maciej Stachowiak <mjs@eazel.com>
Assorted build twiddling.
* components/services/install/command-line/Makefile.am: Remove
-I/usr/include/rpm
* components/services/install/nautilus-view/Makefile.am: Likewise.
* components/services/install/nautilus-view/nautilus-service-install-view.c:
Remove gratuitous include of rpm header.
* components/services/inventory/Makefile.am: Formatting tweaks.
* components/services/summary/*: flatten this whole directory:
summary/lib => summary
summary/nautilus-view => summary
summary/nautilus-view/test => summary
summary/nautilus-view/icons/gray_tab_pieces =>summary/nautilus-view/icons
* configure.in: Adjust for flattening of
components/services/summary
* libnautilus-extensions/nautilus-clickable-image.c
(adjust_coordinates_for_window): Formatting tweak.
* user-guide/gnugpl/.cvsignore: Silence cvs.
2001-02-20 Maciej Stachowiak <mjs@eazel.com>
reviewed by: Eskil Heyn Olsen <eskil@eazel.com>
......
......@@ -13,7 +13,6 @@ INCLUDES = \
-I$(top_srcdir)/components/services/nautilus-dependent-shared \
-I$(top_builddir)/components/services/install/lib \
-I$(top_builddir) \
-I/usr/include/rpm \
$(GCONF_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(GNOMEUI_CFLAGS) \
......
......@@ -32,7 +32,6 @@
#include "libtrilobite/libtrilobite.h"
#include "libtrilobite/libammonite-gtk.h"
#include <rpm/rpmlib.h>
#include <gnome-xml/tree.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libnautilus-extensions/nautilus-background.h>
......
include $(top_srcdir)/Makefile.shared
INCLUDES = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"Nautilus-Services\" \
-I$(top_srcdir) \
-I$(top_builddir) \
-I/usr/include/rpm \
-I$(top_srcdir)/components/services/trilobite/libtrilobite\
-I$(top_builddir)/components/services/trilobite/libtrilobite\
-I$(top_srcdir)/components/services/trilobite \
-I$(top_builddir)/components/services/trilobite \
-I$(top_srcdir)/components/services/install/lib \
-I$(top_builddir)/components/services/install/lib \
$(GNOME_CFLAGS) \
$(GCONF_CFLAGS) \
$(VFS_CFLAGS) \
$(XML_CFLAGS) \
$(GHTTP_CFLAGS) \
INCLUDES = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"Nautilus-Services\" \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/components/services/trilobite/libtrilobite \
-I$(top_builddir)/components/services/trilobite/libtrilobite \
-I$(top_srcdir)/components/services/trilobite \
-I$(top_builddir)/components/services/trilobite \
-I$(top_srcdir)/components/services/install/lib \
-I$(top_builddir)/components/services/install/lib \
$(GNOME_CFLAGS) \
$(GCONF_CFLAGS) \
$(VFS_CFLAGS) \
$(XML_CFLAGS) \
$(GHTTP_CFLAGS) \
$(NULL)
LDADD = \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \
$(BONOBO_LIBS) \
$(GNOME_LIBS) \
$(GCONF_LIBS) \
$(VFS_LIBS) \
$(GHTTP_LIBS) \
$(RPM_LIBS) \
LDADD = \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \
$(BONOBO_LIBS) \
$(GNOME_LIBS) \
$(GCONF_LIBS) \
$(VFS_LIBS) \
$(GHTTP_LIBS) \
$(RPM_LIBS) \
$(NULL)
bin_PROGRAMS = eazel-install eazel-gen-xml eazel-test-packsys eazel-softcat eazel-test-install-types
eazel_install_SOURCES = \
eazel-alt-install-corba.c \
eazel_install_SOURCES = \
eazel-alt-install-corba.c \
$(NULL)
eazel_install_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la\
eazel_install_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(NULL)
eazel_gen_xml_SOURCES = \
eazel-gen-xml.c \
eazel_gen_xml_SOURCES = \
eazel-gen-xml.c \
$(NULL)
eazel_gen_xml_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la\
eazel_gen_xml_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelinstall.la \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(NULL)
eazel_test_packsys_SOURCES = \
eazel-test-packsys.c \
eazel_test_packsys_SOURCES = \
eazel-test-packsys.c \
$(NULL)
eazel_test_packsys_LDADD = \
$(LDADD) \
eazel_test_packsys_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(NULL)
#eazel_test_inventory_SOURCES = \
# eazel-test-inventory.c \
#eazel_test_inventory_SOURCES = \
# eazel-test-inventory.c \
# $(NULL)
#eazel_test_inventory_LDADD = \
# $(LDADD) \
#eazel_test_inventory_LDADD = \
# $(LDADD) \
# $(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
# $(NULL)
eazel_test_install_types_SOURCES = \
eazel-test-types.c \
eazel_test_install_types_SOURCES = \
eazel-test-types.c \
$(NULL)
eazel_test_install_types_LDADD = \
$(LDADD) \
eazel_test_install_types_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(NULL)
eazel_softcat_SOURCES = \
eazel-test-softcat.c \
eazel_softcat_SOURCES = \
eazel-test-softcat.c \
$(NULL)
eazel_softcat_LDADD = \
$(LDADD) \
eazel_softcat_LDADD = \
$(LDADD) \
$(top_builddir)/components/services/install/lib/libeazelpackagesystem.la \
$(NULL)
......@@ -13,7 +13,6 @@ INCLUDES = \
-I$(top_srcdir)/components/services/nautilus-dependent-shared \
-I$(top_builddir)/components/services/install/lib \
-I$(top_builddir) \
-I/usr/include/rpm \
$(GCONF_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(GNOMEUI_CFLAGS) \
......
......@@ -32,7 +32,6 @@
#include "libtrilobite/libtrilobite.h"
#include "libtrilobite/libammonite-gtk.h"
#include <rpm/rpmlib.h>
#include <gnome-xml/tree.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libnautilus-extensions/nautilus-background.h>
......
......@@ -93,7 +93,7 @@ trilobiteinclude_HEADERS = \
$(NULL)
libtrilobite_inventory_service_la_SOURCES = \
$(CORBA_GENERATED) \
$(CORBA_GENERATED) \
$(NULL)
......
.deps
.libs
Makefile
Makefile.in
nautilus-summary-view
Nautilus_View_services-summary.oaf
SUBDIRS = lib nautilus-view
include $(top_srcdir)/Makefile.shared
SUBDIRS = icons
INCLUDES = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"trilobite-eazel-summary\" \
-DDATADIR=\"$(datadir)\" \
-I$(top_srcdir) \
-I$(top_srcdir)/components/services/nautilus-dependent-shared \
-I$(top_srcdir)/components/services/trilobite \
-I$(top_builddir) \
$(GNOMEUI_CFLAGS) \
$(GCONF_CFLAGS) \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
$(VFS_CFLAGS) \
$(NULL)
uidir = $(datadir)/gnome/ui
ui_DATA = nautilus-summary-view-ui.xml
bin_PROGRAMS = \
nautilus-summary-view
nautilus_summary_view_SOURCES = \
eazel-summary-shared.c \
eazel-summary-shared.h \
main.c \
nautilus-summary-callbacks.c \
nautilus-summary-callbacks.h \
nautilus-summary-dialogs.c \
nautilus-summary-dialogs.h \
nautilus-summary-footer.c \
nautilus-summary-footer.h \
nautilus-summary-menu-items.c \
nautilus-summary-menu-items.h \
nautilus-summary-view-private.h \
nautilus-summary-view.c \
nautilus-summary-view.h \
$(NULL)
nautilus_summary_view_LDADD = \
$(top_builddir)/components/services/trilobite/libtrilobite/libtrilobite.la \
$(top_builddir)/components/services/nautilus-dependent-shared/libnautilusdepshared.a \
$(top_builddir)/libnautilus/libnautilus.la \
$(top_builddir)/libnautilus-extensions/libnautilus-extensions.la \
$(BONOBO_LIBS) \
$(GNOMEUI_LIBS) \
$(GCONF_LIBS) \
$(VFS_LIBS) \
$(GHTTP_LIBS) \
$(OAF_LIBS) \
$(AMMONITE_LIBS) \
$(NULL)
oafdir = $(datadir)/oaf
oaf_in_files = \
Nautilus_View_services-summary.oaf.in \
$(NULL)
oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
@XML_I18N_MERGE_OAF_RULE@
EXTRA_DIST = $(oaf_in_files) $(oaf_DATA) $(ui_DATA)
NULL =
INCLUDES = \
-DPREFIX=\"$(prefix)\" \
-DG_LOG_DOMAIN=\"trilobite-eazel-summary\" \
-DSTANDALONE \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/components/services/trilobite \
$(GNOME_CFLAGS) \
$(GCONF_CFLAGS) \
$(GHTTP_CFLAGS) \
$(NULL)
noinst_LIBRARIES = libsummary.a
libsummary_a_SOURCES = \
eazel-summary-shared.h \
eazel-summary-shared.c \
$(NULL)
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2000 Eazel, Inc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: J Shane Culpepper <pepper@eazel.com>
*/
#include <config.h>
#include "eazel-summary-shared.h"
#include <libtrilobite/libtrilobite.h>
#include <libtrilobite/trilobite-file-utilities.h>
#include <gnome.h>
#include <gnome-xml/tree.h>
#include <gnome-xml/parser.h>
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
static GList * build_services_glist_from_xml (xmlNodePtr node);
static GList * build_eazel_news_glist_from_xml (xmlNodePtr node);
static GList * build_update_news_glist_from_xml (xmlNodePtr node);
static SummaryData * summary_data_new (void);
static ServicesData * services_data_new (void);
static EazelNewsData * eazel_news_data_new (void);
static UpdateNewsData * update_news_data_new (void);
static ServicesData * parse_a_service (xmlNodePtr node);
static EazelNewsData * parse_a_eazel_news_item (xmlNodePtr node);
static UpdateNewsData * parse_a_update_news_item (xmlNodePtr node);
static SummaryData *
summary_data_new ()
{
SummaryData *return_value;
return_value = g_new0 (SummaryData, 1);
return_value->services_list = NULL;
return_value->eazel_news_list = NULL;
return_value->update_news_list = NULL;
return return_value;
} /* end summary_data_new */
static ServicesData *
services_data_new ()
{
ServicesData *return_value;
return_value = g_new0 (ServicesData, 1);
return_value->name = NULL;
return_value->icon = NULL;
return_value->button_label = NULL;
return_value->description_header = NULL;
return_value->description = NULL;
return_value->enabled = TRUE;
return return_value;
} /* end services_data_new */
static EazelNewsData *
eazel_news_data_new ()
{
EazelNewsData *return_value;
return_value = g_new0 (EazelNewsData, 1);
return_value->name = NULL;
return_value->icon = NULL;
return_value->date = NULL;
return_value->message = NULL;
return return_value;
} /* end eazel_news_data_new */
static UpdateNewsData *
update_news_data_new ()
{
UpdateNewsData *return_value;
return_value = g_new0 (UpdateNewsData, 1);
return_value->name = NULL;
return_value->version = NULL;
return_value->priority = NULL;
return_value->description = NULL;
return_value->icon = NULL;
return_value->button_label = NULL;
return_value->uri = NULL;
return_value->softcat_uri = NULL;
return return_value;
} /* end update_news_data_new */
static ServicesData *
parse_a_service (xmlNodePtr node)
{
ServicesData *return_value;
char *tempbuf;
return_value = services_data_new ();
return_value->name = g_strdup (trilobite_xml_get_string (node, "NAME"));
return_value->icon = g_strdup (trilobite_xml_get_string (node, "ICON"));
return_value->button_label = g_strdup (trilobite_xml_get_string (node, "BUTTON_LABEL"));
return_value->uri = g_strdup (trilobite_xml_get_string (node, "URI"));
return_value->description_header = g_strdup (trilobite_xml_get_string (node, "DESCRIPTION_HEADER"));
return_value->description = g_strdup (trilobite_xml_get_string (node, "DESCRIPTION"));
tempbuf = g_strdup (trilobite_xml_get_string (node, "ENABLED"));
if (tempbuf[0] == 'T' || tempbuf[0] == 't') {
return_value->enabled = TRUE;
}
else if (tempbuf[0] == 'F' || tempbuf[0] == 'f') {
return_value->enabled = FALSE;
}
else {
g_warning (_("Could not find a valid boolean value for grey_out!"));
return_value->enabled = FALSE;
}
return return_value;
} /* end parse_a_service */
static EazelNewsData *
parse_a_eazel_news_item (xmlNodePtr node)
{
EazelNewsData *return_value;
return_value = eazel_news_data_new ();
return_value->name = g_strdup (trilobite_xml_get_string (node, "NAME"));
return_value->icon = g_strdup (trilobite_xml_get_string (node, "ICON"));
return_value->date = g_strdup (trilobite_xml_get_string (node, "DATE"));
return_value->message = g_strdup (trilobite_xml_get_string (node, "MESSAGE"));
return return_value;
} /* end parse_a_eazel_news_item */
static UpdateNewsData *
parse_a_update_news_item (xmlNodePtr node)
{
UpdateNewsData *return_value;
return_value = update_news_data_new ();
return_value->name = g_strdup (trilobite_xml_get_string (node, "NAME"));
return_value->version = g_strdup (trilobite_xml_get_string (node, "VERSION"));
return_value->priority = g_strdup (trilobite_xml_get_string (node, "PRIORITY"));
return_value->description = g_strdup (trilobite_xml_get_string (node, "DESCRIPTION"));
return_value->icon = g_strdup (trilobite_xml_get_string (node, "ICON"));
return_value->button_label = g_strdup (trilobite_xml_get_string (node, "BUTTON_LABEL"));
return_value->uri = g_strdup (trilobite_xml_get_string (node, "URI"));
return_value->softcat_uri = g_strdup (trilobite_xml_get_string (node, "SOFTCAT_URI"));
return return_value;
} /* end parse_a_update_news_item */
static GList *
build_services_glist_from_xml (xmlNodePtr node)
{
GList *return_value;
xmlNodePtr service;
return_value = NULL;
service = node->xmlChildrenNode;
if (service == NULL) {
g_warning (_("There is no service data !\n"));
return NULL;
}
while (service) {
ServicesData *sdata;
sdata = parse_a_service (service);
return_value = g_list_append (return_value, sdata);
service = service->next;
}
return return_value;
} /* end build_services_glist_from_xml */
static GList *
build_eazel_news_glist_from_xml (xmlNodePtr node)
{
GList *return_value;
xmlNodePtr news_item;
return_value = NULL;
news_item = node->xmlChildrenNode;
if (news_item == NULL) {
g_warning (_("There is no eazel news data !\n"));
return NULL;
}
while (news_item) {
EazelNewsData *ndata;
ndata = parse_a_eazel_news_item (news_item);
return_value = g_list_append (return_value, ndata);
news_item = news_item->next;
}
return return_value;
} /* end build_eazel_news_glist_from_xml */
static GList *
build_update_news_glist_from_xml (xmlNodePtr node)
{
GList *return_value;
xmlNodePtr news_item;
return_value = NULL;
news_item = node->xmlChildrenNode;
if (news_item == NULL) {
g_warning (_("There is no eazel news data !\n"));
return NULL;
}
while (news_item) {
UpdateNewsData *ndata;
ndata = parse_a_update_news_item (news_item);
return_value = g_list_append (return_value, ndata);
news_item = news_item->next;
}
return return_value;
} /* end build_update_news_glist_from_xml */
static SummaryData *
eazel_summary_data_parse_xml (char *body,
int length)
{
SummaryData *return_value;
xmlDocPtr doc;
xmlNodePtr base;
xmlNodePtr child;
/* <rant> libxml will have a temper tantrum if there is whitespace before the
* * first tag. so we must babysit it.
* */
while ((length > 0) && isspace (*body)) {
body++, length--;
}
body[length] = '\0';
doc = xmlParseMemory (body, length);
if (doc == NULL) {
return NULL;
}
base = doc->root;
if (base == NULL ||
g_strcasecmp (base->name, "SUMMARY_DATA") != 0) {
xmlFreeDoc (doc);
return NULL;
}
return_value = summary_data_new ();
child = base->xmlChildrenNode;
if (child == NULL) {
xmlFreeDoc (doc);
return NULL;
}
while (child) {
if (g_strcasecmp (child->name, "SERVICES") == 0) {
return_value->services_list = build_services_glist_from_xml (child);
}
if (g_strcasecmp (child->name, "EAZEL_NEWS") == 0) {
return_value->eazel_news_list = build_eazel_news_glist_from_xml (child);
}
if (g_strcasecmp (child->name, "UPDATE_NEWS") == 0) {
return_value->update_news_list = build_update_news_glist_from_xml (child);
}
child = child->next;
}
return return_value;
}
struct EazelSummaryFetchHandle {
TrilobiteReadFileHandle *handle;
EazelSummaryFetchCallback callback;
gpointer callback_data;
};
static void
summary_data_fetch_callback (GnomeVFSResult result,
GnomeVFSFileSize file_size,
char *file_contents,
gpointer callback_data)
{
EazelSummaryFetchHandle *handle;
SummaryData *summary_data;
summary_data = NULL;
handle = callback_data;
if (result == GNOME_VFS_OK) {
summary_data = eazel_summary_data_parse_xml (file_contents,
file_size);
}
(*handle->callback) (result, summary_data, handle->callback_data);
g_free (handle);
g_free (file_contents);
}
EazelSummaryFetchHandle *
eazel_summary_fetch_data_async (const char *uri,
EazelSummaryFetchCallback callback,
gpointer callback_data)
{
EazelSummaryFetchHandle *handle;
handle = g_new0 (EazelSummaryFetchHandle, 1);
handle->callback = callback;
handle->callback_data = callback_data;
handle->handle = trilobite_read_entire_file_async (uri, summary_data_fetch_callback, handle);
return handle;
}
void
eazel_summary_fetch_data_cancel (EazelSummaryFetchHandle *handle)
{
trilobite_read_file_cancel (handle->handle);
g_free (handle);
}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2000 Eazel, Inc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.