aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-extras.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-table-extras.c')
-rw-r--r--widgets/table/e-table-extras.c191
1 files changed, 0 insertions, 191 deletions
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
deleted file mode 100644
index 85945a8109..0000000000
--- a/widgets/table/e-table-extras.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * E-table-extras.c: Pair of hash table sort of thingies.
- *
- * Author:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000 Ximian, Inc.
- */
-#include <config.h>
-#include <stdlib.h>
-#include <gtk/gtksignal.h>
-#include "gal/util/e-util.h"
-#include "gal/e-table/e-cell-text.h"
-#include "gal/e-table/e-cell-checkbox.h"
-#include "gal/e-table/e-cell-date.h"
-#include "gal/e-table/e-cell-number.h"
-#include "gal/e-table/e-cell-pixbuf.h"
-#include "gal/e-table/e-cell-size.h"
-#include "gal/e-table/e-cell-tree.h"
-#include "e-table-extras.h"
-
-#define PARENT_TYPE (gtk_object_get_type())
-
-static GtkObjectClass *ete_parent_class;
-
-static void
-cell_hash_free(gchar *key,
- ECell *cell,
- gpointer user_data)
-{
- g_free(key);
- if (cell)
- gtk_object_unref( GTK_OBJECT (cell));
-}
-
-static void
-pixbuf_hash_free(gchar *key,
- GdkPixbuf *pixbuf,
- gpointer user_data)
-{
- g_free(key);
- if (pixbuf)
- gdk_pixbuf_unref(pixbuf);
-}
-
-static void
-ete_destroy (GtkObject *object)
-{
- ETableExtras *ete = E_TABLE_EXTRAS (object);
-
- g_hash_table_foreach (ete->cells, (GHFunc) cell_hash_free, NULL);
- g_hash_table_foreach (ete->compares, (GHFunc) g_free, NULL);
- g_hash_table_foreach (ete->pixbufs, (GHFunc) pixbuf_hash_free, NULL);
-
- g_hash_table_destroy (ete->cells);
- g_hash_table_destroy (ete->compares);
- g_hash_table_destroy (ete->pixbufs);
-
- ete->cells = NULL;
- ete->compares = NULL;
- ete->pixbufs = NULL;
-
- GTK_OBJECT_CLASS (ete_parent_class)->destroy (object);
-}
-
-static void
-ete_class_init (GtkObjectClass *klass)
-{
- ete_parent_class = gtk_type_class (PARENT_TYPE);
-
- klass->destroy = ete_destroy;
-}
-
-static gint
-e_strint_compare(gconstpointer data1, gconstpointer data2)
-{
- int int1 = atoi(data1);
- int int2 = atoi(data2);
-
- return g_int_compare(GINT_TO_POINTER(int1), GINT_TO_POINTER(int2));
-}
-
-static void
-ete_init (ETableExtras *extras)
-{
- extras->cells = g_hash_table_new(g_str_hash, g_str_equal);
- extras->compares = g_hash_table_new(g_str_hash, g_str_equal);
- extras->pixbufs = g_hash_table_new(g_str_hash, g_str_equal);
-
- e_table_extras_add_compare(extras, "string", g_str_compare);
- e_table_extras_add_compare(extras, "integer", g_int_compare);
- e_table_extras_add_compare(extras, "string-integer", e_strint_compare);
-
- e_table_extras_add_cell(extras, "checkbox", e_cell_checkbox_new());
- e_table_extras_add_cell(extras, "date", e_cell_date_new (NULL, GTK_JUSTIFY_LEFT));
- e_table_extras_add_cell(extras, "number", e_cell_number_new (NULL, GTK_JUSTIFY_RIGHT));
- e_table_extras_add_cell(extras, "pixbuf", e_cell_pixbuf_new ());
- e_table_extras_add_cell(extras, "size", e_cell_size_new (NULL, GTK_JUSTIFY_RIGHT));
- e_table_extras_add_cell(extras, "string", e_cell_text_new (NULL, GTK_JUSTIFY_LEFT));
- e_table_extras_add_cell(extras, "tree-string", e_cell_tree_new (NULL, NULL, TRUE, e_cell_text_new (NULL, GTK_JUSTIFY_LEFT)));
-}
-
-E_MAKE_TYPE(e_table_extras, "ETableExtras", ETableExtras, ete_class_init, ete_init, PARENT_TYPE);
-
-ETableExtras *
-e_table_extras_new (void)
-{
- ETableExtras *ete = gtk_type_new (E_TABLE_EXTRAS_TYPE);
-
- return (ETableExtras *) ete;
-}
-
-void
-e_table_extras_add_cell (ETableExtras *extras,
- char *id,
- ECell *cell)
-{
- gchar *old_key;
- ECell *old_cell;
-
- if (g_hash_table_lookup_extended (extras->cells, id, (gpointer *)&old_key, (gpointer *)&old_cell)) {
- g_hash_table_remove (extras->cells, old_key);
- g_free (old_key);
- if (old_cell)
- gtk_object_unref (GTK_OBJECT(old_cell));
- }
-
- if (cell) {
- gtk_object_ref (GTK_OBJECT (cell));
- gtk_object_sink (GTK_OBJECT (cell));
- }
- g_hash_table_insert (extras->cells, g_strdup(id), cell);
-}
-
-ECell *
-e_table_extras_get_cell (ETableExtras *extras,
- char *id)
-{
- return g_hash_table_lookup(extras->cells, id);
-}
-
-void
-e_table_extras_add_compare (ETableExtras *extras,
- char *id,
- GCompareFunc compare)
-{
- gchar *old_key;
- GCompareFunc old_compare;
-
- if (g_hash_table_lookup_extended (extras->cells, id, (gpointer *)&old_key, (gpointer *)&old_compare)) {
- g_hash_table_remove (extras->cells, old_key);
- g_free (old_key);
- }
-
- g_hash_table_insert(extras->compares, g_strdup(id), compare);
-}
-
-GCompareFunc
-e_table_extras_get_compare (ETableExtras *extras,
- char *id)
-{
- return g_hash_table_lookup(extras->compares, id);
-}
-
-void
-e_table_extras_add_pixbuf (ETableExtras *extras,
- char *id,
- GdkPixbuf *pixbuf)
-{
- gchar *old_key;
- GdkPixbuf *old_pixbuf;
-
- if (g_hash_table_lookup_extended (extras->pixbufs, id, (gpointer *)&old_key, (gpointer *)&old_pixbuf)) {
- g_hash_table_remove (extras->cells, old_key);
- g_free (old_key);
- if (old_pixbuf)
- gdk_pixbuf_unref (old_pixbuf);
- }
-
- if (pixbuf)
- gdk_pixbuf_ref(pixbuf);
- g_hash_table_insert (extras->pixbufs, g_strdup(id), pixbuf);
-}
-
-GdkPixbuf *
-e_table_extras_get_pixbuf (ETableExtras *extras,
- char *id)
-{
- return g_hash_table_lookup(extras->pixbufs, id);
-}
ested on: ports cluster (kris) Reviewed by: silence on emulation@ Superseedes PR: 69997 Maintainer approval from: chris@chrisburkert.de cracauer@cons.org des girgen jamie@bishopston.net mezz mi nivit@users.sf.net pat simond@irrelevant.org riggs@rrr.de Udo.Schweigert@Siemens.com * Add notes about changes introduced in bsd.port.mk rev. 1.512krion2005-06-101-1/+39 | | | | Remove trailing spaces. * Add an entry for the CVSup "refuse" file bug fix.jdp2005-03-271-0/+11 | | | | Approved by: portmgr (linimon) * Add an entry for the recent gstreamer-plugin-gconf split.kwm2005-03-211-0/+6 | * Add an entry for the recent bsd.gnome.mk changes.marcus2005-03-201-0/+11 | * Add information about IGNORE_MASTER_SITE_xxxedwin2005-03-141-0/+18 | | | | Noticed by: krion * - Add note about changes to gstreamer-plugins and gnomehier ports.ahze2005-03-131-0/+24 | * - Don't pretend these changes were made a month agopav2005-02-091-1/+1 | | | | Time traveller: krion * Document changes committed in bsd.port.mk revision 1.508krion2005-02-071-0/+45 | * Say hello to the linux mega patch, it consolidates our linux bits anetchild2005-01-011-0/+4 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | little bit and allows to proceed to a more recent linux_base from a stable (read as: the major bugs should be ironed out or identified and most linux ports build just fine) source. It also allows to ship 4.11 with a working linuxolator (the EOLed linux_base is marked forbidden because of a security hole). This is a major update, please read UPDATING (and CHANGES if you develop linux ports). Changes: - change the default linux_base from v7 to v8 - add a newer freetype to linux_base-8 for nicer fonts display [1] - don't let cpio use hardlinks in the linux_base-8 port to quiet some warnings in some cases [2] - fix a cut&past error in the linux_base-8 pkg-install script [3] - convert the binary knob "USE_LINUX" to a version specifier, e.g. USE_LINUX=<value> specifies a dependency upon emulators/linux_base-<value>, exceptions are a value of "7" (which does what you want and adds a dependency to linux_base) and any value without a corresponding port in PORTSDIR/emulators/linux_base-<value> (which adds a dependency to the default linux_base) - don't implicitly add USE_LINUX with the USE_LINUX_PREFIX knob, this allows us to use the USE_LINUX_PREFIX knob for linux_base and paves the way for splitting up future linux base ports into individual pieces - remove RESTRICTED from some GPL licensed ports, even when we only distribute binaries, we get them from official linux sites, so anyone can grab them there if he needs to - add a dependency upon the linux X11 bits where necessary (based upon guesswork) - don't use USE_X_PREFIX in some linux ports since it adds a dependency to the FreeBSD X11 libs, as a workaround use PREFIX?= (the clean solution would be to remove the implicit USE_XLIB from USE_X_PREFIX) - bump the portrevision of the linux ports ("better safe than sorry" algorithm) - pass maintainership of the important linux infrastructure to a mailinglist, hijack freebsd-emulation@ for this purpose (if somebody doesn't like this: tell us your bikeshed color at freebsd-emulation@, my color would be "linuxolator@" in case someone cares...) - add a pkg-install script for linux-fontconfig, but don't use it; everything should work without it (the FreeBSD fc-cache program should do all the work), but in case we need it we just need to decomment the pkg-install part in the Makefile - fix some dependencies - fix some bugs - add some static plists - unbreak the ports with dependecies to more than one linux_base This also fixes some ports which are marked BROKEN because of dependencies to v7 and v8 of linux_base at the same time. Known bugs: - the linux-mesa and linux-devtools ports install libGL*.so symlinks - some "minor" plist bugs (e.g. ld.so.{conf,cache} are modified by the linux X11 port, so linx_Base-8 moans at deinstall time) Future work (interested souls should coordinate with freebsd-emulation@): - add some kind of USE_LINUX_X11 knob to streamline the X11 dependencies, or modify the behavior of USE_XLIB in the USE_LINUX case AFAIK trevor has some patches. - make USE_XLIB and USE_X_PREFIX orthogonal to be able to get rid of the PREFIX?= workaround in some linux ports Should be discussed/coordinated on/with x11@. - move the RPM bits from x11-toolkits/linux-gtk/Makefile to PORTSDIR/Mk/ - update to a more recent linux base PR: 69997, 70539 (and maybe others) Discussed with/on: java@, x11@, trevor, portmgr Tested by: mezz, portmgr, pointyhat RPM hunted down by: Joseph Gelinas <scirocco@tasam.com> [1] Requested by: portmgr [2] Submitted by: kris [3] Approved by: portmgr * Add the changes just committed.krion2004-12-101-0/+40 | * Add the changes just committed.krion2004-11-191-0/+40 | * 20041116:mezz2004-11-161-0/+6 | | | | | | | AUTHOR: gnome@FreeBSD.org The way OMF files are handled has been changed to use the new INSTALLS_OMF macro (similar to INSTALLS_SHLIB). Details about the new macro can be found at http://www.FreeBSD.org/gnome/docs/porting.html and bsd.gnome.mk. * Since INDEX version in CVS is always too old, portmgr decided tokrion2004-11-131-0/+6 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove it. You will still be able to build your own INDEX or use 'fetchindex' target in /usr/ports/. The last INDEX song ever. (sung to the tune of "Imagine" by John Lennon) Imagine there's no INDEX It's easy if you try It was a hard decision It should now go and die Imagine all the people Building INDEX today... Imagine there's no ports Is it so hard to do ? Nothing to break or fix for And no GNOME too Imagine all the people Fetching INDEX today... You may say I'm a dreamer But the hacks must go away I hope someday you won't break it And let the downloads rule the day Imagine there's no cluster I wonder if you can Two hundreds ports are broken Please help us, Uncle Sam Imagine all the people Loving INDEX today... You may say I'm a dreamer But the hacks must go away I hope someday you won't break it And let the downloads rule the day * Add information about GConf schema handled has been changed by use the newmezz2004-11-101-0/+6 | | | | GCONF_SCHEMAS macro. * Move devel/autoconf->devel/autoconf253 and devel/automake->devel/automake15ade2004-08-041-0/+8 | | | | | | | All autotools ports are now truly versioned and do not conflict with each other. This marks the end of "Phase 1" of the autotools updates. * Err, today's the 23rd, not the 21st.anholt2004-07-241-1/+1 | * Add instructions for the X.Org update to UPDATING, and make the ones in CHANGESanholt2004-07-241-17/+5 | | | | | | specific for porters. Requested by: marcus * - Add the X_WINDOW_SYSTEM={xorg,xfree86-4,xfree86-3} variable to bsd.port.mk,anholt2004-07-241-0/+20 | | | | | | | | | | | | and make XFREE86_VERSION map to it. XFREE86_VERSION is now deprecated. - Make xorg the default X_WINDOW_SYSTEM on -current. - Add several new X_*_PORT variables which point to various pieces of X11 based on the setting of X_WINDOW_SYSTEM, and make ports use them. - Add information to CHANGES about how to handle the transition. PR: ports/68763 Approved by: portmgr (marcus) Approved by: re (scottl) * Grammar fixes.ale2004-07-201-5/+5 | | | | Submitted by: bmah * Inform users and developers about the new PHP infrastructure.ale2004-07-191-0/+28 | * Note that OpenLDAP version 2.2 is now the default.`eik2004-07-171-0/+10 | | | | Reminded by: marcus * Document the new libtool changes.marcus2004-07-101-0/+24 | * Add a blurb about the new GConf schema handling style. More details aremarcus2004-07-081-0/+8 | | | | | | | available in portlint as well as in the FreeBSD GNOME porting guide, but this just gives porters another pointer. Requested by: mezz * USE_SIZE author was trevor, not erwin as I mentioned.krion2004-07-061-1/+1 | | | | IRC'ed by: erwin * Introduce new AUTHOR: line.krion2004-07-061-1/+15 | | | | Approved by: portmgr (marcus) * Document the user-relevant changes just committed.kris2004-06-101-1/+100 | * Information regarding the great autotools update of July 4 2004ade2004-06-051-0/+51 | * . Add some information regarding the latest changes to bsd.java.mkglewis2004-04-201-0/+24 | | | | Submitted by: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr> * Augment Trevor's GNOME instructions by linking to the GNOME porting guide.marcus2004-04-151-0/+4 | * Mention USE_GNOME=gtk20 (gleaned from marcus' commits to the nogger, gringotts,trevor2004-04-151-0/+5 | | | | aumix, groundhog and gtk-qnxtheme ports). * Correct the name of one of the _DEPRECATED macros.marcus2004-04-091-1/+1 | * Let other porters know about the recent changes in glib20/gtk20 with regard tomarcus2004-04-091-0/+16 | | | | deprecated API calls. * . Document the bsd.java.mk update.glewis2004-04-041-2/+63 | | | | | | . Kill some trailing white space while I'm here. Reminded by: znerd * Add instructions for fixing portability issues with the new freetype2.marcus2004-03-171-0/+15 | * Add detail about recent autotools changes.ade2004-03-151-0/+12 | | | | Poked by: kris * semi-document MASTER_SITE_SOURCEFORGE_EXTENDEDeik2004-03-091-0/+9 | * Reorganize the information about the ruby upgrade to 1.8 on i386.knu2004-03-031-34/+2 | | | | Noted by: kris * Add notes about ruby's major upgrade to 1.8 on the i386 platform.knu2004-03-031-0/+44 |