datastreams: Improve usability of the dialog.

Change-Id: I6b3f9316c3eb907912aeff1715705a95bbbf547c
This commit is contained in:
Jan Holesovsky 2013-12-13 17:09:42 +01:00
parent d785fa16fd
commit 919c5e4bbe
3 changed files with 198 additions and 190 deletions

View file

@ -35,7 +35,6 @@ class DataStreamDlg : public ModalDialog
OKButton* m_pBtnOk;
VclFrame* m_pVclFrameLimit;
VclFrame* m_pVclFrameMove;
VclFrame* m_pVclFrameRange;
DECL_LINK(UpdateHdl, void *);
DECL_LINK(BrowseHdl, void *);

View file

@ -32,7 +32,6 @@ DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, Window* pParent)
get(m_pBtnOk, "ok");
get(m_pVclFrameLimit, "framelimit");
get(m_pVclFrameMove, "framemove");
get(m_pVclFrameRange, "framerange");
m_pCbUrl->SetSelectHdl( LINK( this, DataStreamDlg, UpdateHdl ) );
m_pRBAddressValue->SetClickHdl( LINK( this, DataStreamDlg, UpdateHdl ) );
@ -65,16 +64,15 @@ void DataStreamDlg::UpdateEnable()
if (m_pRBAddressValue->IsChecked())
{
m_pRBNoMove->Check();
m_pVclFrameLimit->Hide();
m_pVclFrameMove->Hide();
m_pVclFrameRange->Hide();
m_pEdRange->SetText("");
m_pVclFrameLimit->Disable();
m_pVclFrameMove->Disable();
m_pEdRange->Disable();
}
else
{
m_pVclFrameLimit->Show();
m_pVclFrameMove->Show();
m_pVclFrameRange->Show();
m_pVclFrameLimit->Enable();
m_pVclFrameMove->Enable();
m_pEdRange->Enable();
bOk = bOk && !m_pEdRange->GetText().isEmpty();
}
m_pBtnOk->Enable(bOk);

View file

@ -17,6 +17,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frame">
<property name="visible">True</property>
@ -45,7 +46,7 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">URL</property>
<property name="label" translatable="yes">URL:</property>
</object>
<packing>
<property name="expand">False</property>
@ -103,6 +104,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkRadioButton" id="directdata">
<property name="label" translatable="yes">Direct data feed</property>
@ -156,26 +158,30 @@
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box2">
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkRadioButton" id="valuesinline">
<property name="label" translatable="yes">value1,value2,...</property>
<property name="label" translatable="yes">value1,value2,...,valueN, and fill into range:</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="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">addressvalue</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<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>
@ -190,9 +196,25 @@
<property name="group">valuesinline</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<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="GtkEntry" id="range">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">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>
@ -215,34 +237,14 @@
</packing>
</child>
<child>
<object class="GtkFrame" id="framerange">
<object class="GtkCheckButton" id="refresh_ui">
<property name="label" translatable="yes">Empty lines trigger UI refresh</property>
<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="GtkEntry" id="range">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="rangelabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Fill data into range</property>
<property name="use_underline">True</property>
</object>
</child>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@ -273,128 +275,40 @@
</packing>
</child>
<child>
<object class="GtkFrame" id="framemove">
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<property name="hexpand">True</property>
<property name="spacing">6</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkAlignment" id="alignment4">
<object class="GtkFrame" id="framemove">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkBox" id="box1">
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkRadioButton" id="datadown">
<property name="label" translatable="yes">Move existing data down</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="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">rangedown</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="rangedown">
<property name="label" translatable="yes">Move the range down</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>
<property name="group">datadown</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="nomove">
<property name="label" translatable="yes">Overwrite existing data</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>
<property name="group">datadown</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">When new data arrives</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="framelimit">
<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="alignment3">
<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="GtkBox" id="box9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box10">
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkRadioButton" id="maxlimit">
<property name="label" translatable="yes">Limit to</property>
<object class="GtkRadioButton" id="datadown">
<property name="label" translatable="yes">Move existing data down</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="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">unlimited</property>
<property name="group">rangedown</property>
</object>
<packing>
<property name="expand">False</property>
@ -402,65 +316,162 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="rangedown">
<property name="label" translatable="yes">Move the range down</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>
<property name="group">datadown</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="nomove">
<property name="label" translatable="yes">Overwrite existing data</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>
<property name="group">datadown</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">When new data arrives</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">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="framelimit">
<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="alignment3">
<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="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkRadioButton" id="maxlimit">
<property name="label" translatable="yes">Limit to:</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>
<property name="group">unlimited</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="limit">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char">●</property>
<property name="text" translatable="yes">1000</property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="position">2</property>
<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="GtkRadioButton" id="unlimited">
<property name="label" translatable="yes">_Unlimited</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="valign">start</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">maxlimit</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>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="unlimited">
<property name="label" translatable="yes">_Unlimited</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>
<property name="group">maxlimit</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Maximal amount of rows</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Maximal amount of rows</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</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="padding">6</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
@ -473,7 +484,7 @@
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">start</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>