[evolution/webkit-composer: 157/210] EMsgComposer: Defer alert handling to EEditorWindow.



commit 6655aed192766633e62de1c199b26725053ed8ac
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 e126dea..64c13e4 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 (client_cache);
@@ -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 8f21ee8..504d483 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
@@ -2311,34 +2307,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,
@@ -2452,12 +2420,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]