diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-03-21 10:53:55 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-03-21 10:53:55 +0800 |
commit | f60b9107e9d0a10bc54307c279f789c26a794736 (patch) | |
tree | f4912fca26063ba92abbddf3240f7a38d4ed8651 /addressbook | |
parent | 5fe5e0f7431c00d4438eaed35825cb6a33dbe05f (diff) | |
download | gsoc2013-evolution-f60b9107e9d0a10bc54307c279f789c26a794736.tar.gz gsoc2013-evolution-f60b9107e9d0a10bc54307c279f789c26a794736.tar.zst gsoc2013-evolution-f60b9107e9d0a10bc54307c279f789c26a794736.zip |
Added the ability to access the text event processor.
2000-03-20 Christopher James Lahey <clahey@helixcode.com>
* widgets/e-text/e-text.c, widgets/e-text/e-text.h: Added the
ability to access the text event processor.
2000-03-13 Christopher James Lahey <clahey@helixcode.com>
* addressbook/demo/addressbook-widget.c: Made the addressbook
component look in the users home directory for the addressbook.xml
file.
svn path=/trunk/; revision=2125
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/demo/addressbook-widget.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/addressbook/demo/addressbook-widget.c b/addressbook/demo/addressbook-widget.c index 4efca22e3f..1252f9993c 100644 --- a/addressbook/demo/addressbook-widget.c +++ b/addressbook/demo/addressbook-widget.c @@ -79,25 +79,33 @@ static ETestModel * get_model(char *filename) { ETestModel *model; + gboolean free_filename = FALSE; - if ( filename == NULL ) - filename = "addressbook.xml"; + if ( filename == NULL ) { + filename = gnome_util_prepend_user_home("addressbook.xml"); + free_filename = TRUE; + } if ( models == NULL ) { models = g_hash_table_new(g_str_hash, g_str_equal); } model = g_hash_table_lookup(models, filename); - if ( model ) + if ( model ) { + if (free_filename) + g_free(filename); return model; + } - filename = g_strdup(filename); + if ( !free_filename ) + filename = g_strdup(filename); model = E_TEST_MODEL(e_test_model_new(filename)); g_hash_table_insert(models, filename, model); gtk_signal_connect(GTK_OBJECT(model), "destroy", GTK_SIGNAL_FUNC(remove_model), filename); + return model; } |