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

convert goto line dialog to .ui

Change-Id: I4c4ec4f2169d001e6f09c9c7bb06a4b0b327a2f8
üst c6aea0ba
......@@ -30,6 +30,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/BasicIDE,\
$(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\
basctl/uiconfig/basicide/ui/basicmacrodialog \
basctl/uiconfig/basicide/ui/gotolinedialog \
basctl/uiconfig/basicide/ui/organizedialog \
))
......
......@@ -153,10 +153,8 @@
#define RID_STR_NORMAL_MODULES ( RID_BASICIDE_START + 120 )
#define RID_STR_CLASS_MODULES ( RID_BASICIDE_START + 121 )
#define RID_DLG_GOTOLINE ( RID_BASICIDE_START + 122 )
#define RID_FT_LINE ( RID_BASICIDE_START + 123 )
#define RID_ED_LINE ( RID_BASICIDE_START + 124 )
#define RID_STR_GETLINE ( RID_BASICIDE_START + 125 )
#endif // _SVX_NOIDERESIDS
......
......@@ -601,11 +601,6 @@ String RID_STR_DLGIMP_MISMATCH_TEXT
Text [ en-US ] = "The dialog to be imported supports other languages than the target library.\n\nAdd these languages to the library to keep additional language resources provided by the dialog or omit them to stay with the current library languages.\n\nNote: For languages not supported by the dialog the resources of the dialog's default language will be used.\n " ;
};
String RID_STR_GETLINE
{
Text [ en-US ] = "Goto Line";
};
#define MN_EDIT 20
#define MN_VIEW 21
#define MN_EXTRA 22
......
......@@ -436,23 +436,18 @@ NewObjectDialog::~NewObjectDialog()
//----------------------------------------------------------------------------
GotoLineDialog::GotoLineDialog(Window * pParent )
: ModalDialog( pParent, IDEResId( RID_DLG_GOTOLINE ) ),
aText( this, IDEResId( RID_FT_LINE ) ),
aEdit( this, IDEResId( RID_ED_LINE ) ),
aOKButton( this, IDEResId( RID_PB_OK ) ),
aCancelButton( this, IDEResId( RID_PB_CANCEL ) )
: ModalDialog(pParent, "GotoLineDialog",
"modules/BasicIDE/ui/gotolinedialog.ui")
{
FreeResource();
aEdit.GrabFocus();
SetText( IDE_RESSTR(RID_STR_GETLINE) );
aOKButton.SetClickHdl(LINK(this, GotoLineDialog, OkButtonHandler));
get(m_pEdit, "entry");
get(m_pOKButton, "ok");
m_pEdit->GrabFocus();
m_pOKButton->SetClickHdl(LINK(this, GotoLineDialog, OkButtonHandler));
}
sal_Int32 GotoLineDialog::GetLineNumber()
sal_Int32 GotoLineDialog::GetLineNumber() const
{
return OUString( aEdit.GetText() ).toInt32();
return m_pEdit->GetText().toInt32();
}
IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler)
......@@ -460,7 +455,7 @@ IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler)
if ( GetLineNumber() )
EndDialog(1);
else
aEdit.SetText( aEdit.GetText(), Selection(0, aEdit.GetText().getLength() ));
m_pEdit->SetText(m_pEdit->GetText(), Selection(0, m_pEdit->GetText().getLength()));
return 0;
}
......
......@@ -71,14 +71,12 @@ public:
class GotoLineDialog : public ModalDialog
{
FixedText aText;
Edit aEdit;
OKButton aOKButton;
CancelButton aCancelButton;
Edit* m_pEdit;
OKButton* m_pOKButton;
DECL_LINK(OkButtonHandler, void *);
public:
GotoLineDialog( Window * pParent );
sal_Int32 GetLineNumber();
GotoLineDialog(Window * pParent);
sal_Int32 GetLineNumber() const;
};
class ExportDialog : public ModalDialog
......
......@@ -272,43 +272,6 @@ ModalDialog RID_DLG_LIBS
};
};
ModalDialog RID_DLG_GOTOLINE
{
HelpID = "basctl:ModalDialog:RID_DLG_GOTOLINE";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 160 , 55 ) ;
Moveable = TRUE ;
Closeable = TRUE ;
OKButton RID_PB_OK
{
Pos = MAP_APPFONT ( 104 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton RID_PB_CANCEL
{
Pos = MAP_APPFONT ( 104 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
FixedText RID_FT_LINE
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 96 , 10 ) ;
Text [ en-US ] = "~Line Number:" ;
};
Edit RID_ED_LINE
{
HelpID = "basctl:Edit:RID_DLG_GOTOLINE:RID_ED_LINE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 19 ) ;
Size = MAP_APPFONT ( 62 , 12 ) ;
TabStop = TRUE ;
};
};
ModalDialog RID_DLG_NEWLIB
{
HelpID = "basctl:ModalDialog:RID_DLG_NEWLIB";
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Tue Dec 31 19:57:17 2013 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="GotoLineDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Goto Line</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>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<property name="row_homogeneous">True</property>
<child>
<object class="GtkLabel" id="area">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Line Number:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry</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="GtkEntry" id="entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
</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>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<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">2</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>
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