aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/folder-browser-factory.c38
-rw-r--r--mail/folder-browser.c3
-rw-r--r--mail/mail-display.c2
-rw-r--r--mail/message-list.c77
5 files changed, 51 insertions, 73 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 5ff4a78035..ce3e7bb60c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -2,6 +2,10 @@
* folder-browser-factory.c (folder_browser_factory_init):
name change.
+ (control_activate_cb): when the control is activated,
+ it merges its own UI with the remote UIHandler.
+ (control_add_menu): sample menu merging.
+ (folder_browser_factory): connect the control "activate" signal.
* evolution-mail.gnorba:
name changes
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 197cb833ed..ce6dfb4750 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -94,6 +94,39 @@ development_warning ()
}
+
+
+static void
+control_add_menu (BonoboControl *control)
+{
+ Bonobo_UIHandler remote_uih;
+ BonoboUIHandler *uih;
+
+ uih = bonobo_control_get_ui_handler (control);
+ g_assert (uih);
+
+ remote_uih = bonobo_control_get_remote_ui_handler (control);
+ bonobo_ui_handler_set_container (uih, remote_uih);
+
+ bonobo_ui_handler_menu_new_item (uih,
+ "/File/Stuff", N_("_Stuff"), NULL, -1,
+ BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, 0, 0,
+ NULL, NULL);
+
+}
+
+
+static void
+control_activate_cb (BonoboControl *control,
+ gboolean activate,
+ gpointer user_data)
+{
+ control_add_menu (control);
+
+}
+
+
+
/*
* Creates the Folder Browser, wraps it in a Bonobo Control, and
* sets the Bonobo Control properties to point to the Folder Browser
@@ -106,6 +139,7 @@ folder_browser_factory (BonoboGenericFactory *factory, void *closure)
GtkWidget *folder_browser;
gint warning_result;
+
warning_result = development_warning ();
if (warning_result)
@@ -127,6 +161,10 @@ folder_browser_factory (BonoboGenericFactory *factory, void *closure)
return NULL;
}
+ gtk_signal_connect (GTK_OBJECT (control), "activate", control_activate_cb, NULL);
+
+
+
bonobo_control_set_property_bag (control,
FOLDER_BROWSER (folder_browser)->properties);
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 130011732b..9a3a8cee9c 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -58,6 +58,7 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
CamelException ex;
gboolean new_folder_exists = FALSE;
+
camel_exception_init (&ex);
new_folder = camel_store_get_folder (default_session->store, name, &ex);
@@ -171,6 +172,8 @@ folder_browser_gui_init (FolderBrowser *fb)
gtk_widget_show (fb->message_list_w);
gtk_paned_add2 (GTK_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
+ gtk_paned_set_position (GTK_PANED (fb->vpaned), 200);
+
gtk_widget_show (GTK_WIDGET (fb->mail_display));
gtk_widget_show (GTK_WIDGET (fb));
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 3f5cbd2bcf..2dc02094f1 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -239,7 +239,7 @@ mail_display_set_message (MailDisplay *mail_display,
* to consecutive call to *_to_html - ber */
camel_formatter = camel_formatter_new ();
-
+
/*
* for the moment, camel-formatter deals only with
* mime messages, but in the future, it should be
diff --git a/mail/message-list.c b/mail/message-list.c
index caaede7d3a..c7190c71dd 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -394,75 +394,7 @@ message_list_init_header (MessageList *message_list)
-#if 0
-static void
-set_header_size (GnomeCanvas *canvas, GtkAllocation *alloc)
-{
- printf ("Here\n");
- gnome_canvas_set_scroll_region (canvas, 0, 0, alloc->width, alloc->height);
-}
-static void
-set_content_size (GnomeCanvas *canvas, GtkAllocation *alloc)
-{
- printf ("Here2\n");
- gnome_canvas_set_scroll_region (canvas, 0, 0, alloc->width, alloc->height);
-}
-
-
-static GtkWidget *
-make_etable (MessageList *message_list)
-{
- GtkTable *t;
- GtkWidget *header, *content;
-
- t = (GtkTable *) gtk_table_new (0, 0, 0);
- gtk_widget_show (GTK_WIDGET (t));
-
- gtk_widget_push_visual (gdk_rgb_get_visual ());
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
- header = gnome_canvas_new ();
- gtk_signal_connect (GTK_OBJECT (header), "size_allocate",
- GTK_SIGNAL_FUNC (set_header_size), NULL);
- gtk_widget_set_usize (header, 300, 20);
- gtk_widget_show (header);
- content = gnome_canvas_new ();
- gtk_widget_set_usize (content, 300, 20);
- gtk_signal_connect (GTK_OBJECT (content), "size_allocate",
- GTK_SIGNAL_FUNC (set_content_size), NULL);
- gtk_widget_show (content);
-
- gtk_widget_pop_colormap ();
- gtk_widget_pop_visual ();
-
- gnome_canvas_item_new (
- gnome_canvas_root (GNOME_CANVAS (header)),
- e_table_header_item_get_type (),
- "ETableHeader", message_list->header_model,
- NULL);
-
- gnome_canvas_item_new (
- gnome_canvas_root (GNOME_CANVAS (content)),
- e_table_item_get_type (),
- "ETableHeader", message_list->header_model,
- "ETableModel", message_list->table_model,
- "drawgrid", TRUE,
- "drawfocus", TRUE,
- "spreadsheet", TRUE,
- NULL);
-
- gtk_table_attach (t, header,
- 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
-
- gtk_table_attach (t, content,
- 0, 1, 1, 2,
- GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
-
-
- return t;
-}
-#endif
/*
* GtkObject::init
@@ -471,7 +403,7 @@ static void
message_list_init (GtkObject *object)
{
MessageList *message_list = MESSAGE_LIST (object);
-
+
message_list->table_model = e_table_simple_new (
ml_col_count, ml_row_count, ml_value_at,
ml_set_value_at, ml_is_cell_editable, ml_duplicate_value, ml_free_value,
@@ -505,9 +437,10 @@ message_list_destroy (GtkObject *object)
MessageList *message_list = MESSAGE_LIST (object);
int i;
+
gtk_object_unref (GTK_OBJECT (message_list->table_model));
gtk_object_unref (GTK_OBJECT (message_list->header_model));
-
+
/*
* Renderers
*/
@@ -521,7 +454,7 @@ message_list_destroy (GtkObject *object)
for (i = 0; i < COL_LAST; i++)
gtk_object_unref (GTK_OBJECT (message_list->table_cols [i]));
-
+
GTK_OBJECT_CLASS (message_list_parent_class)->destroy (object);
}
@@ -698,7 +631,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder)
printf ("Modelo cambio!\n");
e_table_model_changed (message_list->table_model);
- select_msg (message_list, 1);
+ select_msg (message_list, 0);
}
GtkWidget *