[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis' - uui/Library_uui.mk uui/source uui/uiconfig
Mihai Varga
mihai.mv13 at gmail.com
Thu Jun 26 06:50:57 PDT 2014
uui/Library_uui.mk | 1
uui/source/authfallbackdlg.cxx | 58 ++++++++++++++++++++++++
uui/source/authfallbackdlg.hxx | 43 ++++++++++++++++++
uui/uiconfig/ui/authfallback.ui | 93 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 195 insertions(+)
New commits:
commit a01b8874f0aa93ac817405bafdf08a8250790325
Author: Mihai Varga <mihai.mv13 at gmail.com>
Date: Thu Jun 26 16:50:06 2014 +0300
Authentication fallback dialog
diff --git a/uui/Library_uui.mk b/uui/Library_uui.mk
index 560cb65..cd85de6 100644
--- a/uui/Library_uui.mk
+++ b/uui/Library_uui.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Library_use_libraries,uui,\
$(eval $(call gb_Library_add_exception_objects,uui,\
uui/source/alreadyopen \
+ uui/source/authfallbackdlg \
uui/source/filechanged \
uui/source/fltdlg \
uui/source/iahndl \
diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx
new file mode 100644
index 0000000..cae7deb
--- /dev/null
+++ b/uui/source/authfallbackdlg.cxx
@@ -0,0 +1,58 @@
+/* -*- 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/.
+ */
+
+#include "authfallbackdlg.hxx"
+
+#include <vcl/msgbox.hxx>
+
+using namespace boost;
+
+AuthFallbackDlg::AuthFallbackDlg( Window* pParent ) :
+ ModalDialog( pParent, "AuthFallbackDlg", "svt/ui/authfallback.ui" )
+{
+ get( m_pTVInstructions, "instructions" );
+ get( m_pEDUrl, "url" );
+ get( m_pEDCode, "code" );
+ get( m_pBTOk, "ok" );
+ get( m_pBTCancel, "cancel" );
+
+ m_pBTOk->SetClickHdl( LINK( this, AuthFallbackDlg, OKHdl) );
+ m_pBTOk->Enable( false );
+}
+
+AuthFallbackDlg::AuthFallbackDlg( Window* pParent,
+ const OUString& instructions,
+ const OUString& url ) :
+ ModalDialog( pParent, "AuthFallbackDlg", "svt/ui/authfallback.ui" )
+{
+ get( m_pTVInstructions, "instructions" );
+ get( m_pEDUrl, "url" );
+ get( m_pEDCode, "code" );
+ get( m_pBTOk, "ok" );
+ get( m_pBTCancel, "cancel" );
+
+ m_pBTOk->SetClickHdl( LINK( this, AuthFallbackDlg, OKHdl) );
+ m_pBTOk->Enable( false );
+
+ m_pTVInstructions->SetText( instructions );
+ m_pEDUrl->SetText( url );
+}
+
+AuthFallbackDlg::~AuthFallbackDlg()
+{
+}
+
+IMPL_LINK ( AuthFallbackDlg, OKHdl, Button *, EMPTYARG )
+{
+ EndDialog( RET_OK );
+ return 1;
+}
+
+
+
diff --git a/uui/source/authfallbackdlg.hxx b/uui/source/authfallbackdlg.hxx
new file mode 100644
index 0000000..818aa84
--- /dev/null
+++ b/uui/source/authfallbackdlg.hxx
@@ -0,0 +1,43 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX
+#define INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX
+
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/vclmedit.hxx>
+
+
+class AuthFallbackDlg : public ModalDialog
+{
+private :
+
+ VclMultiLineEdit* m_pTVInstructions;
+ Edit* m_pEDUrl;
+ Edit* m_pEDCode;
+ OKButton* m_pBTOk;
+ CancelButton* m_pBTCancel;
+
+public :
+
+ AuthFallbackDlg( Window* pParent);
+ AuthFallbackDlg(Window* pParent, const OUString& instructions,
+ const OUString& url );
+ virtual ~AuthFallbackDlg();
+
+ OUString GetCode() { return m_pEDCode->GetText(); }
+
+private:
+
+ DECL_LINK ( OKHdl, Button * );
+};
+
+#endif // INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX
diff --git a/uui/uiconfig/ui/authfallback.ui b/uui/uiconfig/ui/authfallback.ui
new file mode 100644
index 0000000..86a0a81
--- /dev/null
+++ b/uui/uiconfig/ui/authfallback.ui
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="AuthenticationDialog">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">OneDrive authentication code</property>
+ <child>
+ <object class="GtkBox" id="box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkTextView" id="instructions">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixels_below_lines">4</property>
+ <property name="editable">False</property>
+ <property name="cursor_visible">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="url">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">â</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="code">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">â</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">46</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label" translatable="yes">Ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label" translatable="yes">Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list