[Libreoffice-commits] core.git: sfx2/AllLangResTarget_sfx2.mk sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

Caolán McNamara caolanm at redhat.com
Fri Aug 23 12:16:04 PDT 2013


 sfx2/AllLangResTarget_sfx2.mk            |    1 
 sfx2/UIConfig_sfx.mk                     |    1 
 sfx2/source/dialog/dialog.hrc            |    2 -
 sfx2/source/dialog/mailmodel.cxx         |    4 +--
 sfx2/source/dialog/mailwindow.src        |   34 ------------------------------
 sfx2/uiconfig/ui/errorfindemaildialog.ui |   35 +++++++++++++++++++++++++++++++
 6 files changed, 38 insertions(+), 39 deletions(-)

New commits:
commit 16b20502b2fdc0df576c21920529430d170268a8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 23 20:15:21 2013 +0100

    convert email config error dialog to .ui
    
    Change-Id: Ieeac40fed60450514469fe1c2bd62f61e174591b

diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index 5deaab6..c9fc44a 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -47,7 +47,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
     sfx2/source/dialog/dinfdlg.src \
     sfx2/source/dialog/filedlghelper.src \
     sfx2/source/dialog/inputdlg.src \
-    sfx2/source/dialog/mailwindow.src \
     sfx2/source/dialog/newstyle.src \
     sfx2/source/dialog/recfloat.src \
     sfx2/source/dialog/srchdlg.src \
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index bda13f5..79cb77e 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
 	sfx2/uiconfig/ui/documentfontspage \
 	sfx2/uiconfig/ui/documentinfopage \
 	sfx2/uiconfig/ui/documentpropertiesdialog \
+	sfx2/uiconfig/ui/errorfindemaildialog \
 	sfx2/uiconfig/ui/licensedialog \
 	sfx2/uiconfig/ui/managestylepage \
 	sfx2/uiconfig/ui/optprintpage \
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 6f9a8d1..2ba62ae 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -52,8 +52,6 @@
 
 #define STR_APPLY                       ( RC_DIALOG_BEGIN + 87 )
 
-#define RID_ERRBOX_MAIL_CONFIG          ( RC_DIALOG_BEGIN + 92 )
-
 // 100-106 in tbxcust.hrc
 #define STR_MACRO_LOSS                  ( RC_DIALOG_BEGIN + 107 )
 #define STR_CANCEL_RECORDING            ( RC_DIALOG_BEGIN + 108 )
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 9332f65..e02bdd4 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -51,7 +51,7 @@
 #include <rtl/uri.h>
 #include <rtl/uri.hxx>
 #include <rtl/ustrbuf.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 
 #include <sfx2/mailmodelapi.hxx>
 #include "sfxtypes.hxx"
@@ -892,7 +892,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
                     SolarMutexGuard aGuard;
                     Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
 
-                    ErrorBox aBox( pParentWindow, SfxResId( RID_ERRBOX_MAIL_CONFIG ));
+                    MessageDialog aBox(pParentWindow, "ErrorFindEmailDialog", "sfx/ui/errorfindemaildialog.ui");
                     aBox.Execute();
                     eResult = SEND_MAIL_CANCELLED;
                 }
diff --git a/sfx2/source/dialog/mailwindow.src b/sfx2/source/dialog/mailwindow.src
deleted file mode 100644
index 8fd12ac..0000000
--- a/sfx2/source/dialog/mailwindow.src
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "dialog.hrc"
-#include "helpid.hrc"
-
-// RID_ERRBOX_MAIL_CONFIG ---------------------------------------------------
-
-ErrorBox RID_ERRBOX_MAIL_CONFIG
-{
-    BUTTONS = WB_OK ;
-    DEFBUTTON = WB_DEF_OK ;
-    MESSAGE [ en-US ] = "%PRODUCTNAME was unable to find a working e-mail configuration. Please save this document locally instead and attach it from within your e-mail client." ;
-};
-
-// ------------------------------------------------------------------- EOF
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/uiconfig/ui/errorfindemaildialog.ui b/sfx2/uiconfig/ui/errorfindemaildialog.ui
new file mode 100644
index 0000000..132c50c
--- /dev/null
+++ b/sfx2/uiconfig/ui/errorfindemaildialog.ui
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="ErrorFindEmailDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">No e-mail configuration</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="message_type">error</property>
+    <property name="buttons">ok</property>
+    <property name="text" translatable="yes">%PRODUCTNAME was unable to find a working e-mail configuration.</property>
+    <property name="secondary_text" translatable="yes">Please save this document locally instead and attach it from within your e-mail client.</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="messagedialog-vbox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">24</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="messagedialog-action_area">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list