[evolution/wip/webkit-composer: 222/372] EMsgComposer: Defer alert handling to EEditorWindow.



commit 8850db5a707be962f66063faa049ffb0f8461d0d
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Feb 7 16:04:15 2013 -0500

    EMsgComposer: Defer alert handling to EEditorWindow.
    
    It's nice having all the base classes in Evolution finally.

 composer/e-composer-private.c |   12 ------------
 composer/e-composer-private.h |    1 -
 composer/e-msg-composer.c     |   38 --------------------------------------
 3 files changed, 0 insertions(+), 51 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 6f40fa0..2b3a205 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -190,13 +190,6 @@ e_composer_private_constructed (EMsgComposer *composer)
        priv->activity_bar = g_object_ref (widget);
        /* EActivityBar controls its own visibility. */
 
-       /* Construct the alert bar for errors. */
-
-       widget = e_alert_bar_new ();
-       gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
-       priv->alert_bar = g_object_ref (widget);
-       /* EAlertBar controls its own visibility. */
-
        /* Construct the header table. */
 
        widget = e_composer_header_table_new (client_cache);
@@ -331,11 +324,6 @@ e_composer_private_dispose (EMsgComposer *composer)
                composer->priv->activity_bar = NULL;
        }
 
-       if (composer->priv->alert_bar != NULL) {
-               g_object_unref (composer->priv->alert_bar);
-               composer->priv->alert_bar = NULL;
-       }
-
        if (composer->priv->attachment_paned != NULL) {
                g_object_unref (composer->priv->attachment_paned);
                composer->priv->attachment_paned = NULL;
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 9c3fc48..522e9b8 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -62,7 +62,6 @@ struct _EMsgComposerPrivate {
 
        GtkWidget *header_table;
        GtkWidget *activity_bar;
-       GtkWidget *alert_bar;
        GtkWidget *attachment_paned;
 
        EFocusTracker *focus_tracker;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 09718df..7f9b727 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -129,14 +129,10 @@ static void       handle_multipart_signed         (EMsgComposer *composer,
                                                 GCancellable *cancellable,
                                                 gint depth);
 
-static void    e_msg_composer_alert_sink_init  (EAlertSinkInterface *interface);
-
 G_DEFINE_TYPE_WITH_CODE (
        EMsgComposer,
        e_msg_composer,
        E_TYPE_EDITOR_WINDOW,
-       G_IMPLEMENT_INTERFACE (
-               E_TYPE_ALERT_SINK, e_msg_composer_alert_sink_init)
        G_IMPLEMENT_INTERFACE (E_TYPE_EXTENSIBLE, NULL))
 
 static void
@@ -2330,34 +2326,6 @@ msg_composer_presend (EMsgComposer *composer)
        return TRUE;
 }
 
-static void
-msg_composer_submit_alert (EAlertSink *alert_sink,
-                           EAlert *alert)
-{
-       EMsgComposerPrivate *priv;
-       EAlertBar *alert_bar;
-       GtkWidget *dialog;
-       GtkWindow *parent;
-
-       priv = E_MSG_COMPOSER_GET_PRIVATE (alert_sink);
-
-       switch (e_alert_get_message_type (alert)) {
-               case GTK_MESSAGE_INFO:
-               case GTK_MESSAGE_WARNING:
-               case GTK_MESSAGE_ERROR:
-                       alert_bar = E_ALERT_BAR (priv->alert_bar);
-                       e_alert_bar_add_alert (alert_bar, alert);
-                       break;
-
-               default:
-                       parent = GTK_WINDOW (alert_sink);
-                       dialog = e_alert_dialog_new (parent, alert);
-                       gtk_dialog_run (GTK_DIALOG (dialog));
-                       gtk_widget_destroy (dialog);
-                       break;
-       }
-}
-
 static gboolean
 msg_composer_accumulator_false_abort (GSignalInvocationHint *ihint,
                                       GValue *return_accu,
@@ -2471,12 +2439,6 @@ e_msg_composer_class_init (EMsgComposerClass *class)
 }
 
 static void
-e_msg_composer_alert_sink_init (EAlertSinkInterface *interface)
-{
-       interface->submit_alert = msg_composer_submit_alert;
-}
-
-static void
 e_msg_composer_init (EMsgComposer *composer)
 {
        composer->priv = E_MSG_COMPOSER_GET_PRIVATE (composer);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]