From ea06083f9a8b9139aff159bb0773cdfe511f3c9a Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Mon, 16 Jan 2012 17:42:34 +0000 Subject: [PATCH] Remove no longer used druid-utils (replaced with assistant-utils) With this, the code is no longer using any deprecated Gnome symbols (though it still uses deprecated Glib and Gtk symbols). git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21857 57a11ea4-9604-0410-9ed3-97b8803252fd --- po/POTFILES.in | 1 - src/gnome-utils/Makefile.am | 2 - src/gnome-utils/druid-utils.c | 155 ---------------------------------- src/gnome-utils/druid-utils.h | 35 -------- src/gnome-utils/gnome-utils.i | 1 - src/html/gnc-html.i | 1 - 6 files changed, 195 deletions(-) delete mode 100644 src/gnome-utils/druid-utils.c delete mode 100644 src/gnome-utils/druid-utils.h diff --git a/po/POTFILES.in b/po/POTFILES.in index 7b3d517df3..24d45d3e83 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -267,7 +267,6 @@ src/gnome-utils/dialog-totd.c src/gnome-utils/dialog-transfer.c src/gnome-utils/dialog-userpass.c src/gnome-utils/dialog-utils.c -src/gnome-utils/druid-utils.c src/gnome-utils/gnc-account-sel.c src/gnome-utils/gnc-amount-edit.c src/gnome-utils/gnc-autosave.c diff --git a/src/gnome-utils/Makefile.am b/src/gnome-utils/Makefile.am index 41b4f3e459..8c8dfbf268 100644 --- a/src/gnome-utils/Makefile.am +++ b/src/gnome-utils/Makefile.am @@ -47,7 +47,6 @@ libgncmod_gnome_utils_la_SOURCES = \ dialog-transfer.c \ dialog-userpass.c \ dialog-utils.c \ - druid-utils.c \ gnc-account-sel.c \ gnc-amount-edit.c \ gnc-autosave.c \ @@ -122,7 +121,6 @@ gncinclude_HEADERS = \ dialog-totd.h \ dialog-transfer.h \ dialog-utils.h \ - druid-utils.h \ gnc-account-sel.h \ gnc-amount-edit.h \ gnc-commodity-edit.h \ diff --git a/src/gnome-utils/druid-utils.c b/src/gnome-utils/druid-utils.c deleted file mode 100644 index 2c37abcba9..0000000000 --- a/src/gnome-utils/druid-utils.c +++ /dev/null @@ -1,155 +0,0 @@ -/********************************************************************\ - * druid-utils.c -- utility functions for creating druids * - * Copyright (C) 2001 Jeremy Collins * - * Copyright (C) 2001 Dave Peticolas * - * * - * 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, contact: * - * * - * Free Software Foundation Voice: +1-617-542-5942 * - * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * - * Boston, MA 02110-1301, USA gnu@gnu.org * - * * -\********************************************************************/ - -#include "config.h" - -#include -#include - -#include "dialog-utils.h" -#include "druid-utils.h" -#include "qof.h" -#include "gnc-gnome-utils.h" - -void -gnc_druid_set_watermark_images (GnomeDruid *druid, - const char *top_path, - const char *side_path) -{ - GdkPixbuf *top_pixbuf, *side_pixbuf; - GList *page_list, *item; - GtkWidget *page; - - page_list = gtk_container_get_children(GTK_CONTAINER(druid)); - top_pixbuf = gnc_gnome_get_gdkpixbuf(top_path); - side_pixbuf = gnc_gnome_get_gdkpixbuf(side_path); - - for (item = page_list; item; item = g_list_next(item)) - { - page = item->data; - if (GNOME_IS_DRUID_PAGE_EDGE (page)) - { - GnomeDruidPageEdge *page_edge; - - page_edge = GNOME_DRUID_PAGE_EDGE (page); - gnome_druid_page_edge_set_top_watermark (page_edge, top_pixbuf); - gnome_druid_page_edge_set_watermark (page_edge, side_pixbuf); - } - else - { - GnomeDruidPageStandard *page_standard; - - page_standard = GNOME_DRUID_PAGE_STANDARD (page); - gnome_druid_page_standard_set_top_watermark (page_standard, top_pixbuf); - } - } - - g_object_unref (G_OBJECT(side_pixbuf)); - g_object_unref (G_OBJECT(top_pixbuf)); - g_list_free(page_list); -} - -void -gnc_druid_set_logo_image (GnomeDruid *druid, char *image_path) -{ - GdkPixbuf *logo_pixbuf; - GList *page_list, *item; - GtkWidget *page; - - page_list = gtk_container_get_children(GTK_CONTAINER(druid)); - logo_pixbuf = gnc_gnome_get_gdkpixbuf(image_path); - - for (item = page_list; item; item = g_list_next(item)) - { - page = item->data; - if (GNOME_IS_DRUID_PAGE_EDGE (page)) - { - GnomeDruidPageEdge *page_edge; - - page_edge = GNOME_DRUID_PAGE_EDGE (page); - gnome_druid_page_edge_set_logo (page_edge, logo_pixbuf); - } - else - { - GnomeDruidPageStandard *page_standard; - - page_standard = GNOME_DRUID_PAGE_STANDARD (page); - gnome_druid_page_standard_set_logo (page_standard, logo_pixbuf); - } - } - - g_object_unref (G_OBJECT(logo_pixbuf)); - g_list_free(page_list); -} - -void -gnc_druid_set_colors (GnomeDruid *druid) -{ - GList *pages = gtk_container_get_children (GTK_CONTAINER (druid)); - GList *item = pages; - GdkColor bluish; - GdkColor white; - GdkColormap *cm; - - if (!druid) return; - if (!GNOME_IS_DRUID (druid)) return; - - bluish.red = (gushort) (.40 * 65535); - bluish.green = (gushort) (.40 * 65535); - bluish.blue = (gushort) (.60 * 65535); - - white.red = 65535; - white.green = 65535; - white.blue = 65535; - - cm = gtk_widget_get_colormap (GTK_WIDGET (druid)); - - gdk_colormap_alloc_color(cm, &bluish, FALSE, TRUE); - gdk_colormap_alloc_color(cm, &white, FALSE, TRUE); - - while (item != NULL) - { - GnomeDruidPage *page = GNOME_DRUID_PAGE (item->data); - - if (GNOME_IS_DRUID_PAGE_EDGE (page)) - { - GnomeDruidPageEdge *page_edge; - - page_edge = GNOME_DRUID_PAGE_EDGE (page); - gnome_druid_page_edge_set_bg_color (page_edge, &bluish); - gnome_druid_page_edge_set_logo_bg_color (page_edge, &bluish); - } - else - { - GnomeDruidPageStandard *page_standard; - - page_standard = GNOME_DRUID_PAGE_STANDARD (page); - gnome_druid_page_standard_set_background (page_standard, &bluish); - gnome_druid_page_standard_set_logo_background (page_standard, &bluish); - gnome_druid_page_standard_set_title_foreground (page_standard, &white); - } - item = item->next; - } - g_list_free(pages); -} diff --git a/src/gnome-utils/druid-utils.h b/src/gnome-utils/druid-utils.h deleted file mode 100644 index 68e9fff002..0000000000 --- a/src/gnome-utils/druid-utils.h +++ /dev/null @@ -1,35 +0,0 @@ -/********************************************************************\ - * druid-utils.h -- utility functions for creating druids * - * Copyright (C) 2001 Jeremy Collins * - * * - * 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, contact: * - * * - * Free Software Foundation Voice: +1-617-542-5942 * - * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * - * Boston, MA 02110-1301, USA gnu@gnu.org * - * * -\********************************************************************/ - -#ifndef DRUID_UTILS_H -#define DRUID_UTILS_H - -#include - -void gnc_druid_set_watermark_images (GnomeDruid *druid, - const char *top_path, - const char *side_path); -void gnc_druid_set_logo_image (GnomeDruid *druid, char *image_path); -void gnc_druid_set_colors (GnomeDruid *druid); - -#endif diff --git a/src/gnome-utils/gnome-utils.i b/src/gnome-utils/gnome-utils.i index fbebe7995d..55da966f02 100644 --- a/src/gnome-utils/gnome-utils.i +++ b/src/gnome-utils/gnome-utils.i @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/src/html/gnc-html.i b/src/html/gnc-html.i index 468be04e84..e621d8da25 100644 --- a/src/html/gnc-html.i +++ b/src/html/gnc-html.i @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include