summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-27 11:51:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-27 12:07:13 +0100
commit9172ee72938a42f9f792b627c47f42f02ce468df (patch)
tree9d564c0807188e2b850174647b94f35d845855f3 /desktop
parent1908f27da839e481c277ab08e3013eb06be04890 (diff)
the stock multilineedit is sufficient IMO
Change-Id: I374c17fcda80c4f821271bf665a41beae100cccf
Diffstat (limited to 'desktop')
-rw-r--r--desktop/Library_deploymentgui.mk1
-rw-r--r--desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx68
-rw-r--r--desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx45
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx19
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx8
-rw-r--r--desktop/uiconfig/ui/updateinstalldialog.ui31
7 files changed, 25 insertions, 151 deletions
diff --git a/desktop/Library_deploymentgui.mk b/desktop/Library_deploymentgui.mk
index ec0a836e7670..cdf8bcdfe012 100644
--- a/desktop/Library_deploymentgui.mk
+++ b/desktop/Library_deploymentgui.mk
@@ -56,7 +56,6 @@ endif
$(eval $(call gb_Library_set_componentfile,deploymentgui,desktop/source/deployment/gui/deploymentgui))
$(eval $(call gb_Library_add_exception_objects,deploymentgui,\
- desktop/source/deployment/gui/dp_gui_autoscrolledit \
desktop/source/deployment/gui/dp_gui_dependencydialog \
desktop/source/deployment/gui/dp_gui_dialog2 \
desktop/source/deployment/gui/dp_gui_extensioncmdqueue \
diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx
deleted file mode 100644
index 2292472bf109..000000000000
--- a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx
+++ /dev/null
@@ -1,68 +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 "svtools/svmedit2.hxx"
-#include "svl/lstner.hxx"
-#include "vcl/xtextedt.hxx"
-#include "vcl/scrbar.hxx"
-#include "vcl/builder.hxx"
-
-#include "dp_gui_autoscrolledit.hxx"
-
-
-namespace dp_gui {
-
-
-AutoScrollEdit::AutoScrollEdit( Window* pParent, WinBits nWinStyle )
- : ExtMultiLineEdit( pParent, nWinStyle )
-{
- ScrollBar* pScroll = GetVScrollBar();
- if (pScroll)
- pScroll->Hide();
- StartListening( *GetTextEngine() );
-}
-
-AutoScrollEdit::~AutoScrollEdit()
-{
- EndListeningAll();
-}
-
-void AutoScrollEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
-{
- if ( rHint.IsA( TYPE(TextHint) ) )
- {
- sal_uLong nId = ((const TextHint&)rHint).GetId();
- if ( nId == TEXT_HINT_VIEWSCROLLED )
- {
- ScrollBar* pScroll = GetVScrollBar();
- if ( pScroll )
- pScroll->Show();
- }
- }
-}
-
-
-} // namespace dp_gui
-
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeAutoScrollEdit(Window *pParent, VclBuilder::stringmap &)
-{
- return new dp_gui::AutoScrollEdit(pParent, WB_BORDER);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx
deleted file mode 100644
index 8707bfaf932b..000000000000
--- a/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx
+++ /dev/null
@@ -1,45 +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 .
- */
-#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_AUTOSCROLLEDIT_HXX
-#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_AUTOSCROLLEDIT_HXX
-
-#include "svtools/svmedit2.hxx"
-#include "svl/lstner.hxx"
-
-namespace dp_gui {
-
-/** This control shows automatically the vertical scroll bar if text is inserted,
- that does not fit into the text area. In the resource one uses MultiLineEdit
- and needs to set VScroll = TRUE
-*/
-class AutoScrollEdit : public ExtMultiLineEdit, public SfxListener
-{
-public:
- AutoScrollEdit( Window* pParent, WinBits nWinStyle);
- virtual ~AutoScrollEdit();
-
- using ExtMultiLineEdit::Notify;
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
-};
-
-} // namespace dp_gui
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 02db3ff8be32..158615210aa4 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -138,9 +138,9 @@ static const sal_uInt16 CMD_IGNORE_ALL_UPDATES = 3;
enum Kind { ENABLED_UPDATE, DISABLED_UPDATE, SPECIFIC_ERROR };
OUString confineToParagraph(OUString const & text) {
- // Confine arbitrary text to a single paragraph in a dp_gui::AutoScrollEdit.
+ // Confine arbitrary text to a single paragraph in a VclMultiLineEdit
// This assumes that U+000A and U+000D are the only paragraph separators in
- // a dp_gui::AutoScrollEdit, and that replacing them with a single space
+ // a VclMultiLineEdit, and that replacing them with a single space
// each is acceptable:
return text.replace(LF, ' ').replace(CR, ' ');
}
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index bf4b40ad2339..a7bb5b122462 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -225,6 +225,8 @@ UpdateInstallDialog::UpdateInstallDialog(
get(m_pStatusbar, "STATUSBAR");
get(m_pFt_extension_name, "EXTENSION_NAME");
get(m_pMle_info, "INFO");
+ m_pMle_info->set_height_request(m_pMle_info->GetTextHeight() * 5);
+ m_pMle_info->set_width_request(m_pMle_info->approximate_char_width() * 56);
get(m_pHelp, "HELP");
get(m_pOk, "OK");
get(m_pCancel, "CANCEL");
@@ -232,7 +234,6 @@ UpdateInstallDialog::UpdateInstallDialog(
m_xExtensionManager = css::deployment::ExtensionManager::get( xCtx );
m_pCancel->SetClickHdl(LINK(this, UpdateInstallDialog, cancelHandler));
- m_pMle_info->EnableCursor(false);
if ( ! dp_misc::office_is_running())
m_pHelp->Disable();
}
@@ -255,7 +256,7 @@ short UpdateInstallDialog::Execute()
void UpdateInstallDialog::updateDone()
{
if (!m_bError)
- m_pMle_info->InsertText(m_sNoErrors);
+ m_pMle_info->SetText(m_pMle_info->GetText() + m_sNoErrors);
m_pOk->Enable();
m_pOk->GrabFocus();
m_pCancel->Disable();
@@ -284,26 +285,28 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, OUString const & sExtensio
OSL_ASSERT(false);
}
+ OUString sMsg(m_pMle_info->GetText());
sError = sError.replaceFirst("%NAME", sExtension);
//We want to have an empty line between the error messages. However,
//there shall be no empty line after the last entry.
if (m_bNoEntry)
m_bNoEntry = false;
else
- m_pMle_info->InsertText(OUString("\n"));
- m_pMle_info->InsertText(sError);
+ sMsg += "\n";
+ sMsg += sError;
//Insert more information about the error
if (!exceptionMessage.isEmpty())
- m_pMle_info->InsertText(m_sThisErrorOccurred + exceptionMessage + "\n");
+ sMsg += m_sThisErrorOccurred + exceptionMessage + "\n";
- m_pMle_info->InsertText(m_sNoInstall);
- m_pMle_info->InsertText(OUString("\n"));
+ sMsg += m_sNoInstall + "\n";
+
+ m_pMle_info->SetText(sMsg);
}
void UpdateInstallDialog::setError(OUString const & exceptionMessage)
{
m_bError = true;
- m_pMle_info->InsertText(exceptionMessage + "\n");
+ m_pMle_info->SetText(m_pMle_info->GetText() + exceptionMessage + "\n");
}
IMPL_LINK_NOARG(UpdateInstallDialog, cancelHandler)
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index d7b68e2bf78b..fb594cd5b45d 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
@@ -25,12 +25,11 @@
#include "vcl/fixed.hxx"
#include "vcl/dialog.hxx"
#include "vcl/prgsbar.hxx"
+#include "vcl/vclmedit.hxx"
#include "rtl/ref.hxx"
#include <vector>
-#include "dp_gui_autoscrolledit.hxx"
/// @HTML
-
namespace com { namespace sun { namespace star { namespace deployment {
class XExtensionManager;
}}}}
@@ -109,15 +108,12 @@ private:
FixedText *m_pFt_action;
ProgressBar *m_pStatusbar;
FixedText *m_pFt_extension_name;
- AutoScrollEdit *m_pMle_info;
+ VclMultiLineEdit *m_pMle_info;
HelpButton *m_pHelp;
OKButton *m_pOk;
CancelButton *m_pCancel;
};
-
-
-
}
#endif
diff --git a/desktop/uiconfig/ui/updateinstalldialog.ui b/desktop/uiconfig/ui/updateinstalldialog.ui
index 079f0d85d195..6af0f3186473 100644
--- a/desktop/uiconfig/ui/updateinstalldialog.ui
+++ b/desktop/uiconfig/ui/updateinstalldialog.ui
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires LibreOffice 1.0 -->
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="UpdateInstallDialog">
- <property name="width_request">500</property>
- <property name="height_request">250</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Download and Installation</property>
@@ -25,7 +23,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -42,7 +39,6 @@
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -58,7 +54,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -89,6 +84,8 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Downloading extensions...</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">STATUSBAR</property>
</object>
<packing>
<property name="expand">False</property>
@@ -125,6 +122,8 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Result</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">INFO</property>
</object>
<packing>
<property name="expand">False</property>
@@ -133,26 +132,16 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <object class="GtkTextView" id="INFO">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="deploymentgui-AutoScrollEdit" id="INFO">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="editable">False</property>
- <property name="cursor_visible">False</property>
- <property name="accepts_tab">False</property>
- </object>
- </child>
+ <property name="editable">False</property>
+ <property name="cursor_visible">False</property>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>