[evolution/webkit-composer: 161/185] EMsgComposer: Defer alert handling to EEditorWindow.



commit e95115bf7bf5550f94aa7a8856aae830d2be9a51
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, 51 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index e97ca27..b2eb55c 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -191,13 +191,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 (shell, registry);
@@ -332,11 +325,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 fc358b9..a2631b7 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -63,7 +63,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 900aeef..0491a62 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -125,14 +125,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
@@ -2313,34 +2309,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,
@@ -2454,12 +2422,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]