aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-11-04 02:55:41 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-11-04 02:55:41 +0800
commit1cb19b5a1b927467589f3b0700c80d74669f8735 (patch)
treebbd4c096a8de075c2573a49ec002d1fc86baf2de /mail/message-list.c
parent19983a967556879fb9947c4319dbc9250a304168 (diff)
downloadgsoc2013-evolution-1cb19b5a1b927467589f3b0700c80d74669f8735.tar.gz
gsoc2013-evolution-1cb19b5a1b927467589f3b0700c80d74669f8735.tar.zst
gsoc2013-evolution-1cb19b5a1b927467589f3b0700c80d74669f8735.zip
Added new header files.
2000-11-03 Jeffrey Stedfast <fejj@helixcode.com> * Makefile.am: Added new header files. * component-factory.c (owner_set_cb): s/session_init/mail_session_init * session.c: Renamed public functions to mail_session_*. FIXME: Rename session.c to mail-session.c * folder-browser-factory.c: #include "mail-callbacks.h", #include "mail-session.h" and replace forget_passwords with mail_session_forget_passwords * mail.h: Move session prototypes to mail-session.h, Move mail-crypto prototypes to mail-crypto.h, Move mail-callback prototypes to mail-callbacks.h * mail-session.h: New header file containing public prototypes for session.c * mail-format.c: #include "mail-crypto.h" * mail-view.c: * folder-browser.c: #include "mail-callbacks.h" * mail-crypto.h: New header file containing public prototypes for mail-crypto.c * mail-callbacks.h: New header file containing public prototypes for mail-callbacks.c * message-list.c (message_list_get_layout): Set useful defaults. (message_list_setup_etable): Don't set the Outbox defaults on a folder just because it doesn't have a corresponding saved file. svn path=/trunk/; revision=6372
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 8076d8c3fa..768d3f6fdf 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -359,8 +359,8 @@ message_list_drag_data_get (ETable *table,
char *url;
switch (info) {
- case DND_TARGET_TYPE_URI_LIST:
- dirname = mkdtemp (dirname);
+ case DND_TARGET_LIST_TYPE_URI:
+ mktemp (dirname);
filename = g_strdup_printf ("%s.eml", info->subject);
url = g_strdup_printf ("file:%s", dirname);
@@ -382,7 +382,6 @@ message_list_drag_data_get (ETable *table,
default:
break;
}
- e_table_drag_source_set (table, GDK_BUTTON1_MASK, drag_types, num_drag_types, GDK_ACTION_MOVE);
}
#endif
@@ -904,7 +903,7 @@ save_header_state(MessageList *ml)
static char *
message_list_get_layout (MessageList *message_list)
{
- /* Message status, From, Subject, Sent Date */
+ /* Default: Status, Attachments, Priority, From, Subject, Date */
return g_strdup ("<ETableSpecification cursor-mode=\"line\" draw-grid=\"true\">"
"<ETableColumn model_col= \"0\" pixbuf=\"status\" expansion=\"0.0\" minimum_width=\"18\" resizable=\"false\" cell=\"render_message_status\" compare=\"integer\" sortable=\"false\"/>"
"<ETableColumn model_col= \"1\" pixbuf=\"flagged\" expansion=\"0.0\" minimum_width=\"20\" resizable=\"false\" cell=\"render_flagged\" compare=\"integer\"/>"
@@ -916,8 +915,8 @@ message_list_get_layout (MessageList *message_list)
"<ETableColumn model_col= \"7\" _title=\"Received\" expansion=\"20.0\" minimum_width=\"32\" resizable=\"true\" cell=\"render_date\" compare=\"integer\"/>"
"<ETableColumn model_col= \"8\" _title=\"To\" expansion=\"24.0\" minimum_width=\"32\" resizable=\"true\" cell=\"render_text\" compare=\"address_compare\"/>"
"<ETableColumn model_col= \"9\" _title=\"Size\" expansion=\"6.0\" minimum_width=\"32\" resizable=\"true\" cell=\"render_text\" compare=\"string\"/>"
- "<ETableState> <column source=\"0\"/> <column source=\"1\"/> <column source=\"4\"/>"
- "<column source=\"5\"/> <column source=\"6\"/>"
+ "<ETableState> <column source=\"0\"/> <column source=\"3\"/> <column source=\"1\"/>"
+ "<column source=\"4\"/> <column source=\"5\"/> <column source=\"6\"/>"
"<grouping> </grouping> </ETableState>"
"</ETableSpecification>");
}
@@ -925,32 +924,32 @@ message_list_get_layout (MessageList *message_list)
static void
message_list_setup_etable(MessageList *message_list)
{
- char *state = "<ETableState>"
- "<column source=\"0\"/> <column source=\"1\"/> "
- "<column source=\"8\"/> <column source=\"5\"/> "
- "<column source=\"6\"/> <grouping> </grouping> </ETableState>";
-
/* build the spec based on the folder, and possibly from a saved file */
/* otherwise, leave default */
if (message_list->folder) {
- char *name;
char *path;
+ char *name;
struct stat st;
- path = mail_config_folder_to_cachename(message_list->folder, "et-header-");
- if (path && stat(path, &st) == 0 && st.st_size > 0 && S_ISREG(st.st_mode)) {
- e_table_scrolled_load_state(E_TABLE_SCROLLED (message_list->etable), path);
- } else {
- /* I wonder if there's a better way to do this ...? */
- name = camel_service_get_name(CAMEL_SERVICE(message_list->folder->parent_store), TRUE);
- printf ("folder name is '%s'\n", name);
- if (strstr (name, "/Drafts") != NULL
- || strstr (name, "/Outbox") != NULL
- || strstr (name, "/Sent") != NULL) {
- e_table_scrolled_set_state(E_TABLE_SCROLLED(message_list->etable), state);
- }
+ name = camel_service_get_name (CAMEL_SERVICE (message_list->folder->parent_store), TRUE);
+ printf ("folder name is '%s'\n", name);
+ path = mail_config_folder_to_cachename (message_list->folder, "et-header-");
+
+ if (path && stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
+ /* build based on saved file */
+ e_table_scrolled_load_state (E_TABLE_SCROLLED (message_list->etable), path);
+ } else if (strstr (name, "/Drafts") || strstr (name, "/Outbox") || strstr (name, "/Sent")) {
+ /* these folders have special defaults */
+ char *state = "<ETableState>"
+ "<column source=\"0\"/> <column source=\"1\"/> "
+ "<column source=\"8\"/> <column source=\"5\"/> "
+ "<column source=\"6\"/> <grouping> </grouping> </ETableState>";
+
+ e_table_scrolled_set_state (E_TABLE_SCROLLED (message_list->etable), state);
}
+
g_free (path);
+ g_free (name);
}
}