aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2005-05-16 19:39:08 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2005-05-16 19:39:08 +0800
commit903becfede2bbdc739de5da88ca1341cac3ababf (patch)
tree30255f5a7fe22a7c2c2d79369f4e191243e52bcc
parent1b7f8af0fa537de73c005a3853cb3ba7ea2fd91e (diff)
downloadgsoc2013-evolution-903becfede2bbdc739de5da88ca1341cac3ababf.tar
gsoc2013-evolution-903becfede2bbdc739de5da88ca1341cac3ababf.tar.gz
gsoc2013-evolution-903becfede2bbdc739de5da88ca1341cac3ababf.tar.bz2
gsoc2013-evolution-903becfede2bbdc739de5da88ca1341cac3ababf.tar.lz
gsoc2013-evolution-903becfede2bbdc739de5da88ca1341cac3ababf.tar.xz
gsoc2013-evolution-903becfede2bbdc739de5da88ca1341cac3ababf.tar.zst
gsoc2013-evolution-903becfede2bbdc739de5da88ca1341cac3ababf.zip
composer/e-message-composer.c calendar/gui/dialogs/comp-editor.c
2005-05-16 Srinivasa Ragavan <sragavan@novell.com> * composer/e-message-composer.c * calendar/gui/dialogs/comp-editor.c * ui/evolutoin-message-composer.xml Removed the expander for the attachment bar and made visible always. svn path=/trunk/; revision=29373
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/gui/dialogs/comp-editor.c43
-rw-r--r--composer/ChangeLog7
-rw-r--r--composer/e-msg-composer.c92
-rw-r--r--ui/ChangeLog6
-rw-r--r--ui/evolution-message-composer.xml4
6 files changed, 39 insertions, 121 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6e79c8b2a8..51b16ddba7 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2005-05-16 Srinivasa Ragavan <sragavan@novell.com>
+
+ * gui/dialogs/comp-editor.c (attachment_bar_changed_cb)
+ (attachment_bar_icon_clicked_cb) (setup_widgets)
+ (comp_editor_sensitize_attachment_bar) (fill_widgets):
+ Removed the expander in calendar attachment. It keeps showing
+ now, to ease DnD.
+
2005-05-16 Chenthill Palanisamy <pchenthill@novell.com>
* gui/gnome-cal.c: (client_cal_opened_cb),
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 5414b60e9d..49a5240b31 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -846,7 +846,7 @@ attachment_bar_changed_cb (CalAttachmentBar *bar,
CAL_ATTACHMENT_BAR (editor->priv->attachment_bar));
if (attachment_num) {
gchar *num_text = g_strdup_printf (
- ngettext ("<b>%d</b> File Attached", "<b>%d</b> Files Attached", attachment_num),
+ ngettext ("<b>%d</b> Attachment", "<b>%d</b> Attachments", attachment_num),
attachment_num);
gtk_label_set_markup (GTK_LABEL (editor->priv->attachment_expander_num),
num_text);
@@ -893,23 +893,6 @@ attachment_bar_icon_clicked_cb (CalAttachmentBar *bar, GdkEvent *event, void *da
return FALSE;
}
-static void
-attachment_expander_activate_cb (EExpander *expander,
- void *data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- gboolean show = e_expander_get_expanded (expander);
-
- /* Update the expander label */
- if (show)
- gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
- _("Hide _Attachment Bar (drop attachments here)"));
- else
- gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
- _("Show _Attachment Bar (drop attachments here)"));
-
-}
-
/* Creates the basic in the editor */
static void
setup_widgets (CompEditor *editor)
@@ -958,7 +941,7 @@ setup_widgets (CompEditor *editor)
g_signal_connect (GNOME_ICON_LIST (priv->attachment_bar), "event",
G_CALLBACK (attachment_bar_icon_clicked_cb), NULL);
priv->attachment_expander_label =
- gtk_label_new_with_mnemonic (_("Show _Attachment Bar (drop attachments here)"));
+ gtk_label_new_with_mnemonic (_("_Attachment Bar (drop attachments here)"));
priv->attachment_expander_num = gtk_label_new ("");
gtk_label_set_use_markup (GTK_LABEL (priv->attachment_expander_num), TRUE);
gtk_misc_set_alignment (GTK_MISC (priv->attachment_expander_label), 0.0, 0.5);
@@ -976,22 +959,16 @@ setup_widgets (CompEditor *editor)
gtk_box_pack_start (GTK_BOX (expander_hbox), priv->attachment_expander_icon,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (expander_hbox), priv->attachment_expander_num,
- TRUE, TRUE, 0);
+ FALSE, TRUE, 0);
gtk_widget_show_all (expander_hbox);
gtk_widget_hide (priv->attachment_expander_icon);
- priv->attachment_expander = e_expander_new ("");
- e_expander_set_label_widget (E_EXPANDER (priv->attachment_expander), expander_hbox);
- atk_object_set_name (gtk_widget_get_accessible (priv->attachment_expander), _("Attachment Button: Press space key to toggle attachment bar"));
-
- gtk_container_add (GTK_CONTAINER (priv->attachment_expander),
- priv->attachment_scrolled_window);
- gtk_box_pack_start (GTK_BOX (vbox), priv->attachment_expander,
- FALSE, FALSE, GNOME_PAD_SMALL);
- gtk_widget_show (priv->attachment_expander);
- e_expander_set_expanded (E_EXPANDER (priv->attachment_expander), FALSE);
- g_signal_connect_after (priv->attachment_expander, "activate",
- G_CALLBACK (attachment_expander_activate_cb), editor);
+ gtk_box_pack_start (GTK_BOX (vbox), expander_hbox,
+ FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), priv->attachment_scrolled_window, FALSE, FALSE, GNOME_PAD_SMALL);
+
+ gtk_widget_show (priv->attachment_scrolled_window);
+ gtk_widget_show (expander_hbox);
}
@@ -1007,7 +984,6 @@ comp_editor_sensitize_attachment_bar (CompEditor *editor, gboolean set)
gtk_widget_set_sensitive (GTK_WIDGET (priv->attachment_bar), set);
gtk_widget_set_sensitive (GTK_WIDGET (priv->attachment_scrolled_window), set);
- gtk_widget_set_sensitive (GTK_WIDGET (priv->attachment_expander), set);
}
/* Object initialization function for the calendar component editor */
@@ -1697,7 +1673,6 @@ fill_widgets (CompEditor *editor)
e_cal_component_get_attachment_list (priv->comp, &attachment_list);
cal_attachment_bar_set_attachment_list
((CalAttachmentBar *)priv->attachment_bar, attachment_list);
- e_expander_set_expanded (E_EXPANDER (priv->attachment_expander), TRUE);
}
for (l = priv->pages; l != NULL; l = l->next)
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 7baa0326ab..f635ebce9e 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-16 Srinivasa Ragavan <sragavan@novell.com>
+
+ * e-msg-composer.c (set_editor_text) (menu_edit_delete_all_cb)
+ (setup_ui) (attachment_bar_changed_cb) (create_composer)
+ (e_msg_composer_new_from_url): Removed the expander in the
+ composer attachment and made it visible all the times.
+
2005-05-16 Not Zed <NotZed@Ximian.com>
* moved e-error to e-util.
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index b921537747..350b31c784 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1192,13 +1192,6 @@ set_editor_text(EMsgComposer *composer, const char *text, ssize_t len, int set_s
/* Commands. */
static void
-show_attachments (EMsgComposer *composer,
- gboolean show)
-{
- e_expander_set_expanded (E_EXPANDER (composer->attachment_expander), show);
-}
-
-static void
save (EMsgComposer *composer, const char *filename)
{
CORBA_Environment ev;
@@ -1768,24 +1761,6 @@ menu_edit_delete_all_cb (BonoboUIComponent *uic, void *data, const char *path)
}
static void
-menu_view_attachments_activate_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-
-{
- gboolean new_state;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- new_state = atoi (state);
-
- e_msg_composer_show_attachments (E_MSG_COMPOSER (user_data), new_state);
-}
-
-static void
menu_format_html_cb (BonoboUIComponent *component,
const char *path,
Bonobo_UIComponent_EventType type,
@@ -2305,11 +2280,6 @@ setup_ui (EMsgComposer *composer)
composer->uic, "SecuritySMimeEncrypt",
menu_security_smime_encrypt_cb, composer);
- /* View -> Attachments */
- bonobo_ui_component_add_listener (
- composer->uic, "ViewAttach",
- menu_view_attachments_activate_cb, composer);
-
bonobo_ui_component_thaw (composer->uic, NULL);
/* Create the UIComponent for the non-control entries */
@@ -2335,7 +2305,7 @@ attachment_bar_changed_cb (EMsgComposerAttachmentBar *bar,
E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar));
if (attachment_num) {
gchar *num_text = g_strdup_printf (
- ngettext ("<b>%d</b> File Attached", "<b>%d</b> Files Attached", attachment_num),
+ ngettext ("<b>%d</b> Attachment", "<b>%d</b> Attachments", attachment_num),
attachment_num);
gtk_label_set_markup (GTK_LABEL (composer->attachment_expander_num),
num_text);
@@ -2355,27 +2325,6 @@ attachment_bar_changed_cb (EMsgComposerAttachmentBar *bar,
}
static void
-attachment_expander_activate_cb (EExpander *expander,
- void *data)
-{
- EMsgComposer *composer = E_MSG_COMPOSER (data);
- gboolean show = e_expander_get_expanded (expander);
-
- /* Update the expander label */
- if (show)
- gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->attachment_expander_label),
- _("Hide _Attachment Bar (drop attachments here)"));
- else
- gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->attachment_expander_label),
- _("Show _Attachment Bar (drop attachments here)"));
-
- /* Update the GUI. */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewAttach",
- "state", show ? "1" : "0", NULL);
-}
-
-static void
subject_changed_cb (EMsgComposerHdrs *hdrs,
gchar *subject,
void *data)
@@ -3512,7 +3461,7 @@ create_composer (int visible_mask)
G_CALLBACK (attachment_bar_changed_cb), composer);
composer->attachment_expander_label =
- gtk_label_new_with_mnemonic (_("Show _Attachment Bar (drop attachments here)"));
+ gtk_label_new_with_mnemonic (_("_Attachment Bar (drop attachments here)"));
composer->attachment_expander_num = gtk_label_new ("");
gtk_label_set_use_markup (GTK_LABEL (composer->attachment_expander_num), TRUE);
gtk_misc_set_alignment (GTK_MISC (composer->attachment_expander_label), 0.0, 0.5);
@@ -3524,25 +3473,21 @@ create_composer (int visible_mask)
gtk_widget_set_size_request (composer->attachment_expander_icon, 100, -1);
gtk_box_pack_start (GTK_BOX (expander_hbox), composer->attachment_expander_label,
- TRUE, TRUE, 0);
+ TRUE, TRUE, GNOME_PAD_SMALL);
gtk_box_pack_start (GTK_BOX (expander_hbox), composer->attachment_expander_icon,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (expander_hbox), composer->attachment_expander_num,
- TRUE, TRUE, 0);
+ FALSE, FALSE, GNOME_PAD_SMALL);
gtk_widget_show_all (expander_hbox);
gtk_widget_hide (composer->attachment_expander_icon);
- composer->attachment_expander = e_expander_new ("");
- e_expander_set_label_widget (E_EXPANDER (composer->attachment_expander), expander_hbox);
- atk_object_set_name (gtk_widget_get_accessible (composer->attachment_expander), _("Attachment Button: Press space key to toggle attachment bar"));
- gtk_container_add (GTK_CONTAINER (composer->attachment_expander),
- composer->attachment_scrolled_window);
- gtk_box_pack_start (GTK_BOX (vbox), composer->attachment_expander,
+ gtk_box_pack_start (GTK_BOX (vbox), expander_hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), composer->attachment_scrolled_window,
FALSE, FALSE, GNOME_PAD_SMALL);
- gtk_widget_show (composer->attachment_expander);
- g_signal_connect_after (composer->attachment_expander, "activate",
- G_CALLBACK (attachment_expander_activate_cb), composer);
+
+ gtk_widget_show (composer->attachment_scrolled_window);
+ gtk_widget_show (expander_hbox);
bonobo_window_set_contents (BONOBO_WINDOW (composer), vbox);
gtk_widget_show (vbox);
@@ -3552,7 +3497,6 @@ create_composer (int visible_mask)
variable. */
gtk_widget_show (composer->editor);
- e_msg_composer_show_attachments (composer, FALSE);
prepare_engine (composer);
if (composer->editor_engine == CORBA_OBJECT_NIL) {
e_error_run (GTK_WINDOW (composer), "mail-composer:no-editor-control", NULL);
@@ -4514,24 +4458,6 @@ e_msg_composer_new_from_url (const char *url)
/**
- * e_msg_composer_show_attachments:
- * @composer: A message composer widget
- * @show: A boolean specifying whether the attachment bar should be shown or
- * not
- *
- * If @show is %FALSE, hide the attachment bar. Otherwise, show it.
- **/
-void
-e_msg_composer_show_attachments (EMsgComposer *composer,
- gboolean show)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- show_attachments (composer, show);
-}
-
-
-/**
* e_msg_composer_set_headers:
* @composer: a composer object
* @from: the name of the account the user will send from,
diff --git a/ui/ChangeLog b/ui/ChangeLog
index 243551ce2f..3bd28d3572 100644
--- a/ui/ChangeLog
+++ b/ui/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-16 Srinivasa Ragavan <sragavan@novell.com>
+
+ * evolution-message-composer.xml: Removed the Show Attachment
+ menu item, since the attachment bar cannot be made hidden
+ any more and is visible always
+
2005-05-13 Rodney Dawes <dobey@novell.com>
* *.xml: Update to the new menu layout
diff --git a/ui/evolution-message-composer.xml b/ui/evolution-message-composer.xml
index bd21387446..429429070d 100644
--- a/ui/evolution-message-composer.xml
+++ b/ui/evolution-message-composer.xml
@@ -61,8 +61,6 @@
_tip="Toggles whether the BCC field is displayed"
type="toggle" state="0"/>
- <cmd name="ViewAttach" _label="Show attachments" _tip="Show / hide attachments"
- type="toggle" state="0"/>
<cmd name="SecurityPGPSign" _label="PGP Sign" _tip="Sign this message with your PGP key"
type="toggle" state="0"/>
@@ -122,8 +120,6 @@
</submenu>
<submenu name="View" _label="_View">
- <menuitem name="ViewAttach" verb="" _label="Show _attachments"/>
- <separator f="" name="emailcomposer"/>
<menuitem name="ViewFrom" verb=""/>
<menuitem name="ViewTo" verb=""/>
<menuitem name="ViewPostTo" verb=""/>