X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-signature-editor-dialog.c;h=1daf304a07d66aa6dcf6ebfef559a7fbc9d47ae8;hb=ed0f4872e0f92fae59976bebb6b0508fb09c091f;hp=745b1b68f08a0288ba34357c220e844694f07607;hpb=cbecf763eb1ac1c1aa583234639c33124ef437ea;p=modest diff --git a/src/maemo/modest-signature-editor-dialog.c b/src/maemo/modest-signature-editor-dialog.c index 745b1b6..1daf304 100644 --- a/src/maemo/modest-signature-editor-dialog.c +++ b/src/maemo/modest-signature-editor-dialog.c @@ -1,11 +1,39 @@ -/* connection-specific-smtp-window.c */ +/* Copyright (c) 2006, Nokia Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the Nokia Corporation nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ #include "modest-signature-editor-dialog.h" -#include "maemo/modest-maemo-ui-constants.h" +#include "widgets/modest-ui-constants.h" #include "modest-hildon-includes.h" #include "widgets/modest-serversecurity-combo-box.h" #include "widgets/modest-secureauth-combo-box.h" #include "widgets/modest-validating-entry.h" +#include "modest-runtime.h" #include #include #include @@ -14,8 +42,8 @@ #include #include #include - #include +#include G_DEFINE_TYPE (ModestSignatureEditorDialog, modest_signature_editor_dialog, GTK_TYPE_DIALOG); @@ -122,8 +150,9 @@ modest_signature_editor_dialog_init (ModestSignatureEditorDialog *self) gtk_widget_show (priv->label); priv->scrolledwindow = gtk_scrolled_window_new (NULL, NULL); + gtk_container_set_border_width (GTK_CONTAINER (priv->scrolledwindow), MODEST_MARGIN_DEFAULT); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolledwindow), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->scrolledwindow), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX (box), priv->scrolledwindow, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (priv->scrolledwindow); @@ -135,11 +164,18 @@ modest_signature_editor_dialog_init (ModestSignatureEditorDialog *self) gtk_text_buffer_set_text (buffer, "--\n", -1); /* Default, as per the UI spec. */ /* Add the buttons: */ - gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_OK, GTK_RESPONSE_OK); - gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - + gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_ok"), GTK_RESPONSE_OK); + gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_cancel"), GTK_RESPONSE_CANCEL); gtk_widget_show (box); + + /* When this window is shown, hibernation should not be possible, + * because there is no sensible way to save the state: */ + modest_window_mgr_prevent_hibernation_while_window_is_shown ( + modest_runtime_get_window_mgr (), GTK_WINDOW (self)); + + hildon_help_dialog_help_enable (GTK_DIALOG(self), "applications_email_signatureeditor", + modest_maemo_utils_get_osso_context()); } ModestSignatureEditorDialog*