From a40da8d5704e3c3eed1cc9fd9d5bf9eab554a7db Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 28 May 2001 01:24:41 +0000 Subject: Removed the etable spec string. (message_list_construct): Load the etable 2001-05-27 Jeffrey Stedfast * message-list.c: Removed the etable spec string. (message_list_construct): Load the etable spec from a file. * folder-browser-factory.c: Load the etable spec from the file, not a string. * Makefile.am: Add message-list.etspec to be installed. * message-list.etspec: New file containing the ETable file specification. * mail-config.h: Prototype evolution_mail_config_get_type. svn path=/trunk/; revision=10025 --- mail/ChangeLog | 11 +++++++++++ mail/Makefile.am | 6 +++++- mail/folder-browser-factory.c | 6 ++---- mail/message-list.c | 40 +++++----------------------------------- mail/message-list.etspec | 17 +++++++++++++++++ mail/message-list.h | 2 -- 6 files changed, 40 insertions(+), 42 deletions(-) create mode 100644 mail/message-list.etspec (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 25a671cf97..474f9455cb 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,16 @@ 2001-05-27 Jeffrey Stedfast + * message-list.c: Removed the etable spec string. + (message_list_construct): Load the etable spec from a file. + + * folder-browser-factory.c: Load the etable spec from the file, + not a string. + + * Makefile.am: Add message-list.etspec to be installed. + + * message-list.etspec: New file containing the ETable file + specification. + * mail-config.h: Prototype evolution_mail_config_get_type. 2001-05-27 Dan Winship diff --git a/mail/Makefile.am b/mail/Makefile.am index efb646be08..4b6f24eea8 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -24,6 +24,7 @@ INCLUDES = \ $(MAILER_CFLAGS) \ -DEVOLUTION_DATADIR=\""$(datadir)"\" \ -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \ -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \ -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \ @@ -160,13 +161,16 @@ oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) gladedir = $(datadir)/evolution/glade glade_DATA = mail-config.glade local-config.glade +etspecdir = $(datadir)/evolution/etspec/ +etspec_DATA = message-list.etspec + iconsdir = $(datadir)/images/evolution $(EVOLUTION_MAIL_CORBA_GENERATED): Mail.idl $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl -I `$(GNOME_CONFIG) --cflags idl` \ -I `$(GNOME_CONFIG) --datadir`/idl $(srcdir)/Mail.idl -EXTRA_DIST = Mail.idl $(glade_DATA) $(oaf_in_files) $(oaf_DATA) +EXTRA_DIST = Mail.idl $(glade_DATA) $(oaf_in_files) $(oaf_DATA) $(etspec_DATA) if ENABLE_PURIFY PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index f76c858b05..e9bd4adc87 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -155,7 +155,7 @@ folder_browser_setup_view_menus (FolderBrowser *fb, GalViewMenus *views; GalViewFactory *factory; ETableSpecification *spec; - char *spec_string, *local_dir; + char *local_dir; collection = gal_view_collection_new(); /* FIXME: Memory leak. */ @@ -167,10 +167,8 @@ folder_browser_setup_view_menus (FolderBrowser *fb, local_dir); g_free (local_dir); - spec_string = message_list_get_layout(fb->message_list); spec = e_table_specification_new(); - e_table_specification_load_from_string(spec, spec_string); - g_free(spec_string); + e_table_specification_load_from_file(spec, EVOLUTION_ETSPECDIR "/message-list.etspec"); factory = gal_view_factory_etable_new(spec); gal_view_collection_add_factory(collection, factory); diff --git a/mail/message-list.c b/mail/message-list.c index 2abf62abb4..0690a747c8 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1083,35 +1083,6 @@ save_tree_state(MessageList *ml) g_free(filename); } -#ifdef JUST_FOR_TRANSLATORS -static char *list [] = { - N_("Status"), N_("Flagged"), N_("Score"), N_("Attachment"), - N_("From"), N_("Subject"), N_("Date"), N_("Received"), - N_("To"), N_("Size") -}; -#endif - -char * -message_list_get_layout (MessageList *message_list) -{ - /* Default: Status, Attachments, Priority, From, Subject, Date */ - return g_strdup ("" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - " " - " " - " " - ""); -} - static void message_list_setup_etree(MessageList *message_list, gboolean outgoing) { @@ -1252,7 +1223,6 @@ static void message_list_construct (MessageList *message_list) { ETableExtras *extras; - char *spec; message_list->model = e_tree_memory_callbacks_new (ml_tree_icon_at, @@ -1284,16 +1254,16 @@ message_list_construct (MessageList *message_list) /* * The etree */ - spec = message_list_get_layout (message_list); extras = message_list_create_extras (); - e_tree_scrolled_construct (E_TREE_SCROLLED (message_list), - message_list->model, - extras, spec, NULL); + e_tree_scrolled_construct_from_spec_file (E_TREE_SCROLLED (message_list), + message_list->model, + extras, + EVOLUTION_ETSPECDIR "/message-list.etspec", + NULL); message_list->tree = e_tree_scrolled_get_tree(E_TREE_SCROLLED (message_list)); e_tree_root_node_set_visible (message_list->tree, FALSE); - g_free (spec); gtk_object_sink (GTK_OBJECT (extras)); gtk_signal_connect (GTK_OBJECT (message_list->tree), "cursor_activated", diff --git a/mail/message-list.etspec b/mail/message-list.etspec new file mode 100644 index 0000000000..3910f688bd --- /dev/null +++ b/mail/message-list.etspec @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/mail/message-list.h b/mail/message-list.h index 86c5caf3df..4ec10f61ca 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -129,8 +129,6 @@ void message_list_set_threaded(MessageList *ml, gboolean threaded); void message_list_set_hidedeleted(MessageList *ml, gboolean hidedeleted); void message_list_set_search(MessageList *ml, const char *search); -char *message_list_get_layout (MessageList *message_list); - #define MESSAGE_LIST_LOCK(m, l) g_mutex_lock(((MessageList *)m)->l) #define MESSAGE_LIST_UNLOCK(m, l) g_mutex_unlock(((MessageList *)m)->l) -- cgit v1.2.3