aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-gui-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-gui-utils.c')
-rw-r--r--e-util/e-gui-utils.c171
1 files changed, 0 insertions, 171 deletions
diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c
deleted file mode 100644
index fc8e5921b2..0000000000
--- a/e-util/e-gui-utils.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * GUI utility functions
- *
- * Authors:
- * Miguel de Icaza (miguel@ximian.com)
- * Chris Toshok (toshok@ximian.com)
- *
- * Copyright (C) 1999 Miguel de Icaza
- * Copyright (C) 2000-2003 Ximian, Inc.
- */
-#include <config.h>
-
-#include <string.h>
-
-#include "e-gui-utils.h"
-
-#include <glib.h>
-#include <gtk/gtkalignment.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkhbox.h>
-
-#include <libgnome/gnome-program.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#ifdef HAVE_LIBGNOMEUI_GNOME_ICON_LOOKUP_H
-#include <libgnomeui/gnome-icon-lookup.h>
-#else
-#include "art/empty.xpm"
-#endif
-
-GtkWidget *e_create_image_widget(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- char *filename;
- GtkWidget *alignment = NULL;
- if (string1) {
- GtkWidget *w;
-
- if (*string1 == '/')
- filename = g_strdup(string1);
- else
- filename = g_build_filename (EVOLUTION_IMAGES, string1, NULL);
-
- w = gtk_image_new_from_file (filename);
-
- alignment = gtk_widget_new(gtk_alignment_get_type(),
- "child", w,
- "xalign", (double) 0,
- "yalign", (double) 0,
- "xscale", (double) 0,
- "yscale", (double) 0,
- NULL);
-
- gtk_widget_show_all (alignment);
- g_free (filename);
- }
-
- return alignment;
-}
-
-GtkWidget *
-e_button_new_with_stock_icon (const char *label_str, const char *stockid)
-{
- GtkWidget *button, *hbox, *label, *align, *image;
-
- button = gtk_button_new ();
-
- label = gtk_label_new_with_mnemonic (label_str);
-
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
-
- image = gtk_image_new_from_stock (stockid, GTK_ICON_SIZE_BUTTON);
- hbox = gtk_hbox_new (FALSE, 2);
-
- align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
-
- gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- gtk_container_add (GTK_CONTAINER (button), align);
- gtk_container_add (GTK_CONTAINER (align), hbox);
- gtk_widget_show_all (align);
-
- return button;
-}
-
-/**
- * e_icon_for_mime_type:
- * @mime_type: a MIME type
- * @size_hint: the size the caller plans to display the icon at
- *
- * Tries to find an icon representing @mime_type that will display
- * nicely at @size_hint by @size_hint pixels. The returned icon
- * may or may not actually be that size.
- *
- * Return value: a pixbuf, which the caller must unref when it is done
- **/
-GdkPixbuf *
-e_icon_for_mime_type (const char *mime_type, int size_hint)
-{
- char *icon_name, *icon_path = NULL;
- GdkPixbuf *pixbuf = NULL;
-
-#ifdef HAVE_LIBGNOMEUI_GNOME_ICON_LOOKUP_H
- static GnomeIconTheme *icon_theme = NULL;
-
- /* Try the icon theme. (GNOME 2.2 or Sun GNOME 2.0).
- * This will also look in GNOME VFS.
- */
-
- if (!icon_theme)
- icon_theme = gnome_icon_theme_new ();
-
- icon_name = gnome_icon_lookup (icon_theme, NULL, NULL, NULL, NULL,
- mime_type, 0, NULL);
- if (icon_name) {
- icon_path = gnome_icon_theme_lookup_icon (
- icon_theme, icon_name, size_hint, NULL, NULL);
- g_free (icon_name);
- }
-
-#else
- const char *vfs_icon_name;
-
- /* Try gnome-vfs. (gnome-vfs.mime itself doesn't offer much,
- * but other software packages may define icons for
- * themselves.
- */
- vfs_icon_name = gnome_vfs_mime_get_icon (mime_type);
- if (vfs_icon_name) {
- icon_path = gnome_program_locate_file (
- NULL, GNOME_FILE_DOMAIN_PIXMAP,
- vfs_icon_name, TRUE, NULL);
- }
-
- if (!icon_path) {
- char *p;
-
- /* Try gnome-mime-data. */
- icon_name = g_strdup_printf ("document-icons/gnome-%s.png",
- mime_type);
- p = strrchr (icon_name, '/');
- if (p)
- *p = '-';
-
- icon_path = gnome_program_locate_file (
- NULL, GNOME_FILE_DOMAIN_PIXMAP,
- icon_name, TRUE, NULL);
- g_free (icon_name);
- }
-
- if (!icon_path) {
- /* Use the generic document icon. */
- icon_path = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
- "document-icons/i-regular.png", TRUE, NULL);
- if (!icon_path) {
- g_warning ("Could not get any icon for %s!",mime_type);
- return gdk_pixbuf_new_from_xpm_data((const char **)empty_xpm);
- }
- }
-#endif
-
- pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL);
- g_free (icon_path);
- return pixbuf;
-}
-
lass='deletions'>-6/+2 * Update KDE to the latest official release, KDE 3.1.3lofi2003-07-292-1/+63 * Fix PLISTlioux2003-06-131-1/+17 * Update to KDE 3.1.2lioux2003-05-201-1/+1 * Add a NO_VIET_KDE knob to avoid the KDE I18N bits -- otherwise it is hard toobrien2003-05-091-0/+2 * BROKEN: Does not compilekris2003-05-071-0/+2 * Repo-move KDE I18N hebrew, hungarian, & vietnamese messages to theirwill2003-04-144-5/+72 * Clear moonlight beckons.ade2003-03-0730-15/+15 * Upgrade kde-i18n to 3.1. Note that the following modules did not get awill2003-01-292-38/+34 * Perl script to convert the text in the VIQR encoding to another Vietnameseobrien2002-11-136-0/+68 * o Rollback PORTCOMMENT modifications while this feature's implementationlioux2002-11-1126-26/+13 * Use PORTCOMMENT.obrien2002-11-0726-13/+26 * Add a missing directorykris2002-10-281-0/+1 * Get the dependencies correct for XF4.obrien2002-10-171-1/+1 * revert last commit. This builds fine here, and I've never seen oneobrien2002-10-171-2/+0 * Unmark broken. Please have the decentcy to notify the maintainer of a buildobrien2002-10-171-2/+0 * 1. Removed comments from pkg-plist files per will's request.alane2002-10-112-3/+27 * BROKEN: Does not compilekris2002-10-061-0/+2 * BROKEN: Missing dependencieskris2002-10-061-0/+2 * Don't gratuitously add -O.obrien2002-09-091-2/+2 * 'union wait' was depreciated by the time of Net/2.obrien2002-09-091-13/+24 * Catch up with lossage of 'union wait' in 5-CURRENT.obrien2002-09-092-21/+34 * Fix corrupted comment line.obrien2002-09-091-1/+1 * I have no idea what bsd.port.mk change broke this port, but be moreobrien2002-09-091-0/+1 * Update to 3.0.3. Not much changed here: [1] i18n PKGNAMEs converted towill2002-08-253-4/+4 * 1. Changed the lib depends on gettext to a build depends. This will meanalane2002-08-031-2/+2 * Bump PORTREVISION. KDE is fragile enough in its dependencies; we don'talane2002-08-021-0/+1 * Chase shlib rev of devel/gettextade2002-08-021-1/+1 * Fix MASTER_SITE_SUBDIR.will2002-07-101-1/+1 * Update to 3.0.2 -- full log available in ports/x11/kde3/Makefile,v 1.51.will2002-07-053-5/+12 * Upgrade to KDE 3.0.1. The delay in this upgrade is mainly due to thewill2002-06-163-2/+32 * Please welcome Qt3/KDE3 to our ports tree. This includes work since thewill2002-04-227-128/+154 * gettext upgrade uber-patch (stage 3)ade2002-04-131-1/+2 * Stage 1 of gettext update.ade2002-03-161-1/+1 * Add WWW.demon2001-12-281-0/+2 * Update to 2.2.2.demon2001-12-133-9/+16 * Note the standard these utilities conform to.obrien2001-11-2815-35/+133 * Unicode TrueType Font with UHoai Vietnamese encodingobrien2001-11-288-0/+60 * VISCII->Unicode conversionobrien2001-11-286-0/+36 * Upgrade to 2.2.1.demon2001-10-276-26/+23 * Sort entries.knu2001-09-211-3/+2 * Set DIST_SUBDIR=KDEdemon2001-09-112-1/+2 * MAINTAINER -> kde@FreeBSD.orgdemon2001-09-011-1/+1 * Our -man package does not understand .PN and .MS. So use .B (bold) untilobrien2001-08-232-18/+158 * Fix installation in a slightly different way.demon2001-08-212-6/+8 * Remove two languages not presented in new version.demon2001-08-201-3/+1 * Forgot to remove debug comment.demon2001-08-161-1/+1 * Upgrade to 2.2.demon2001-08-165-8/+31 * Note that VNterm adheres to RFC 1456 (VISCII and VIQR encodings)obrien2001-07-151-0/+6 * Remove Ukrainian from BATCH builds.demon2001-07-051-1/+1 * Exclude de, fr, ja, ru, zh_CN, zh_TW from bento's package.demon2001-04-171-1/+1 * Use `cp' rather than `ln' as WRKDIR and FILESDIR can be on different devices.obrien2001-04-171-1/+1 * Sort languages by name.demon2001-04-131-10/+10 * Examine LINGUAS variable before BATCH.demon2001-04-111-5/+5 * Allow to override MAINTAINER and CATEGORIES (in slave ports).demon2001-04-101-2/+2 * Add the ability to select which languages to install via dialog(1)-baseddemon2001-04-102-0/+87 * Update to 2.1.1demon2001-04-063-13/+2 * Change dot file to .vnelvisrc from .exrc.obrien2001-04-051-8/+26 * Default to Vietnamese processing.obrien2001-04-05