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

convert import library dialog to .ui

Change-Id: Iaedcbeb5618ece65692a9688ccb5c13aad1e6626
üst bad191f1
...@@ -32,6 +32,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\ ...@@ -32,6 +32,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\
basctl/uiconfig/basicide/ui/basicmacrodialog \ basctl/uiconfig/basicide/ui/basicmacrodialog \
basctl/uiconfig/basicide/ui/gotolinedialog \ basctl/uiconfig/basicide/ui/gotolinedialog \
basctl/uiconfig/basicide/ui/exportdialog \ basctl/uiconfig/basicide/ui/exportdialog \
basctl/uiconfig/basicide/ui/importlibdialog \
basctl/uiconfig/basicide/ui/managebreakpoints \ basctl/uiconfig/basicide/ui/managebreakpoints \
basctl/uiconfig/basicide/ui/newlibdialog \ basctl/uiconfig/basicide/ui/newlibdialog \
basctl/uiconfig/basicide/ui/organizedialog \ basctl/uiconfig/basicide/ui/organizedialog \
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#define RID_TP_MODULS ( RID_BASICIDE_START + 37 ) #define RID_TP_MODULS ( RID_BASICIDE_START + 37 )
#define RID_TP_LIBS ( RID_BASICIDE_START + 38 ) #define RID_TP_LIBS ( RID_BASICIDE_START + 38 )
#define RID_TP_DLGS ( RID_BASICIDE_START + 39 ) #define RID_TP_DLGS ( RID_BASICIDE_START + 39 )
#define RID_DLG_LIBS ( RID_BASICIDE_START + 40 )
#define RID_POPUP_DLGED ( RID_BASICIDE_START + 62 ) #define RID_POPUP_DLGED ( RID_BASICIDE_START + 62 )
#define RID_PRINTDLG_STRLIST ( RID_BASICIDE_START + 78 ) #define RID_PRINTDLG_STRLIST ( RID_BASICIDE_START + 78 )
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#define HID_BASICIDE_MODULES_TREE "BASCTL_HID_BASICIDE_MODULES_TREE" #define HID_BASICIDE_MODULES_TREE "BASCTL_HID_BASICIDE_MODULES_TREE"
#define HID_BASICIDE_LIBS_TREE "BASCTL_HID_BASICIDE_LIBS_TREE" #define HID_BASICIDE_LIBS_TREE "BASCTL_HID_BASICIDE_LIBS_TREE"
#define HID_BASICIDE_LIBSDLG_TREE "BASCTL_HID_BASICIDE_LIBSDLG_TREE"
#define HID_BASICIDE_OBJECTCAT "BASCTL_HID_BASICIDE_OBJECTCAT" #define HID_BASICIDE_OBJECTCAT "BASCTL_HID_BASICIDE_OBJECTCAT"
#define HID_BASICIDE_OBJCAT_SHOW "BASCTL_HID_BASICIDE_OBJCAT_SHOW" #define HID_BASICIDE_OBJCAT_SHOW "BASCTL_HID_BASICIDE_OBJCAT_SHOW"
......
...@@ -173,6 +173,26 @@ CheckBox::CheckBox( Window* pParent, const ResId& rResId ) ...@@ -173,6 +173,26 @@ CheckBox::CheckBox( Window* pParent, const ResId& rResId )
Init(); Init();
} }
CheckBox::CheckBox(Window* pParent, WinBits nStyle)
: SvTabListBox(pParent, nStyle)
, eMode(ObjectMode::Module)
, m_aDocument(ScriptDocument::getApplicationScriptDocument())
{
long aTabs_[] = { 1, 12 }; // TabPos needs at least one...
// 12 because of the CheckBox
SetTabs( aTabs_ );
Init();
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCheckBox(Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinBits = WB_TABSTOP;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
return new CheckBox(pParent, nWinBits);
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
CheckBox::~CheckBox() CheckBox::~CheckBox()
......
...@@ -909,31 +909,22 @@ void ObjectPage::EndTabDialog( sal_uInt16 nRet ) ...@@ -909,31 +909,22 @@ void ObjectPage::EndTabDialog( sal_uInt16 nRet )
pTabDlg->EndDialog( nRet ); pTabDlg->EndDialog( nRet );
} }
LibDialog::LibDialog( Window* pParent ) LibDialog::LibDialog( Window* pParent )
: ModalDialog( pParent, IDEResId( RID_DLG_LIBS ) ), : ModalDialog(pParent, "ImportLibDialog", "modules/BasicIDE/ui/importlibdialog.ui")
aOKButton( this, IDEResId( RID_PB_OK ) ),
aCancelButton( this, IDEResId( RID_PB_CANCEL ) ),
aStorageName( this, IDEResId( RID_FT_STORAGENAME ) ),
aLibBox( this, IDEResId( RID_CTRL_LIBS ) ),
aFixedLine( this, IDEResId( RID_FL_OPTIONS ) ),
aReferenceBox( this, IDEResId( RID_CB_REF ) ),
aReplaceBox( this, IDEResId( RID_CB_REPL ) )
{
SetText( IDE_RESSTR(RID_STR_APPENDLIBS) );
FreeResource();
}
LibDialog::~LibDialog()
{ {
get(m_pStorageFrame, "storageframe");
get(m_pReferenceBox, "ref");
get(m_pReplaceBox, "replace");
get(m_pLibBox, "entries");
m_pLibBox->set_height_request(m_pLibBox->GetTextHeight() * 8);
m_pLibBox->set_width_request(m_pLibBox->approximate_char_width() * 32);
} }
void LibDialog::SetStorageName( const OUString& rName ) void LibDialog::SetStorageName( const OUString& rName )
{ {
OUString aName( IDE_RESSTR(RID_STR_FILENAME) ); OUString aName( IDE_RESSTR(RID_STR_FILENAME) );
aName += rName; aName += rName;
aStorageName.SetText( aName ); m_pStorageFrame->set_label(aName);
} }
// Helper function // Helper function
......
...@@ -23,18 +23,17 @@ ...@@ -23,18 +23,17 @@
#include <svheader.hxx> #include <svheader.hxx>
#include <bastype2.hxx> #include <bastype2.hxx>
#include <vcl/dialog.hxx> #include <svtools/svtabbx.hxx>
#include <vcl/button.hxx> #include <vcl/button.hxx>
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
#include <svtools/svtabbx.hxx> #include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabdlg.hxx> #include <vcl/tabdlg.hxx>
#include <vcl/tabpage.hxx> #include <vcl/tabpage.hxx>
#include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/task/XInteractionHandler.hpp>
#include <vcl/tabctrl.hxx>
#include <vcl/lstbox.hxx>
class SvxPasswordDialog; class SvxPasswordDialog;
namespace basctl namespace basctl
...@@ -125,7 +124,8 @@ private: ...@@ -125,7 +124,8 @@ private:
void Init(); void Init();
public: public:
CheckBox( Window* pParent, const ResId& rResId ); CheckBox(Window* pParent, const ResId& rResId);
CheckBox(Window* pParent, WinBits nStyle);
~CheckBox(); ~CheckBox();
SvTreeListEntry* DoInsertEntry( const OUString& rStr, sal_uLong nPos = LISTBOX_APPEND ); SvTreeListEntry* DoInsertEntry( const OUString& rStr, sal_uLong nPos = LISTBOX_APPEND );
...@@ -147,29 +147,24 @@ public: ...@@ -147,29 +147,24 @@ public:
class LibDialog: public ModalDialog class LibDialog: public ModalDialog
{ {
private: private:
OKButton aOKButton; VclFrame* m_pStorageFrame;
CancelButton aCancelButton; CheckBox* m_pLibBox;
FixedText aStorageName; ::CheckBox* m_pReferenceBox;
CheckBox aLibBox; ::CheckBox* m_pReplaceBox;
FixedLine aFixedLine;
::CheckBox aReferenceBox;
::CheckBox aReplaceBox;
public: public:
LibDialog( Window* pParent ); LibDialog( Window* pParent );
~LibDialog();
void SetStorageName( const OUString& rName ); void SetStorageName( const OUString& rName );
CheckBox& GetLibBox() { return aLibBox; } CheckBox& GetLibBox() { return *m_pLibBox; }
bool IsReference() const { return aReferenceBox.IsChecked(); } bool IsReference() const { return m_pReferenceBox->IsChecked(); }
bool IsReplace() const { return aReplaceBox.IsChecked(); } bool IsReplace() const { return m_pReplaceBox->IsChecked(); }
void EnableReference (bool b) { aReferenceBox.Enable(b); } void EnableReference (bool b) { m_pReferenceBox->Enable(b); }
void EnableReplace (bool b) { aReplaceBox.Enable(b); } void EnableReplace (bool b) { m_pReplaceBox->Enable(b); }
}; };
class OrganizeDialog : public TabDialog class OrganizeDialog : public TabDialog
{ {
private: private:
......
...@@ -215,62 +215,6 @@ TabPage RID_TP_LIBS ...@@ -215,62 +215,6 @@ TabPage RID_TP_LIBS
TabStop = TRUE ; TabStop = TRUE ;
}; };
}; };
ModalDialog RID_DLG_LIBS
{
HelpId = "basctl:ModalDialog:RID_DLG_LIBS" ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 168 , 132 ) ;
Moveable = TRUE ;
Closeable = TRUE ;
OKButton RID_PB_OK
{
Pos = MAP_APPFONT ( 112 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton RID_PB_CANCEL
{
Pos = MAP_APPFONT ( 112 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
FixedText RID_FT_STORAGENAME
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
};
Control RID_CTRL_LIBS
{
HelpID = HID_BASICIDE_LIBSDLG_TREE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 19 ) ;
Size = MAP_APPFONT ( 100 , 67 ) ;
TabStop = TRUE ;
};
FixedLine RID_FL_OPTIONS
{
Pos = MAP_APPFONT ( 6 , 89 ) ;
Size = MAP_APPFONT ( 156 , 8 ) ;
Text [ en-US ] = "Options" ;
};
CheckBox RID_CB_REF
{
HelpID = "basctl:CheckBox:RID_DLG_LIBS:RID_CB_REF";
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 146 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Insert as reference (read-only)" ;
};
CheckBox RID_CB_REPL
{
HelpID = "basctl:CheckBox:RID_DLG_LIBS:RID_CB_REPL";
Pos = MAP_APPFONT ( 12 , 113 ) ;
Size = MAP_APPFONT ( 146 , 10 ) ;
Text [ en-US ] = "Replace existing libraries" ;
};
};
String RID_STR_EXPORTPACKAGE String RID_STR_EXPORTPACKAGE
{ {
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Fri Jan 3 14:30:17 2014 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="ImportLibDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Import Libraries</property>
<property name="type_hint">dialog</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>
</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="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</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="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkCheckButton" id="ref">
<property name="label" translatable="yes">Insert as reference (read-only)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</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>
<child>
<object class="GtkCheckButton" id="replace">
<property name="label" translatable="yes">Replace existing libraries</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</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">Options</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="storageframe">
<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="alignment2">
<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="basctllo-CheckBox" id="entries: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-selection2"/>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</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>
<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-widgets>
</object>
</interface>
...@@ -436,6 +436,9 @@ ...@@ -436,6 +436,9 @@
<glade-widget-class title="Tab List" name="svtlo-SvTabListBox" <glade-widget-class title="Tab List" name="svtlo-SvTabListBox"
generic-name="Tab List" parent="svtlo-SvTreeListBox" generic-name="Tab List" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/> icon-name="widget-gtk-treeview"/>
<glade-widget-class title="CheckBox List" name="basctllo-CheckBox"
generic-name="CheckBox List" parent="svtlo-SvTabListBox"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="SwIdxTreeListBox" name="swuilo-SwIdxTreeListBox" <glade-widget-class title="SwIdxTreeListBox" name="swuilo-SwIdxTreeListBox"
generic-name="SwIdxTreeListBox" parent="svtlo-SvTreeListBox" generic-name="SwIdxTreeListBox" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/> icon-name="widget-gtk-treeview"/>
......
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