/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* camel-session.c : Abstract class for an email session */ /* * Authors: * Dan Winship * Jeffrey Stedfast * Bertrand Guiheneuf * * Copyright 1999 - 2001 Ximian, 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 */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "camel-session.h" #include "camel-store.h" #include "camel-transport.h" #include "camel-exception.h" #include "string-utils.h" #include "camel-url.h" #include "hash-table-utils.h" #include "camel-vee-store.h" #include "camel-private.h" #define CS_CLASS(so) CAMEL_SESSION_CLASS (CAMEL_OBJECT_GET_CLASS (so)) static void register_provider (CamelSession *session, CamelProvider *provider); static GList *list_providers (CamelSession *session, gboolean load); static CamelProvider *get_provider (CamelSession *session, const char *url_string, CamelException *ex); static CamelService *get_service (CamelSession *session, const char *url_string, CamelProviderType type, CamelException *ex); static char *get_storage_path (CamelSession *session, CamelService *service, CamelException *ex); /* The vfolder provider is always avilable */ static CamelProvider vee_provider = { "vfolder", N_("Virtual folder email provider"), N_("For reading mail as a query of another set of folders"), "vfolder", 0, /* flags */ 0, /* url_flags */ /* ... */ }; static void camel_session_init (CamelSession *session) { session->online = TRUE; session->modules = camel_provider_init (); session->providers = g_hash_table_new (g_strcase_hash, g_strcase_equal); session->priv = g_malloc0(sizeof(*session->priv)); #ifdef ENABLE_THREADS session->priv->lock = g_mutex_new(); #endif } static gboolean camel_session_destroy_provider (gpointer key, gpointer value, gpointer user_data) { CamelProvider *prov = (CamelProvider *)value; g_hash_table_destroy (prov->service_cache); return TRUE; } static void camel_session_finalise (CamelObject *o) { CamelSession *session = (CamelSession *)o; g_free(session->storage_path); g_hash_table_foreach_remove (session->providers, camel_session_destroy_provider, NULL); g_hash_table_destroy (session->providers); #ifdef ENABLE_THREADS g_mutex_free(session->priv->lock); #endif g_free(session->priv); } static void camel_session_class_init (CamelSessionClass *camel_session_class) { /* virtual method definition */ camel_session_class->register_provider = register_provider; camel_session_class->list_providers = list_providers; camel_session_class->get_provider = get_provider; camel_session_class->get_service = get_service; camel_session_class->get_storage_path = get_storage_path; vee_provider.object_types[CAMEL_PROVIDER_STORE] = camel_vee_store_get_type (); vee_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal); } CamelType camel_session_get_type (void) { static CamelType camel_session_type = CAMEL_INVALID_TYPE; if (camel_session_type == CAMEL_INVALID_TYPE) { camel_session_type = camel_type_register ( camel_object_get_type (), "CamelSession", sizeof (CamelSession), sizeof (CamelSessionClass), (CamelObjectClassInitFunc) camel_session_class_init, NULL, (CamelObjectInitFunc) camel_session_init, (CamelObjectFinalizeFunc) camel_session_finalise); } return camel_session_type; } /** * camel_session_construct: * @session: a session object to construct * @storage_path: path to a directory the session can use for * persistent storage. (This directory must already exist.) * * Constructs @session. **/ void camel_session_construct (CamelSession *session, const char *storage_path) { session->storage_path = g_strdup (storage_path); camel_session_register_provider(session, &vee_provider); } static void register_provider (CamelSession *session, CamelProvider *provider) { g_hash_table_insert (session->providers, provider->protocol, provider); } /** * camel_session_register_provider: * @session: a session object * @protocol: the protocol the provider provides for * @provider: provider object * * Registers a protocol to provider mapping for the session. * * Assumes the session lock has already been obtained, * which is the case for automatically loaded provider modules. **/ void camel_session_register_provider (CamelSession *session, CamelProvider *provider) { g_return_if_fail (CAMEL_IS_SESSION (session)); g_return_if_fail (provider != NULL); CS_CLASS (session)->register_provider (session, provider); } static void ensure_loaded (gpointer key, gpointer value, gpointer user_data) { CamelSession *session = user_data; char *name = key; char *path = value; if (!g_hash_table_lookup (session->providers, name)) { CamelException ex; camel_exception_init (&ex); camel_provider_load (session, path, &ex); camel_exception_clear (&ex); } } static gint provider_compare (gconstpointer a, gconstpointer b) { const CamelProvider *cpa = (const CamelProvider *)a; const CamelProvider *cpb = (const CamelProvider *)b; return strcmp (cpa->name, cpb->name); } static void add_to_list (gpointer key, gpointer value, gpointer user_data) { GList **list = user_data; CamelProvider *prov = value; *list = g_list_insert_sorted (*list, prov, provider_compare); } static GList * list_providers (CamelSession *session, gboolean load) { GList *list = NULL; if (load) g_hash_table_foreach (session->modules, ensure_loaded, session); g_hash_table_foreach (session->providers, add_to_list, &list); return list; } /** * camel_session_list_providers: * @session: the session * @load: whether or not to load in providers that are not already loaded * * This returns a list of available providers in this session. If @load * is %TRUE, it will first load in all available providers that haven't * yet been loaded. * * Return value: a GList of providers, which the caller must free. **/ GList * camel_session_list_providers (CamelSession *session, gboolean load) { GList *list; g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL); CAMEL_SESSION_LOCK (session, lock); list = CS_CLASS (session)->list_providers (session, load); CAMEL_SESSION_UNLOCK (session, lock); return list; } static CamelProvider * get_provider (CamelSession *session, const char *url_string, CamelException *ex) { CamelProvider *provider; char *protocol; protocol = g_strndup (url_string, strcspn (url_string, ":")); provider = g_hash_table_lookup (session->providers, protocol); if (!provider) { /* See if there's one we can load. */ char *path; path = g_hash_table_lookup (session->modules, protocol); if (path) { camel_provider_load (session, path, ex); if (camel_exception_is_set (ex)) { g_free (protocol); return NULL; } } provider = g_hash_table_lookup (session->providers, protocol); } if (!provider) { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID, _("No provider available for protocol `%s'"), protocol); } g_free (protocol); return provider; } /** * camel_session_get_provider: * @session: the session * @url_string: the URL for the service whose provider you want * @ex: a CamelException * * This returns the CamelProvider that would be used to handle * @url_string, loading it in from disk if necessary. * * Return value: the provider, or %NULL, in which case @ex will be set. **/ CamelProvider * camel_session_get_provider (CamelSession *session, const char *url_string, CamelException *ex) { CamelProvider *provider; CAMEL_SESSION_LOCK (session, lock); provider = CS_CLASS (session)->get_provider (session, url_string, ex); CAMEL_SESSION_UNLOCK (session, lock); return provider; } static void service_cache_remove (CamelService *service, gpointer event_data, gpointer user_data) { CamelProvider *provider; CamelSession *session = CAMEL_SESSION (user_data); g_return_if_fail (CAMEL_IS_SESSION (session)); g_return_if_fail (service != NULL); g_return_if_fail (service->url != NULL); CAMEL_SESSION_LOCK(session, lock); provider = g_hash_table_lookup (session->providers, service->url->protocol); g_hash_table_remove (provider->service_cache, service->url); CAMEL_SESSION_UNLOCK(session, lock); } static CamelService * get_service (CamelSession *session, const char *url_string, CamelProviderType type, CamelException *ex) { CamelURL *url; CamelProvider *provider; CamelService *service; url = camel_url_new (url_string, ex); if (!url) return NULL; /* We need to look up the provider so we can then lookup the service in the provider's cache */ provider = CS_CLASS (session)->get_provider (session, url->protocol, ex); if (provider && !provider->object_types[type]) { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID, _("No provider available for protocol `%s'"), url->protocol); provider = NULL; } if (!provider) { camel_url_free (url); return NULL; } /* Now look up the service in the provider's cache */ service = g_hash_table_lookup (provider->service_cache, url); if (service != NULL) { camel_url_free (url); camel_object_ref (CAMEL_OBJECT (service)); return service; } service = (CamelService *)camel_object_new (provider->object_types[type]); camel_service_construct (service, session, provider, url, ex); if (camel_exception_is_set (ex)) { camel_object_unref (CAMEL_OBJECT (service)); service = NULL; } else { g_hash_table_insert (provider->service_cache, url, service); camel_object_hook_event (CAMEL_OBJECT (service), "finalize", (CamelObjectEventHookFunc) service_cache_remove, session); } return service; } /** * camel_session_get_service: * @session: the CamelSession * @url_string: a Camel URL describing the service to get * @type: the provider type (%CAMEL_PROVIDER_STORE or * %CAMEL_PROVIDER_TRANSPORT) to get, since some URLs may be able * to specify either type. * @ex: a CamelException * * This resolves a CamelURL into a CamelService, including loading the * provider library for that service if it has not already been loaded. * * Services are cached, and asking for "the same" @url_string multiple * times will return the same CamelService (with its reference count * incremented by one each time). What constitutes "the same" URL * depends in part on the provider. * * Return value: the requested CamelService, or %NULL **/ CamelService * camel_session_get_service (CamelSession *session, const char *url_string, CamelProviderType type, CamelException *ex) { CamelService *service; g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL); g_return_val_if_fail (url_string != NULL, NULL); CAMEL_SESSION_LOCK (session, lock); service = CS_CLASS (session)->get_service (session, url_string, type, ex); CAMEL_SESSION_UNLOCK (session, lock); return service; } /** * camel_session_get_service_connected: * @session: the CamelSession * @url_string: a Camel URL describing the service to get * @type: the provider type * @ex: a CamelException * * This works like camel_session_get_service(), but also ensures that * the returned service will have been successfully connected (via * camel_service_connect().) * * Return value: the requested CamelService, or %NULL **/ CamelService * camel_session_get_service_connected (CamelSession *session, const char *url_string, CamelProviderType type, CamelException *ex) { CamelService *svc; svc = camel_session_get_service (session, url_string, type, ex); if (svc == NULL) return NULL; if (svc->connected == FALSE) { if (camel_service_connect (svc, ex) == FALSE) { camel_object_unref (CAMEL_OBJECT (svc)); return NULL; } } return svc; } static char * get_storage_path (CamelSession *session, CamelService *service, CamelException *ex) { char *path, *p; p = camel_service_get_path (service); path = g_strdup_printf ("%s/%s", session->storage_path, p); g_free (p); if (access (path, F_OK) == 0) return path; if (camel_mkdir_hier (path, S_IRWXU) == -1) { camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create directory %s:\n%s"), path, g_strerror (errno)); g_free (path); return NULL; } return path; } /** * camel_session_get_storage_path: * @session: session object * @service: a CamelService * @ex: a CamelException * * This returns the path to a directory which the service can use for * its own purposes. Data stored there will remain between Evolution * sessions. No code outside of that service should ever touch the * files in this directory. If the directory does not exist, it will * be created. * * Return value: the path (which the caller must free), or %NULL if * an error occurs. **/ char * camel_session_get_storage_path (CamelSession *session, CamelService *service, CamelException *ex) { g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL); g_return_val_if_fail (CAMEL_IS_SERVICE (service), NULL); return CS_CLASS (session)->get_storage_path (session, service, ex); } /** * camel_session_get_password: * @session: session object * @prompt: prompt to provide to user * @secret: whether or not the data is secret (eg, a password, as opposed * to a smartcard response) * @service: the service this query is being made by * @item: an identifier, unique within this service, for the information * @ex: a CamelException * * This function is used by a CamelService to ask the application and * the user for a password or other authentication data. * * @service and @item together uniquely identify the piece of data the * caller is concerned with. * * @prompt is a question to ask the user (if the application doesn't * already have the answer cached). If @secret is set, the user's * input will not be echoed back. The authenticator should set @ex * to %CAMEL_EXCEPTION_USER_CANCEL if the user did not provide the * information. The caller must g_free() the information returned when * it is done with it. * * Return value: the authentication information or %NULL. **/ char * camel_session_get_password (CamelSession *session, const char *prompt, gboolean secret, CamelService *service, const char *item, CamelException *ex) { g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL); g_return_val_if_fail (CAMEL_IS_SERVICE (service), NULL); g_return_val_if_fail (prompt != NULL, NULL); g_return_val_if_fail (item != NULL, NULL); return CS_CLASS (session)->get_password (session, prompt, secret, service, item, ex); } /** * camel_session_forget_password: * @session: session object * @service: the service rejecting the password * @item: an identifier, unique within this service, for the information * @ex: a CamelException * * This function is used by a CamelService to tell the application * that the authentication information it provided via * camel_session_get_password was rejected by the service. If the * application was caching this information, it should stop, * and if the service asks for it again, it should ask the user. * * @service and @item identify the rejected authentication information, * as with camel_session_get_password. **/ void camel_session_forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex) { g_return_if_fail (CAMEL_IS_SESSION (session)); g_return_if_fail (CAMEL_IS_SERVICE (service)); g_return_if_fail (item != NULL); CS_CLASS (session)->forget_password (session, service, item, ex); } /** * camel_session_alert_user: * @session: session object * @type: the type of alert (info, warning, or error) * @prompt: the message for the user * @cancel: whether or not to provide a "Cancel" option in addition to * an "OK" option. * * Presents the given @prompt to the user, in the style indicated by * @type. If @cancel is %TRUE, the user will be able to accept or * cancel. Otherwise, the message is purely informational. * * Return value: %TRUE if the user accepts, %FALSE if they cancel. */ gboolean camel_session_alert_user (CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel) { g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE); g_return_val_if_fail (prompt != NULL, FALSE); return CS_CLASS (session)->alert_user (session, type, prompt, cancel); } /** * camel_session_register_timeout: * @session: the CamelSession * @interval: the number of milliseconds interval between calls * @callback: the function to call * @user_data: extra data to be passed to the callback * * Registers the given timeout. @callback will be called every * @interval milliseconds with one argument, @user_data, until it * returns %FALSE. * * Return value: On success, a non-zero handle that can be used with * camel_session_remove_timeout(). On failure, 0. **/ guint camel_session_register_timeout (CamelSession *session, guint32 interval, CamelTimeoutCallback callback, gpointer user_data) { g_return_val_if_fail (CAMEL_IS_SESSION (session), 0); return CS_CLASS (session)->register_timeout (session, interval, callback, user_data); } /** * camel_session_remove_timeout: * @session: the CamelSession * @handle: a value returned from camel_session_register_timeout() * * Removes the indicated timeout. * * Return value: %TRUE on success, %FALSE on failure. **/ gboolean camel_session_remove_timeout (CamelSession *session, guint handle) { g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE); return CS_CLASS (session)->remove_timeout (session, handle); } /** * camel_session_is_online: * @session: the session. * * Return value: whether or not @session is online. **/ gboolean camel_session_is_online (CamelSession *session) { return session->online; } /** * camel_session_set_online: * @session: the session * @online: whether or not the session should be online * * Sets the online status of @session to @online. **/ void camel_session_set_online (CamelSession *session, gboolean online) { session->online = online; } Harish Krishnaswamy2005-12-104-4/+4 * prefix the wrapper functions with e - do not use g lest it is assumed toHarish Krishnaswamy2005-12-097-9/+19 * Fixes #322740. change the condition expression for GDK_RIGHT and GDK_LEFT.Boby Wang2005-12-072-2/+8 * Fixes bug #322776. When focus come into e-tree, it is possible that theLi Yuan2005-12-062-1/+9 * Use gnome_font_find_closest instead of gnome_font_find since Helvetica isKaushal Kumar2005-10-142-1/+10 * dded case insensitive compare support etable, and using it for OrganizationSushma Rai2005-10-042-0/+8 * e-table.c (e_table_load_specification) e-table-specification.cTor Lillqvist2005-09-304-3/+12 * Use g_ascii_strcasecmp() instead of strcasecmp(). We are comparing toTor Lillqvist2005-09-282-5/+12 * Fixes #314352. if accessibility is enabled, we enable horizontal cusorLi Yuan2005-08-252-2/+13 * fix some missing casts.Not Zed2005-08-242-4/+8 * ** See bug #313063.Not Zed2005-08-152-1/+9 * Add a11y name to the left table of config dialog. Add name to the leftLi Yuan2005-08-041-2/+14 * Added code to use stock icons instead of -> and <-Srinivasa Ragavan2005-07-252-8/+262 * Added widgets in INCLUDES.Kaushal Kumar2005-06-2329-47/+53 * Added from gal/gal/e-table as Gal is retired from Head and e-table filesKaushal Kumar2005-06-211-0/+8918 * If only a few rows have changed, emit each as a separate row_changed eventNot Zed2005-06-201-2/+31 * Retired GAL from Head. The relevant files have moved inside evolution.Kaushal Kumar2005-06-17126-376/+535 * Don't hide the tooltip if we don't have a canvas anymore. Patch by: NotKaushal Kumar2005-06-011-1/+3 * export ethi_change_sort_state, so we can call it in a11y part.Li Yuan2005-05-204-1/+14 * Check for NULL string before passing to dgettext. Fixes a crash onSarfraaz Ahmed2005-05-061-1/+1 * Port to Windows, initial commit:Tor Lillqvist2005-04-2968-272/+419 * selecion fixes for im's.Theppitak Karoonboonyanan2005-03-141-7/+18 * Fix for #73009.Li Yuan2005-02-282-0/+4 * Some code clean work.Harry Lu2005-02-043-16/+6 * add an a11y name for the popup list. make shortcut key ALT+Arrow work.Li Yuan2005-01-2713-63/+210 * Fixes #38195JP Rosevear2005-01-261-7/+1 * Fixes #29309JP Rosevear2004-12-222-3/+18 * check whether header_canvas and table_canvas is NULL.Li Yuan2004-11-241-3/+5 * if canvas has a focused item but the etable does not have a cursor row,Li Yuan2004-11-041-0/+4 * return FALSE so we don't kill the focus event chainJP Rosevear2004-10-201-3/+3 * include scrollbar offset in vertical calculation. don't ask me i just workNot Zed2004-08-121-4/+6 * do not set position, it's already done in .glade, call set_transient_forRadek Doulik2004-08-043-16/+8 * added e_table_model_pre_change because we call e_table_model_row_insertedRadek Doulik2004-07-131-0/+2 * Fix some spacing and border width properties on the dialog's widgets toRodney Dawes2004-06-233-0/+52 * set dialog window position, glade doesn't do that for us anymore as theRadek Doulik2004-06-114-4/+158 * fixes for compiler warningsRadek Doulik2004-06-109-14/+11 * add new api for setting the whole selection in one go. See #59546.Not Zed2004-06-102-0/+16 * (ensure_nonzero_step_increments): set step increments always to 16Radek Doulik2004-06-091-2/+2 * new helper function to set step_increments (allocate_callback): callRadek Doulik2004-06-091-0/+20 * Fixes #51626Bruce Tao2004-05-103-4/+73 * Don't necessarily set row to 0 if the root node has the cursor (otherwiseJeffrey Stedfast2004-05-051-5/+3 * revert last patch. (eti_attach_cell_views): add some code to reset dragsNot Zed2004-05-041-2/+12 * if motion column is beyond our known columns, just ignore it and don'tNot Zed2004-05-041-2/+3 * Changed the int param specs to take a min value of -1 and also defautl toJeffrey Stedfast2004-04-301-5/+5 * Make the acces key Alt+O work.Harry Lu2004-03-101-1/+1 * reset motion_row/motion_col if the model changes. See bug #54757.Not Zed2004-02-261-0/+2 * Change the shadow type for the arrows here, so that themes that do handleRodney Dawes2004-02-133-4/+4 * print strikeout/underlineRadek Doulik2004-01-271-1/+30 * Fixed bug 51917, add atk support for ClickToAddYuedong Du2003-12-171-0/+6 * Fixed #50844Andrew Wu2003-12-082-2/+5 * Fixed Bug 51252, 51254, 51255. add some code deal with key press event.Andrew Wu2003-12-023-7/+66 * Fixes #51139Bolian Yin2003-12-021-2/+2 * a11y implementations for ECellText. new functions to support correspondingTim Wo2003-12-022-0/+195 * renamespace and move to here build new filesMike Kestner2003-11-182-10/+10 * Fix for 50800 connect "e_cell_combo_list_button_press" to gtklist.Andrew Wu2003-11-141-3/+21 * Fix for 50681 send a event to the right cell to pop up something.Andrew Wu2003-11-141-0/+6 * new files (gal-a11y-e-cell-tree.c/h) added adding 2 new functions to addTim Wo2003-11-122-0/+13 * Fixes # 50480Bolian Yin2003-11-112-0/+30 * disable apply button when initial dialog. disable apply button afterCharles Zhang2003-11-032-0/+6 * new function to deal with grabing table cell focusTim Wo2003-11-031-0/+4 * shared object looks for wrong mo file"Suresh Chandrasekharan2003-11-031-1/+1 * add new file for toggle cell a11y object. new a11y object toggle cellYuedong Du2003-10-281-0/+4 * Fix for "50065 chinese locales Input method hangs after a task entry andSuresh Chandrasekharan2003-10-281-0/+3 * Allocate colors using gdk_colormap_alloc_color().Hans Petter Jansson2003-10-241-1/+4 * Support for preedit in e-text widgets.Suresh Chandrasekharan2003-10-155-49/+294 * add new files. set the right role. new file.Yuedong Du2003-10-113-0/+22 * process GTK_RESPONSE_DELETE_EVENT signal correctly. the same as aboveCharles Zhang2003-10-101-2/+3 * new method to get the source model column for a specified available_modelMike Kestner2003-09-121-4/+14 * move scnt and gcnt initialization outside the for loop [43156].Mike Kestner2003-09-121-2/+2 * add e-table atk support to libgal a11y add atk registration forGilbert Fang2003-09-051-0/+8 * ** For bug #47874.Harry Lu2003-08-263-0/+11 * add an expander_style param (ect_draw): pass expander_style toMike Kestner2003-08-201-9/+56 * extracted from ect_draw (draw_expander): new gtktreeview-like expanderMike Kestner2003-08-164-86/+207 * actually chose the right color to+ composite over when caching the pixmap.Larry Ewing2003-08-131-23/+6 * map model_column to available model row by ignoring disabled columns.Mike Kestner2003-07-291-2/+7 * Initialize some missing fields. Fixes "no handler with id" warnings at evoDan Winship2003-07-012-10/+7 * Implement. (ect_print): Use same font heuristics as evo calendar, pick aHans Petter Jansson2003-06-241-2/+25 * remove extra ref, the count starts at one.Larry Ewing2003-06-193-3/+3 * don't do the CURSOR_FIRST checks if cursor is NULL [43523]Mike Kestner2003-06-142-3/+3 * guard against NULL strings don't add disabled column titles to the store.Mike Kestner2003-06-124-23/+9 * bump libtool version for api addition new, utf8 in/outMike Kestner2003-05-291-26/+9 * to really fix 42952 use e_table_item_get_cell_geometry. Also a coupleEttore Perazzoli2003-05-221-4/+9 * revert a broken CLEAN_FILES change. [42478]Mike Kestner2003-05-201-3/+2 * block the signal that got us here until we're done to stop an infiniteMike Kestner2003-05-173-17/+7 * (tree_canvas_size_allocate): CallEttore Perazzoli2003-05-161-5/+5 * use weak refs not datasets. (e_tree_dispose): weak_unref the context.Mike Kestner2003-05-161-5/+15 * gross hack to work around a post dispose event emission byMike Kestner2003-05-151-0/+3 * add null check for paths (find_prev_in_range): add null check for pathsMike Kestner2003-05-101-2/+2 * don't return on col == -1. update the adjustment to center the cursor.Mike Kestner2003-05-102-2/+13 * add missing model_changed (etta_proxy_node_inserted): add missingMike Kestner2003-05-071-0/+4 * Use correct macro for int->pointerJeremy Katz2003-05-061-1/+1 * return the instantiated object. [bug #42156]Mike Kestner2003-05-021-4/+25 * remove gratuitous refJP Rosevear2003-05-021-1/+0 * don't use unicode ellipsis so that we don't break on broken font setups.Mike Kestner2003-04-301-6/+1 * don't do wrapping during editMike Kestner2003-04-291-0/+3 * use unicode ellipsis char for breaking lines. Use g_utf8_find_prev_charMike Kestner2003-04-231-9/+14 * use e_tree_table_adapter_node_get_next to determine how to draw siblingMike Kestner2003-04-213-4/+16 * [ fixes evolution bug #40464 ] use G_SIGNAL_TYPE_STATIC_SCOPE for theChris Toshok2003-04-211-2/+2 * if the layout splits into more than one line, shorten it to a single lineMike Kestner2003-04-191-3/+18 * add guarding for row indexing (Bug# 41497)JP Rosevear2003-04-191-5/+16 * set width and alignment of layout. (generate_layout): set width onMike Kestner2003-04-171-12/+29 * Don't unref the layout that was passed in. (e_table_header_draw_button):Hans Petter Jansson2003-04-162-2/+4 * free data here since we don't have source in finalizeJP Rosevear2003-04-111-11/+15 * add response ids to buttonsMike Kestner2003-04-091-6/+6 * remove e-font.[ch], test-e-font, and test-font-loading. killMike Kestner2003-04-091-46/+2 * swap button order swap button orderMike Kestner2003-04-092-32/+32 * remove debugging g_print calls fix length_threshold prop range fixMike Kestner2003-04-084-14/+3 * guard against root == NULL. Bug #39491.Mike Kestner2003-04-051-0/+3 * (e_tree_class_init): Add a G_SIGNAL_TYPE_STATIC_SCOPEEttore Perazzoli2003-04-031-1/+1 * restore expanded state of node and all children. Fixes Ximian bug #40393.Mike Kestner2003-04-031-3/+31 * if killing the root node, set it to NULL in the priv data. Bug #39441.Mike Kestner2003-04-011-0/+2 * properly parse nodes that include whitespace. bug #39896Mike Kestner2003-03-251-13/+16 * don't call delete_node on the root node since generate_tree already doesMike Kestner2003-03-241-2/+3 * fix UMR.Chris Toshok2003-03-231-1/+1 * add underline_column field.Chris Toshok2003-03-194-27/+60 * add cursor_idle_id.Chris Toshok2003-03-191-0/+2 * add cursor_idle_id.Chris Toshok2003-03-191-1/+8 * mimic Gtk's sort arrows (ethi_start_drag): mimic Gtk's sort arrowsMike Kestner2003-03-191-8/+8 * null start_path (etsm_invert_selection): null start_pathMike Kestner2003-03-191-5/+11 * save and restore expanded state so parents don't collapse when childrenMike Kestner2003-03-151-2/+7 * fix a couple ==TRUE uses pointed out by Morten Welinder <terra@diku.dk>.Mike Kestner2003-03-051-2/+2 * i18n fixDmitry Mastrukov2003-03-055-8/+129 * rewrite to store selected paths in a hashtable instead of a tree. lose theMike Kestner2003-03-043-786/+141 * Add style_set to update list properly (et_canvas_realize): Remove this asRodney Dawes2003-03-011-7/+4 * remove alloc-based transform (et_drag_data_received): dittoMike Kestner2003-03-011-12/+0 * remove alloc-based transform (et_drag_data_received): dittoMike Kestner2003-03-011-11/+0 * fix overzealous g_asserts to avoid crashes when eti->rows is alreadyMike Kestner2003-02-211-5/+1 * kill (etsm_find_node_unless_equals): use new etta_orig_positionMike Kestner2003-02-213-47/+57 * set remap_neededMike Kestner2003-02-191-0/+1 * make sure the row >= 0 before calling value_at to calc "strikeout".Chris Toshok2003-02-181-1/+3 * make things compile on an alpha. passing NULL to a var_arg not portable.Jody Goldberg2003-02-181-1/+3 * return after the e_table_model_no_change call.Chris Toshok2003-02-171-2/+6 * guard for null paths if save_id lookup fails.Mike Kestner2003-02-141-1/+2 * don't transform based on allocation position. Position isn't absolute now.Mike Kestner2003-02-141-3/+0 * kill a double unref on the pango_layout.Mike Kestner2003-02-141-2/+0 * Request a reflow on realization, so size and placement will be correctHans Petter Jansson2003-02-131-1/+4 * handle reverse searches (find_prev_in_range): reverse search implMike Kestner2003-02-131-4/+24 * work around broken models that insert children before parents. bad models.Mike Kestner2003-02-131-4/+18 * rewrite to use etta (find_next_in_range): helper func to search a range ofMike Kestner2003-02-111-25/+22 * Unmarked some strings which are unsuitable for translationKwok-Koon Cheung2003-02-091-3/+3 * index bound bug (insert_children): prepend/reverse for nowMike Kestner2003-02-071-16/+27 * use the parent path to find the parent node rather than the row, which isNot Zed2003-02-061-3/+4 * Replace deprecated glade_gnome_init() call with glade_init().Dan Winship2003-02-062-2/+2 * make GAL_LIBS use -lgal-2.0 remove extraneous GTK_LIBS reference update toMike Kestner2003-02-055-874/+613 * replaced e scroll frame with gtk scrolled windowRadek Doulik2003-02-054-19/+18 * destroy canvas items to removing them, simply unrefing them is notLarry Ewing2003-01-241-4/+4 * (e_tree_table_adapter_load_expanded_state): CallEttore Perazzoli2003-01-231-2/+0 * Same here.Jeffrey Stedfast2003-01-163-3/+3 * If we set a clip rectangle, clear it after we've finished.Not Zed2003-01-151-1/+6 * revert broken fixMike Kestner2003-01-111-1/+1 * free the children before we free and dispose of our ecol, sinceChris Toshok2002-12-191-3/+3 * pass NULL for parent_window for e_table_config_new.Chris Toshok2002-12-195-1861/+2199 * edit->tep isn't a GtkObject anymore.Chris Toshok2002-12-171-2/+0 * pass in the pango layout so we don't have to create another one here.Chris Toshok2002-12-171-90/+46 * remove obvious double g_strdup.Chris Toshok2002-12-173-3/+3 * valgrindageMike Kestner2002-12-141-1/+1 * Add a "collate" sort callback that uses the new g_collate_compare().Jeffrey Stedfast2002-12-061-0/+1 * Don't leak old sort info.Hans Petter Jansson2002-12-041-0/+2 * make this a dispose rather than finalise. Crashes on finalise otherwise.Not Zed2002-12-031-3/+3 * (etms_finalize): CallEttore Perazzoli2002-11-271-1/+26 * take GCallback, not GtkSignalFunc. (configure_sort_dialog): show theChris Toshok2002-11-192-214/+19 * check for table->table_canvas == NULL.Chris Toshok2002-11-172-15/+19 * GObject port work.Chris Toshok2002-11-1769-4140/+4783 * fix typo.Chris Toshok2002-11-151-2/+2 * ETableConfig derives from GObject (fix warnings).Chris Toshok2002-11-154-70/+82 * deal with ESelectionModel no longer deriving from GtkObject.Chris Toshok2002-11-1510-359/+394 * this subclasses from GObject now, not GtkObject. don't use GtkObjectChris Toshok2002-11-156-3922/+3925 * add more marshallers for e-table.Chris Toshok2002-11-141-160/+177 * Forgot two more gtk_object_(un)?ref()s.Ettore Perazzoli2002-11-122-4/+4 * Replace gtk_object_(un)?ref() with g_object_(un)?ref(). Likewise.Ettore Perazzoli2002-11-1212-67/+67 * correct the GET_CLASS macro.Chris Toshok2002-11-096-6/+6 * GObjectify GObjectifyMike Kestner2002-11-064-63/+55 * remove ref/unref G_OBJECT masks ditto ditto ditto ditto ditto ditto dittoMike Kestner2002-11-069-63/+63 * GObjectify GObjectify GObjectify use GObject api for models use GObjectMike Kestner2002-11-0624-767/+563 * use GObject api for models GObjectify GObjectify GObjectify GObjectifyMike Kestner2002-11-0526-867/+623 * use GObject api for ETableHeader use GObject api on ETableHeaderMike Kestner2002-11-05