aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog8
-rw-r--r--composer/e-msg-composer.c24
2 files changed, 23 insertions, 9 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 2da82bcf3d..712b92afbe 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,11 @@
+2000-03-07 Ettore Perazzoli <ettore@helixcode.com>
+
+ * e-msg-composer.c (create_toolbar): Pass the composer as the data
+ for the toolbar callbacks.
+ (e_msg_composer_construct): Connect the "changed" signal of the
+ attachment bar to `attachment_bar_changed()'.
+ (attachment_bar_changed): Renamed to `attachment_bar_changed_cb'.
+
2000-03-02 Ettore Perazzoli <ettore@helixcode.com>
* e-msg-composer.c (e_msg_composer_new): Precondition:
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 91383783f8..d413b8d41a 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -205,7 +205,7 @@ send_cb (GtkWidget *widget,
static void
menu_view_attachments_activate_cb (GtkWidget *widget,
- gpointer data)
+ gpointer data)
{
e_msg_composer_show_attachments (E_MSG_COMPOSER (data),
GTK_CHECK_MENU_ITEM (widget)->active);
@@ -284,8 +284,8 @@ address_dialog_cb (GtkWidget *widget,
}
static void
-attachment_bar_changed (EMsgComposerAttachmentBar *bar,
- gpointer data)
+attachment_bar_changed_cb (EMsgComposerAttachmentBar *bar,
+ gpointer data)
{
EMsgComposer *composer;
@@ -304,16 +304,19 @@ static GnomeUIInfo file_tree[] = {
GNOMEUIINFO_MENU_OPEN_ITEM (NULL, NULL),
GNOMEUIINFO_MENU_SAVE_ITEM (NULL, NULL),
GNOMEUIINFO_MENU_SAVE_AS_ITEM (NULL, NULL),
- GNOMEUIINFO_ITEM_NONE (N_("Save in _folder..."), N_("Save the message in a specified folder"), NULL),
+ GNOMEUIINFO_ITEM_NONE (N_("Save in _folder..."), N_("Save the message in a specified folder"),
+ NULL),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send the message"), NULL, GNOME_STOCK_MENU_MAIL_SND),
+ GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send the message"),
+ send_cb, GNOME_STOCK_MENU_MAIL_SND),
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_MENU_EXIT_ITEM (NULL, NULL),
GNOMEUIINFO_END
};
static GnomeUIInfo view_tree[] = {
- GNOMEUIINFO_ITEM_STOCK (N_("View _attachments"), N_("View/hide attachments"), NULL, GNOME_STOCK_MENU_ATTACH),
+ GNOMEUIINFO_ITEM_STOCK (N_("View _attachments"), N_("View/hide attachments"),
+ menu_view_attachments_activate_cb, GNOME_STOCK_MENU_ATTACH),
GNOMEUIINFO_END
};
@@ -341,14 +344,14 @@ create_menubar (EMsgComposer *composer)
/* Toolbar implementation. */
static GnomeUIInfo toolbar_info[] = {
- GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send this message"), NULL, GNOME_STOCK_PIXMAP_MAIL_SND),
+ GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send this message"), send_cb, GNOME_STOCK_PIXMAP_MAIL_SND),
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_ITEM_STOCK (N_("Cut"), N_("Cut selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_CUT),
GNOMEUIINFO_ITEM_STOCK (N_("Copy"), N_("Copy selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_COPY),
GNOMEUIINFO_ITEM_STOCK (N_("Paste"), N_("Paste selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_PASTE),
GNOMEUIINFO_ITEM_STOCK (N_("Undo"), N_("Undo last operation"), NULL, GNOME_STOCK_PIXMAP_UNDO),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_ITEM_STOCK (N_("Attach"), N_("Attach a file"), NULL, GNOME_STOCK_PIXMAP_ATTACH),
+ GNOMEUIINFO_ITEM_STOCK (N_("Attach"), N_("Attach a file"), add_attachment_cb, GNOME_STOCK_PIXMAP_ATTACH),
GNOMEUIINFO_END
};
@@ -362,7 +365,7 @@ create_toolbar (EMsgComposer *composer)
bonobo_ui_handler_create_toolbar (uih, "Toolbar");
- list = bonobo_ui_handler_toolbar_parse_uiinfo_list (toolbar_info);
+ list = bonobo_ui_handler_toolbar_parse_uiinfo_list_with_data (toolbar_info, composer);
bonobo_ui_handler_toolbar_add_list (uih, "/Toolbar", list);
}
@@ -511,6 +514,9 @@ e_msg_composer_construct (EMsgComposer *composer)
composer->attachment_scrolled_window,
FALSE, TRUE, GNOME_PAD_SMALL);
+ gtk_signal_connect (GTK_OBJECT (composer->attachment_bar), "changed",
+ GTK_SIGNAL_FUNC (attachment_bar_changed_cb), composer);
+
gnome_app_set_contents (GNOME_APP (composer), vbox);
gtk_widget_show (vbox);