Kaydet (Commit) f79fa791 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Modify these stats dialogs to have OK and Cancel pair.

Change-Id: I5707aea9965e0d288d4a0e742f5d3cccf08107eb
üst 251507d0
......@@ -57,8 +57,6 @@ ScSamplingDialog::ScSamplingDialog(
get(mpPeriodicMethodRadio, "periodic-method-radio");
get(mpButtonOk, "ok");
get(mpButtonApply, "apply");
get(mpButtonClose, "close");
Init();
GetRangeFromSelection();
......@@ -67,10 +65,7 @@ ScSamplingDialog::ScSamplingDialog(
void ScSamplingDialog::Init()
{
mpButtonOk->SetClickHdl( LINK( this, ScSamplingDialog, OkClicked ) );
mpButtonClose->SetClickHdl( LINK( this, ScSamplingDialog, CloseClicked ) );
mpButtonApply->SetClickHdl( LINK( this, ScSamplingDialog, ApplyClicked ) );
mpButtonOk->Enable(false);
mpButtonApply->Enable(false);
Link aLink = LINK( this, ScSamplingDialog, GetFocusHandler );
mpInputRangeEdit->SetGetFocusHdl( aLink );
......@@ -159,7 +154,6 @@ void ScSamplingDialog::SetReference( const ScRange& rReferenceRange, ScDocument*
// Enable OK, Cancel if output range is set
mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
mpButtonApply->Enable(!mpOutputRangeEdit->GetText().isEmpty());
}
}
}
......@@ -278,21 +272,8 @@ void ScSamplingDialog::PerformSampling()
}
IMPL_LINK( ScSamplingDialog, OkClicked, PushButton*, /*pButton*/ )
{
ApplyClicked(NULL);
CloseClicked(NULL);
return 0;
}
IMPL_LINK( ScSamplingDialog, ApplyClicked, PushButton*, /*pButton*/ )
{
PerformSampling();
return 0;
}
IMPL_LINK( ScSamplingDialog, CloseClicked, PushButton*, /*pButton*/ )
{
Close();
return 0;
}
......
......@@ -78,8 +78,6 @@ ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
mpOutputRangeButton->SetReferences(this, mpOutputRangeEdit);
get(mpButtonOk, "ok");
get(mpButtonApply, "apply");
get(mpButtonClose, "close");
get(mpGroupByColumnsRadio, "groupedby-columns-radio");
get(mpGroupByRowsRadio, "groupedby-rows-radio");
......@@ -94,10 +92,7 @@ ScStatisticsInputOutputDialog::~ScStatisticsInputOutputDialog()
void ScStatisticsInputOutputDialog::Init()
{
mpButtonOk->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, OkClicked ) );
mpButtonClose->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, CloseClicked ) );
mpButtonApply->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, ApplyClicked ) );
mpButtonOk->Enable(false);
mpButtonApply->Enable(false);
Link aLink = LINK( this, ScStatisticsInputOutputDialog, GetFocusHandler );
mpInputRangeEdit->SetGetFocusHdl( aLink );
......@@ -167,27 +162,13 @@ void ScStatisticsInputOutputDialog::SetReference( const ScRange& rReferenceRange
// Enable OK, Cancel if output range is set
mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
mpButtonApply->Enable(!mpOutputRangeEdit->GetText().isEmpty());
}
}
}
IMPL_LINK( ScStatisticsInputOutputDialog, OkClicked, PushButton*, /*pButton*/ )
{
ApplyClicked(NULL);
CloseClicked(NULL);
return 0;
}
IMPL_LINK( ScStatisticsInputOutputDialog, ApplyClicked, PushButton*, /*pButton*/ )
{
CalculateInputAndWriteToOutput();
return 0;
}
IMPL_LINK( ScStatisticsInputOutputDialog, CloseClicked, PushButton*, /*pButton*/ )
{
Close();
return 0;
}
......
......@@ -56,8 +56,6 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog(
mpOutputRangeButton->SetReferences(this, mpOutputRangeEdit);
get(mpButtonOk, "ok");
get(mpButtonApply, "apply");
get(mpButtonClose, "close");
get(mpGroupByColumnsRadio, "groupedby-columns-radio");
get(mpGroupByRowsRadio, "groupedby-rows-radio");
......@@ -72,10 +70,7 @@ ScStatisticsTwoVariableDialog::~ScStatisticsTwoVariableDialog()
void ScStatisticsTwoVariableDialog::Init()
{
mpButtonOk->SetClickHdl( LINK( this, ScStatisticsTwoVariableDialog, OkClicked ) );
mpButtonClose->SetClickHdl( LINK( this, ScStatisticsTwoVariableDialog, CloseClicked ) );
mpButtonApply->SetClickHdl( LINK( this, ScStatisticsTwoVariableDialog, ApplyClicked ) );
mpButtonOk->Enable(false);
mpButtonApply->Enable(false);
Link aLink = LINK( this, ScStatisticsTwoVariableDialog, GetFocusHandler );
mpVariable1RangeEdit->SetGetFocusHdl( aLink );
......@@ -175,27 +170,13 @@ void ScStatisticsTwoVariableDialog::SetReference( const ScRange& rReferenceRange
// Enable OK, Cancel if output range is set
mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
mpButtonApply->Enable(!mpOutputRangeEdit->GetText().isEmpty());
}
}
}
IMPL_LINK( ScStatisticsTwoVariableDialog, OkClicked, PushButton*, /*pButton*/ )
{
ApplyClicked(NULL);
CloseClicked(NULL);
return 0;
}
IMPL_LINK( ScStatisticsTwoVariableDialog, ApplyClicked, PushButton*, /*pButton*/ )
{
CalculateInputAndWriteToOutput();
return 0;
}
IMPL_LINK( ScStatisticsTwoVariableDialog, CloseClicked, PushButton*, /*pButton*/ )
{
Close();
return 0;
}
......
......@@ -48,10 +48,7 @@ private:
RadioButton* mpRandomMethodRadio;
RadioButton* mpPeriodicMethodRadio;
PushButton* mpButtonApply;
OKButton* mpButtonOk;
CloseButton* mpButtonClose;
formula::RefEdit* mpActiveEdit;
......@@ -75,8 +72,6 @@ private:
ScRange PerformPeriodicSampling(ScDocShell* pDocShell);
DECL_LINK( OkClicked, PushButton* );
DECL_LINK( CloseClicked, PushButton* );
DECL_LINK( ApplyClicked, PushButton* );
DECL_LINK( GetFocusHandler, Control* );
DECL_LINK( LoseFocusHandler, void* );
DECL_LINK( SamplingSizeValueModified, void* );
......
......@@ -69,9 +69,7 @@ protected:
private:
// Widgets
PushButton* mpButtonApply;
OKButton* mpButtonOk;
CloseButton* mpButtonClose;
formula::RefEdit* mpActiveEdit;
ScAddress mCurrentAddress;
......@@ -82,8 +80,6 @@ private:
DECL_LINK( GroupByChanged, void* );
DECL_LINK( OkClicked, PushButton* );
DECL_LINK( CloseClicked, PushButton* );
DECL_LINK( ApplyClicked, PushButton* );
DECL_LINK( GetFocusHandler, Control* );
DECL_LINK( LoseFocusHandler, void* );
};
......
......@@ -69,9 +69,8 @@ protected:
private:
// Widgets
PushButton* mpButtonApply;
OKButton* mpButtonOk;
CloseButton* mpButtonClose;
RadioButton* mpGroupByColumnsRadio;
RadioButton* mpGroupByRowsRadio;
......@@ -84,8 +83,6 @@ private:
DECL_LINK( GroupByChanged, void* );
DECL_LINK( OkClicked, PushButton* );
DECL_LINK( CloseClicked, PushButton* );
DECL_LINK( ApplyClicked, PushButton* );
DECL_LINK( GetFocusHandler, Control* );
DECL_LINK( LoseFocusHandler, void* );
};
......
......@@ -30,22 +30,6 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</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="ok">
<property name="label">gtk-ok</property>
......@@ -63,8 +47,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......
......@@ -17,22 +17,6 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</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="ok">
<property name="label">gtk-ok</property>
......@@ -50,8 +34,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......
......@@ -17,22 +17,6 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</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="ok">
<property name="label">gtk-ok</property>
......@@ -50,8 +34,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......
......@@ -17,22 +17,6 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</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="ok">
<property name="label">gtk-ok</property>
......@@ -50,8 +34,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......
......@@ -23,22 +23,6 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</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="ok">
<property name="label">gtk-ok</property>
......@@ -56,8 +40,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......
......@@ -24,22 +24,6 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</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="ok">
<property name="label">gtk-ok</property>
......@@ -57,8 +41,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......
......@@ -28,22 +28,6 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</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="ok">
<property name="label">gtk-ok</property>
......@@ -61,8 +45,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......
......@@ -17,22 +17,6 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</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="ok">
<property name="label">gtk-ok</property>
......@@ -50,8 +34,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......
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