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

convert select multi paths dialogs to .ui

Change-Id: Iecb6dbee9e7af0600b8355db038ec597cab61d1a
üst 734a7fe5
......@@ -86,6 +86,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/messbox \
cui/uiconfig/ui/mosaicdialog \
cui/uiconfig/ui/movemenu \
cui/uiconfig/ui/multipathdialog \
cui/uiconfig/ui/namedialog \
cui/uiconfig/ui/newlibdialog \
cui/uiconfig/ui/newtabledialog \
......@@ -158,6 +159,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/searchformatdialog \
cui/uiconfig/ui/securityoptionsdialog \
cui/uiconfig/ui/select_persona_dialog \
cui/uiconfig/ui/selectpathdialog \
cui/uiconfig/ui/shadowtabpage \
cui/uiconfig/ui/showcoldialog \
cui/uiconfig/ui/similaritysearchdialog \
......
This diff is collapsed.
/* -*- 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 _SVX_MULTIPAT_HRC
#define _SVX_MULTIPAT_HRC
// defines ---------------------------------------------------------------
#define FL_MULTIPATH 10
#define LB_MULTIPATH 11
#define LB_RADIOBUTTON 12
#define FT_RADIOBUTTON 13
#define BTN_ADD_MULTIPATH 14
#define BTN_DEL_MULTIPATH 15
#define BTN_MULTIPATH_OK 16
#define BTN_MULTIPATH_CANCEL 17
#define BTN_MULTIPATH_HELP 18
#define STR_HEADER_PATHS 19
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,86 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "multipat.hrc"
#include "helpid.hrc"
#include <cuires.hrc>
// RID_SVXDLG_MULTIPATH --------------------------------------------------
ModalDialog RID_SVXDLG_MULTIPATH
{
HelpId = HID_MULTIPATH ;
OutputSize = TRUE ;
Size = MAP_APPFONT ( 260 , 120 ) ;
Text [ en-US ] = "Select Paths" ;
Moveable = TRUE ;
Closeable = TRUE ;
FixedLine FL_MULTIPATH
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Paths" ;
};
ListBox LB_MULTIPATH
{
HelpID = "cui:ListBox:RID_SVXDLG_MULTIPATH:LB_MULTIPATH";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 189 , 80 ) ;
AutoHScroll = TRUE ;
};
Control LB_RADIOBUTTON
{
HelpId = HID_OPTIONS_MULTIPATH_LIST ;
Hide = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 195 , 77 ) ;
};
FixedText FT_RADIOBUTTON
{
Hide = TRUE ;
NoLabel = TRUE ;
Pos = MAP_APPFONT ( 6 , 86 );
Size = MAP_APPFONT ( 195 , 8 );
Text [ en-US ] = "Mark the default path for new files.";
};
PushButton BTN_ADD_MULTIPATH
{
HelpID = "cui:PushButton:RID_SVXDLG_MULTIPATH:BTN_ADD_MULTIPATH";
Pos = MAP_APPFONT ( 204 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add..." ;
};
PushButton BTN_DEL_MULTIPATH
{
HelpID = "cui:PushButton:RID_SVXDLG_MULTIPATH:BTN_DEL_MULTIPATH";
Pos = MAP_APPFONT ( 204 , 31 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
};
OKButton BTN_MULTIPATH_OK
{
Pos = MAP_APPFONT ( 95 , 100 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE;
};
CancelButton BTN_MULTIPATH_CANCEL
{
Pos = MAP_APPFONT ( 148 , 100 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton BTN_MULTIPATH_HELP
{
Pos = MAP_APPFONT ( 204 , 100 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
String STR_HEADER_PATHS
{
Text [ en-US ] = "Path list" ;
};
};
String RID_MULTIPATH_DBL_ERR
{
Text [ en-US ] = "The path %1 already exists." ;
......
......@@ -135,6 +135,7 @@ IMPL_ABSTDLG_BASE(AbstractSvxObjectTitleDescDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxMessDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxPathSelectDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl);
......@@ -796,12 +797,22 @@ void AbstractSvxMultiPathDialog_Impl::SetPath( const OUString& rPath )
pDlg->SetPath( rPath );
}
void AbstractSvxMultiPathDialog_Impl::EnableRadioButtonMode()
void AbstractSvxMultiPathDialog_Impl::SetTitle( const OUString& rNewTitle )
{
pDlg->EnableRadioButtonMode();
pDlg->SetText( rNewTitle );
}
void AbstractSvxMultiPathDialog_Impl::SetTitle( const OUString& rNewTitle )
OUString AbstractSvxPathSelectDialog_Impl::GetPath() const
{
return pDlg->GetPath();
}
void AbstractSvxPathSelectDialog_Impl::SetPath( const OUString& rPath )
{
pDlg->SetPath( rPath );
}
void AbstractSvxPathSelectDialog_Impl::SetTitle( const OUString& rNewTitle )
{
pDlg->SetText( rNewTitle );
}
......@@ -1418,6 +1429,12 @@ AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialo
return new AbstractSvxMultiPathDialog_Impl( pDlg );
}
AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(Window* pParent)
{
SvxPathSelectDialog* pDlg = new SvxPathSelectDialog(pParent);
return new AbstractSvxPathSelectDialog_Impl( pDlg );
}
AbstractSvxHpLinkDlg * AbstractDialogFactory_Impl::CreateSvxHpLinkDlg (Window* pParent,
SfxBindings* pBindings,
sal_uInt32 nResId)
......
......@@ -392,12 +392,20 @@ class AbstractSvxMessDialog_Impl :public AbstractSvxMessDialog
};
class SvxMultiPathDialog;
class AbstractSvxMultiPathDialog_Impl :public AbstractSvxMultiPathDialog
class AbstractSvxMultiPathDialog_Impl : public AbstractSvxMultiPathDialog
{
DECL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl,SvxMultiPathDialog)
virtual OUString GetPath() const;
virtual void SetPath( const OUString& rPath );
virtual void EnableRadioButtonMode();
virtual void SetTitle( const OUString& rNewTitle );
};
class SvxPathSelectDialog;
class AbstractSvxPathSelectDialog_Impl : public AbstractSvxMultiPathDialog
{
DECL_ABSTDLG_BASE(AbstractSvxPathSelectDialog_Impl,SvxPathSelectDialog)
virtual OUString GetPath() const;
virtual void SetPath( const OUString& rPath );
virtual void SetTitle( const OUString& rNewTitle );
};
......@@ -626,6 +634,7 @@ public:
const OUString& rText, const OUString& rDesc,
Image* pImg = NULL );
virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog(Window* pParent);
virtual AbstractSvxMultiPathDialog * CreateSvxPathSelectDialog(Window* pParent);
virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (Window* pParent,
SfxBindings* pBindings,
sal_uInt32 nResId);
......
......@@ -219,7 +219,6 @@
#define RID_SVXSTR_ICONCHOICEDLG_RESETBUT (RID_SVX_START + 580)
// multi path dialog
#define RID_SVXDLG_MULTIPATH (RID_SVX_START + 201)
#define RID_MULTIPATH_DBL_ERR (RID_SVX_START + 207)
#define RID_SVXSTR_ARCHIVE_TITLE (RID_SVX_START + 484)
#define RID_SVXSTR_ARCHIVE_HEADLINE (RID_SVX_START + 485)
......
......@@ -179,7 +179,6 @@
#define HID_SEARCH_BTN_CLOSE "CUI_HID_SEARCH_BTN_CLOSE"
#define HID_DIALOG_HANGULHANJA "CUI_HID_DIALOG_HANGULHANJA"
#define HID_HANGULHANJA_EDIT_DLG "CUI_HID_HANGULHANJA_EDIT_DLG"
#define HID_MULTIPATH "CUI_HID_MULTIPATH"
#define HID_TPHATCH_CTRL "CUI_HID_TPHATCH_CTRL"
#define UID_SEARCH_RECORDSTATUS "CUI_UID_SEARCH_RECORDSTATUS"
#define HID_TPCOLOR_RGB_1 "CUI_HID_TPCOLOR_RGB_1"
......
......@@ -36,28 +36,17 @@
#define CLASSPATH_DELIMITER ';'
#endif
// class SvxMultiPathDialog ----------------------------------------------
class SvxMultiPathDialog : public ModalDialog
{
protected:
FixedLine aPathFL;
ListBox aPathLB;
SvSimpleTableContainer m_aRadioLBContainer;
svx::SvxRadioButtonListBox aRadioLB;
FixedText aRadioFT;
PushButton aAddBtn;
PushButton aDelBtn;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpButton;
bool bIsRadioButtonMode;
private:
svx::SvxRadioButtonListBox* m_pRadioLB;
PushButton* m_pAddBtn;
PushButton* m_pDelBtn;
DECL_LINK(AddHdl_Impl, void *);
DECL_LINK(DelHdl_Impl, void *);
DECL_LINK( SelectHdl_Impl, void * );
DECL_LINK( CheckHdl_Impl, svx::SvxRadioButtonListBox * );
DECL_LINK(SelectHdl_Impl, void *);
DECL_LINK(CheckHdl_Impl, svx::SvxRadioButtonListBox*);
public:
SvxMultiPathDialog(Window* pParent);
......@@ -65,7 +54,25 @@ public:
OUString GetPath() const;
void SetPath( const OUString& rPath );
void EnableRadioButtonMode();
};
class SvxPathSelectDialog : public ModalDialog
{
private:
ListBox* m_pPathLB;
PushButton* m_pAddBtn;
PushButton* m_pDelBtn;
DECL_LINK(AddHdl_Impl, void *);
DECL_LINK(DelHdl_Impl, void *);
DECL_LINK(SelectHdl_Impl, void *);
public:
SvxPathSelectDialog(Window* pParent);
~SvxPathSelectDialog();
OUString GetPath() const;
void SetPath( const OUString& rPath );
};
#endif // INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
......
......@@ -554,7 +554,6 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl)
AbstractSvxMultiPathDialog* pMultiDlg =
pFact->CreateSvxMultiPathDialog( this );
DBG_ASSERT( pMultiDlg, "Dialogdiet fail!" );
pMultiDlg->EnableRadioButtonMode();
OUString sPath( sUser );
if ( !sPath.isEmpty() )
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="SelectPathDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Select Paths</property>
<property name="type_hint">normal</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">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="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</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>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<property name="layout_style">start</property>
<child>
<object class="GtkButton" id="add">
<property name="label" translatable="yes">_Add...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="delete">
<property name="label">gtk-delete</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">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="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="paths:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Paths</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">help</action-widget>
</action-widgets>
</object>
</interface>
......@@ -212,16 +212,15 @@ public:
virtual void SetButtonText( sal_uInt16 nBtnId, const OUString& rNewTxt ) = 0;
};
class AbstractSvxMultiPathDialog :public VclAbstractDialog
class AbstractSvxMultiPathDialog : public VclAbstractDialog
{
public:
virtual OUString GetPath() const = 0;
virtual void SetPath( const OUString& rPath ) = 0;
virtual void EnableRadioButtonMode() = 0;
virtual void SetTitle( const OUString& rNewTitle ) = 0;
};
class AbstractSvxMultiFileDialog :public AbstractSvxMultiPathDialog
class AbstractSvxMultiFileDialog : public AbstractSvxMultiPathDialog
{
public:
virtual OUString GetFiles() const = 0;
......@@ -403,6 +402,7 @@ public:
Image* pImg = NULL ) = 0;
virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog(Window* pParent) = 0 ;
virtual AbstractSvxMultiPathDialog * CreateSvxPathSelectDialog(Window* pParent) = 0 ;
virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (Window* pParent,
SfxBindings* pBindings,
sal_uInt32 nResId)=0;
......
......@@ -1022,7 +1022,7 @@ IMPL_LINK( SwGlossaryDlg, PathHdl, Button *, pBtn )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
boost::scoped_ptr<AbstractSvxMultiPathDialog> pDlg(pFact->CreateSvxMultiPathDialog( pBtn ));
boost::scoped_ptr<AbstractSvxMultiPathDialog> pDlg(pFact->CreateSvxPathSelectDialog(pBtn));
OSL_ENSURE(pDlg, "Dialogdiet fail!");
SvtPathOptions aPathOpt;
const OUString sGlosPath( aPathOpt.GetAutoTextPath() );
......
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