Kaydet (Commit) ca4a3819 authored tarafından Caolán McNamara's avatar Caolán McNamara

lets drop the custom DescriptionEdit widget

Change-Id: Id08b364b828ccacd5c54276daf605ec4ff3fdb0a
üst 5690def7
......@@ -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/descedit \
desktop/source/deployment/gui/dp_gui_autoscrolledit \
desktop/source/deployment/gui/dp_gui_dependencydialog \
desktop/source/deployment/gui/dp_gui_dialog2 \
......
/* -*- 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 <vcl/builder.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/txtattr.hxx>
#include <vcl/xtextedt.hxx>
#include "descedit.hxx"
#include "dp_gui.hrc"
using dp_gui::DescriptionEdit;
// DescriptionEdit -------------------------------------------------------
DescriptionEdit::DescriptionEdit( Window* pParent) :
ExtMultiLineEdit( pParent),
m_bIsVerticalScrollBarHidden( true )
{
Init();
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeDescriptionEdit(Window* pParent, VclBuilder::stringmap &)
{
return new DescriptionEdit(pParent);
}
void DescriptionEdit::Init()
{
Clear();
// no tabstop
SetStyle( ( GetStyle() & ~WB_TABSTOP ) | WB_NOTABSTOP );
// read-only
SetReadOnly();
// no cursor
EnableCursor( false );
}
void DescriptionEdit::Clear()
{
SetText( OUString() );
m_bIsVerticalScrollBarHidden = true;
ScrollBar* pVScrBar = GetVScrollBar();
if ( pVScrBar )
pVScrBar->Hide();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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_DESCEDIT_HXX
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DESCEDIT_HXX
#include "svtools/svmedit2.hxx"
/// @HTML
namespace dp_gui
{
class DescriptionEdit : public ExtMultiLineEdit
{
private:
bool m_bIsVerticalScrollBarHidden;
void Init();
public:
DescriptionEdit( Window* pParent);
virtual inline ~DescriptionEdit() {}
void Clear();
};
} // namespace dp_gui
#endif // INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DESCEDIT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -907,7 +907,6 @@ void UpdateDialog::initDescription()
m_pPublisherLink->Hide();
m_pReleaseNotesLabel->Hide();
m_pReleaseNotesLink->Hide();
m_pDescriptions->Hide();
Link aLink = LINK( this, UpdateDialog, hyperlink_clicked );
m_pPublisherLink->SetClickHdl( aLink );
......@@ -924,8 +923,7 @@ void UpdateDialog::clearDescription()
m_pReleaseNotesLabel->Hide();
m_pReleaseNotesLink->Hide();
m_pReleaseNotesLink->SetURL( sEmpty );
m_pDescriptions->Hide();
m_pDescriptions->Clear();
m_pDescriptions->SetText("");
}
bool UpdateDialog::showDescription(uno::Reference< xml::dom::XNode > const & aUpdateInfo)
......@@ -976,7 +974,6 @@ bool UpdateDialog::showDescription( const OUString& rDescription)
// nothing to show
return false;
m_pDescriptions->Show();
m_pDescriptions->SetText( rDescription );
return true;
}
......
......@@ -37,7 +37,6 @@
#include <vcl/fixedhyper.hxx>
#include <vcl/throbber.hxx>
#include "descedit.hxx"
#include "dp_gui_updatedata.hxx"
/// @HTML
......@@ -181,7 +180,7 @@ private:
FixedHyperlink* m_pPublisherLink;
FixedText* m_pReleaseNotesLabel;
FixedHyperlink* m_pReleaseNotesLink;
dp_gui::DescriptionEdit* m_pDescriptions;
VclMultiLineEdit* m_pDescriptions;
HelpButton* m_pHelp;
PushButton* m_pOk;
PushButton* m_pClose;
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<!-- interface-requires LibreOffice 1.0 -->
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="UpdateDialog">
<property name="can_focus">False</property>
......@@ -278,24 +277,18 @@
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow2">
<object class="GtkTextView" id="DESCRIPTIONS:border">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="vscrollbar_policy">always</property>
<property name="shadow_type">in</property>
<child>
<object class="deploymentgui-DescriptionEdit" id="DESCRIPTIONS">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="editable">False</property>
</object>
</child>
<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>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
......
......@@ -326,9 +326,6 @@
<glade-widget-class title="LicenseView" name="deploymentgui-LicenseView"
generic-name="LicenseView" parent="GtkTextView"
icon-name="widget-gtk-textview"/>
<glade-widget-class title="DescriptionEdit" name="deploymentgui-DescriptionEdit"
generic-name="DescriptionEdit" parent="GtkTextView"
icon-name="widget-gtk-textview"/>
<glade-widget-class title="SvtValueSet" name="svtlo-ValueSet"
generic-name="Set of Value Options" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment