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

weld DataSourceDialog

Change-Id: I4d3eb8aa354043d3ff57b4996db7b28ad25e0262
Reviewed-on: https://gerrit.libreoffice.org/64127
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 50fdcf88
......@@ -76,41 +76,6 @@ Reference< chart2::XChartTypeTemplate > DocumentChartTypeTemplateProvider::getCu
return m_xTemplate;
}
class DataSourceTabControl : public TabControl
{
public:
explicit DataSourceTabControl(vcl::Window* pParent);
virtual bool DeactivatePage() override;
void DisableTabToggling();
void EnableTabToggling();
private:
bool m_bTogglingEnabled;
};
DataSourceTabControl::DataSourceTabControl(vcl::Window* pParent)
: TabControl(pParent)
, m_bTogglingEnabled(true)
{
}
bool DataSourceTabControl::DeactivatePage()
{
return TabControl::DeactivatePage() && m_bTogglingEnabled;
}
void DataSourceTabControl::DisableTabToggling()
{
m_bTogglingEnabled = false;
}
void DataSourceTabControl::EnableTabToggling()
{
m_bTogglingEnabled = true;
}
sal_uInt16 DataSourceDialog::m_nLastPageId = 0;
enum DataSourceDialogPages
......@@ -119,56 +84,47 @@ enum DataSourceDialogPages
TP_DATA_SOURCE = 2
};
DataSourceDialog::DataSourceDialog(vcl::Window * pParent,
DataSourceDialog::DataSourceDialog(weld::Window * pParent,
const Reference< XChartDocument > & xChartDocument,
const Reference< uno::XComponentContext > & xContext)
: TabDialog(pParent, "DataRangeDialog",
"modules/schart/ui/datarangedialog.ui")
: GenericDialogController(pParent, "modules/schart/ui/datarangedialog.ui",
"DataRangeDialog")
, m_apDocTemplateProvider(new DocumentChartTypeTemplateProvider(xChartDocument))
, m_apDialogModel(new DialogModel(xChartDocument, xContext))
, m_pTabControl(VclPtr<DataSourceTabControl>::Create(get_content_area()))
, m_pRangeChooserTabPage(nullptr)
, m_pDataSourceTabPage(nullptr)
, m_bRangeChooserTabIsValid(true)
, m_bDataSourceTabIsValid(true)
{
get(m_pBtnOK, "ok");
m_pTabControl->Show();
m_pRangeChooserTabPage = VclPtr<RangeChooserTabPage>::Create(TabPageParent(m_pTabControl), *(m_apDialogModel.get()),
m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
m_pDataSourceTabPage = VclPtr<DataSourceTabPage>::Create(TabPageParent(m_pTabControl), *(m_apDialogModel.get()),
m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
m_pTabControl->InsertPage( TP_RANGECHOOSER, SchResId(STR_PAGE_DATA_RANGE) );
m_pTabControl->InsertPage( TP_DATA_SOURCE, SchResId(STR_OBJECT_DATASERIES_PLURAL) );
m_pTabControl->SetTabPage( TP_DATA_SOURCE, m_pDataSourceTabPage );
m_pTabControl->SetTabPage( TP_RANGECHOOSER, m_pRangeChooserTabPage );
m_pTabControl->SelectTabPage( m_nLastPageId );
, m_bTogglingEnabled(true)
, m_xTabControl(m_xBuilder->weld_notebook("notebook"))
, m_xBtnOK(m_xBuilder->weld_button("ok"))
{
TabPageParent aRangeParent(m_xTabControl->get_page("range"), this);
m_pRangeChooserTabPage = VclPtr<RangeChooserTabPage>::Create(aRangeParent, *(m_apDialogModel.get()),
m_apDocTemplateProvider.get(), nullptr, true /* bHideDescription */ );
TabPageParent aSeriesParent(m_xTabControl->get_page("series"), this);
m_pDataSourceTabPage = VclPtr<DataSourceTabPage>::Create(aSeriesParent, *(m_apDialogModel.get()),
m_apDocTemplateProvider.get(), nullptr, true /* bHideDescription */ );
m_xTabControl->connect_enter_page(LINK(this, DataSourceDialog, ActivatePageHdl));
m_xTabControl->connect_leave_page(LINK(this, DataSourceDialog, DeactivatePageHdl));
ActivatePageHdl(m_xTabControl->get_current_page_ident());
if (m_nLastPageId != 0)
{
m_xTabControl->set_current_page(m_nLastPageId);
ActivatePageHdl(m_xTabControl->get_current_page_ident());
}
}
DataSourceDialog::~DataSourceDialog()
{
disposeOnce();
}
void DataSourceDialog::dispose()
{
m_pRangeChooserTabPage.disposeAndClear();
m_pDataSourceTabPage.disposeAndClear();
if (m_pTabControl)
m_nLastPageId = m_pTabControl->GetCurPageId();
m_pTabControl.disposeAndClear();
m_pBtnOK.clear();
TabDialog::dispose();
m_nLastPageId = m_xTabControl->get_current_page();
}
short DataSourceDialog::Execute()
short DataSourceDialog::run()
{
short nResult = TabDialog::Execute();
short nResult = GenericDialogController::run();
if( nResult == RET_OK )
{
if( m_pRangeChooserTabPage )
......@@ -179,25 +135,48 @@ short DataSourceDialog::Execute()
return nResult;
}
IMPL_LINK(DataSourceDialog, ActivatePageHdl, const OString&, rPage, void)
{
if (rPage == "range")
m_pRangeChooserTabPage->ActivatePage();
else if (rPage == "series")
m_pDataSourceTabPage->ActivatePage();
}
// allow/disallow user to leave page
IMPL_LINK_NOARG(DataSourceDialog, DeactivatePageHdl, const OString&, bool)
{
return m_bTogglingEnabled;
}
void DataSourceDialog::DisableTabToggling()
{
m_bTogglingEnabled = false;
}
void DataSourceDialog::EnableTabToggling()
{
m_bTogglingEnabled = true;
}
void DataSourceDialog::setInvalidPage( TabPage * pTabPage )
{
if( pTabPage == m_pRangeChooserTabPage )
if (pTabPage == m_pRangeChooserTabPage)
m_bRangeChooserTabIsValid = false;
else if( pTabPage == m_pDataSourceTabPage )
else if (pTabPage == m_pDataSourceTabPage)
m_bDataSourceTabIsValid = false;
if( ! (m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid ))
if (!(m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid))
{
m_pBtnOK->Enable( false );
OSL_ASSERT( m_pTabControl );
m_xBtnOK->set_sensitive(false);
// note: there seems to be no suitable mechanism to address pages by
// identifier, at least it is unclear what the page identifiers are.
// @todo: change the fixed numbers to identifiers
if( m_bRangeChooserTabIsValid )
m_pTabControl->SetCurPageId( m_pTabControl->GetPageId( 1 ));
m_xTabControl->set_current_page(1);
else if( m_bDataSourceTabIsValid )
m_pTabControl->SetCurPageId( m_pTabControl->GetPageId( 0 ));
m_pTabControl->DisableTabToggling();
m_xTabControl->set_current_page(0);
DisableTabToggling();
}
}
......@@ -208,11 +187,10 @@ void DataSourceDialog::setValidPage( TabPage * pTabPage )
else if( pTabPage == m_pDataSourceTabPage )
m_bDataSourceTabIsValid = true;
if( m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid )
if (m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid)
{
m_pBtnOK->Enable();
OSL_ASSERT( m_pTabControl );
m_pTabControl->EnableTabToggling();
m_xBtnOK->set_sensitive(true);
EnableTabToggling();
}
}
......
......@@ -124,11 +124,20 @@ void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog )
{
if( pDialog )
{
pDialog->Show( !bEnable );
pDialog->SetModalInputMode( !bEnable );
pDialog->Show( !bEnable );
}
}
void lcl_enableRangeChoosing(bool bEnable, weld::DialogController* pDialog)
{
if (!pDialog)
return;
weld::Dialog* pDlg = pDialog->getDialog();
pDlg->set_modal(!bEnable);
pDlg->show(!bEnable);
}
void lcl_addLSequenceToDataSource(
const Reference< chart2::data::XLabeledDataSequence > & xLSequence,
const Reference< chart2::data::XDataSource > & xSource )
......@@ -178,7 +187,9 @@ DataSourceTabPage::DataSourceTabPage(TabPageParent pParent, DialogModel & rDialo
, m_pCurrentRangeChoosingField( nullptr )
, m_bIsDirty( false )
, m_pParentDialog( pParentDialog )
, m_pTabPageNotifiable( dynamic_cast< TabPageNotifiable * >( pParentDialog ))
, m_pParentController(pParent.pController)
, m_pTabPageNotifiable(pParentDialog ? dynamic_cast<TabPageNotifiable*>(pParentDialog)
: dynamic_cast<TabPageNotifiable*>(m_pParentController))
, m_xFT_CAPTION(m_xBuilder->weld_label("FT_CAPTION_FOR_WIZARD"))
, m_xFT_SERIES(m_xBuilder->weld_label("FT_SERIES"))
, m_xLB_SERIES(m_xBuilder->weld_tree_view("LB_SERIES"))
......@@ -232,7 +243,6 @@ DataSourceTabPage::DataSourceTabPage(TabPageParent pParent, DialogModel & rDialo
// select first series
if (m_xLB_SERIES->n_children())
m_xLB_SERIES->select(0);
m_xLB_SERIES->grab_focus();
}
void DataSourceTabPage::InsertRoleLBEntry(const OUString& rRole, const OUString& rRange)
......@@ -260,6 +270,7 @@ void DataSourceTabPage::ActivatePage()
{
OWizardPage::ActivatePage();
updateControlsFromDialogModel();
m_xLB_SERIES->grab_focus();
}
void DataSourceTabPage::initializePage()
......@@ -340,8 +351,6 @@ void DataSourceTabPage::updateControlsFromDialogModel()
void DataSourceTabPage::fillSeriesListBox()
{
m_xLB_SERIES->freeze();
Reference< XDataSeries > xSelected;
SeriesEntry* pEntry = nullptr;
int nEntry = m_xLB_SERIES->get_selected_index();
......@@ -353,6 +362,8 @@ void DataSourceTabPage::fillSeriesListBox()
bool bHasSelectedEntry = (pEntry != nullptr);
int nSelectedEntry = -1;
m_xLB_SERIES->freeze();
m_xLB_SERIES->clear();
std::vector< DialogModel::tSeriesWithChartTypeByName > aSeries(
......@@ -464,15 +475,15 @@ void DataSourceTabPage::updateControlState()
m_xIMB_RANGE_CAT->show(bShowIB);
m_xFT_SERIES->set_sensitive(true);
m_xLB_SERIES->set_sensitive(true);
m_xFT_ROLE->set_sensitive(bHasSelectedSeries);
m_xLB_ROLE->set_sensitive(bHasSelectedSeries);
m_xFT_RANGE->set_sensitive(bHasValidRole);
m_xEDT_RANGE->set_sensitive(bHasValidRole);
m_xFT_SERIES->set_sensitive(true);
m_xLB_SERIES->set_sensitive(true);
m_xIMB_RANGE_MAIN->show(bShowIB);
isValid();
......@@ -548,6 +559,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, weld::Button&, voi
}
lcl_enableRangeChoosing( true, m_pParentDialog );
lcl_enableRangeChoosing( true, m_pParentController );
m_rDialogModel.getRangeSelectionHelper()->chooseRange( aSelectedRolesRange, aUIStr, *this );
}
else
......@@ -564,6 +576,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, CategoriesRangeButtonClickedHdl, weld::Button
OUString aStr(SchResId(m_xFT_CATEGORIES->get_visible() ? STR_DATA_SELECT_RANGE_FOR_CATEGORIES : STR_DATA_SELECT_RANGE_FOR_DATALABELS));
lcl_enableRangeChoosing(true, m_pParentDialog);
lcl_enableRangeChoosing(true, m_pParentController);
m_rDialogModel.getRangeSelectionHelper()->chooseRange(
m_rDialogModel.getCategoriesRange(), aStr, *this );
}
......@@ -744,6 +757,7 @@ void DataSourceTabPage::listeningFinished(
updateControlState();
lcl_enableRangeChoosing(false, m_pParentDialog);
lcl_enableRangeChoosing(false, m_pParentController);
}
void DataSourceTabPage::disposingRangeSelection()
......
......@@ -62,11 +62,12 @@ public:
bool bHideDescription = false);
virtual ~DataSourceTabPage() override;
virtual void ActivatePage() override;
void commitPage();
private:
// OWizardPage
virtual void ActivatePage() override;
virtual void dispose() override;
virtual bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ) override;
......@@ -127,6 +128,7 @@ private:
bool m_bIsDirty;
VclPtr<Dialog> m_pParentDialog;
weld::DialogController* m_pParentController;
TabPageNotifiable * m_pTabPageNotifiable;
std::unique_ptr<weld::Label> m_xFT_CAPTION;
......
......@@ -43,15 +43,24 @@ namespace
}
}
void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog )
void lcl_enableRangeChoosing(bool bEnable, Dialog * pDialog)
{
if( pDialog )
{
pDialog->Show( !bEnable );
pDialog->SetModalInputMode( !bEnable );
pDialog->Show(!bEnable);
}
}
void lcl_enableRangeChoosing(bool bEnable, weld::DialogController* pDialog)
{
if (!pDialog)
return;
weld::Dialog* pDlg = pDialog->getDialog();
pDlg->set_modal(!bEnable);
pDlg->show(!bEnable);
}
} // anonymous namespace
namespace chart
......@@ -63,15 +72,17 @@ using ::com::sun::star::uno::Sequence;
RangeChooserTabPage::RangeChooserTabPage(TabPageParent pParent, DialogModel & rDialogModel,
ChartTypeTemplateProvider* pTemplateProvider,
Dialog * pParentDialog, bool bHideDescription /* = false */)
Dialog* pParentDialog, bool bHideDescription /* = false */)
: OWizardPage(pParent, "modules/schart/ui/tp_RangeChooser.ui", "tp_RangeChooser")
, m_nChangingControlCalls(0)
, m_bIsDirty(false)
, m_aLastValidRangeString()
, m_pTemplateProvider(pTemplateProvider)
, m_rDialogModel( rDialogModel )
, m_pParentDialog( pParentDialog )
, m_pTabPageNotifiable( dynamic_cast< TabPageNotifiable * >( pParentDialog ))
, m_pParentDialog(pParentDialog)
, m_pParentController(pParent.pController)
, m_pTabPageNotifiable(pParentDialog ? dynamic_cast<TabPageNotifiable*>(pParentDialog)
: dynamic_cast<TabPageNotifiable*>(m_pParentController))
, m_xFT_Caption(m_xBuilder->weld_label("FT_CAPTION_FOR_WIZARD"))
, m_xFT_Range(m_xBuilder->weld_label("FT_RANGE"))
, m_xED_Range(m_xBuilder->weld_entry("ED_RANGE"))
......@@ -140,6 +151,7 @@ void RangeChooserTabPage::ActivatePage()
{
OWizardPage::ActivatePage();
initControlsFromModel();
m_xED_Range->grab_focus();
}
void RangeChooserTabPage::initControlsFromModel()
......@@ -352,6 +364,7 @@ IMPL_LINK_NOARG(RangeChooserTabPage, ChooseRangeHdl, weld::Button&, void)
OUString aTitle = m_xFTTitle->get_label();
lcl_enableRangeChoosing( true, m_pParentDialog );
lcl_enableRangeChoosing( true, m_pParentController );
m_rDialogModel.getRangeSelectionHelper()->chooseRange( aRange, aTitle, *this );
}
......@@ -378,6 +391,7 @@ void RangeChooserTabPage::listeningFinished( const OUString & rNewRange )
changeDialogModelAccordingToControls();
lcl_enableRangeChoosing( false, m_pParentDialog );
lcl_enableRangeChoosing( false, m_pParentController );
}
void RangeChooserTabPage::disposingRangeSelection()
{
......
......@@ -47,12 +47,13 @@ public:
virtual void listeningFinished( const OUString & rNewRange ) override;
virtual void disposingRangeSelection() override;
virtual void ActivatePage() override;
void commitPage();
private:
//OWizardPage
virtual void ActivatePage() override;
virtual bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ) override;
//TabPage
......@@ -78,6 +79,7 @@ private:
DialogModel & m_rDialogModel;
VclPtr<Dialog> m_pParentDialog;
weld::DialogController* m_pParentController;
TabPageNotifiable * m_pTabPageNotifiable;
std::unique_ptr<weld::Label> m_xFT_Caption;
......
......@@ -19,8 +19,7 @@
#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATASOURCE_HXX
#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATASOURCE_HXX
#include <vcl/tabdlg.hxx>
#include <vcl/button.hxx>
#include <vcl/weld.hxx>
#include <vcl/vclptr.hxx>
#include "TabPageNotifiable.hxx"
......@@ -42,35 +41,41 @@ class ChartTypeTemplateProvider;
class DialogModel;
class DataSourceDialog final :
public TabDialog,
public weld::GenericDialogController,
public TabPageNotifiable
{
public:
explicit DataSourceDialog(
vcl::Window * pParent,
weld::Window * pParent,
const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument,
const css::uno::Reference< css::uno::XComponentContext > & xContext );
virtual ~DataSourceDialog() override;
virtual void dispose() override;
// from Dialog (base of TabDialog)
virtual short Execute() override;
// from GenericDialogController base
virtual short run() override;
// TabPageNotifiable
virtual void setInvalidPage( TabPage * pTabPage ) override;
virtual void setValidPage( TabPage * pTabPage ) override;
private:
void DisableTabToggling();
void EnableTabToggling();
DECL_LINK(ActivatePageHdl, const OString&, void);
DECL_LINK(DeactivatePageHdl, const OString&, bool);
std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
std::unique_ptr< DialogModel > m_apDialogModel;
VclPtr<DataSourceTabControl> m_pTabControl;
VclPtr<OKButton> m_pBtnOK;
VclPtr<RangeChooserTabPage> m_pRangeChooserTabPage;
VclPtr<DataSourceTabPage> m_pDataSourceTabPage;
bool m_bRangeChooserTabIsValid;
bool m_bDataSourceTabIsValid;
bool m_bTogglingEnabled;
std::unique_ptr<weld::Notebook> m_xTabControl;
std::unique_ptr<weld::Button> m_xBtnOK;
static sal_uInt16 m_nLastPageId;
};
......
......@@ -1358,8 +1358,8 @@ void ChartController::executeDispatch_SourceData()
SchResId(STR_ACTION_EDIT_DATA_RANGES), m_xUndoManager);
SolarMutexGuard aSolarGuard;
ScopedVclPtrInstance< ::chart::DataSourceDialog > aDlg( GetChartWindow(), xChartDoc, m_xCC );
if( aDlg->Execute() == RET_OK )
::chart::DataSourceDialog aDlg(GetChartFrame(), xChartDoc, m_xCC);
if (aDlg.run() == RET_OK)
{
impl_adaptDataSeriesAutoResize();
aUndoGuard.commit();
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="chart">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="DataRangeDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="datarangedialog|DataRangeDialog">Data Ranges</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="default_width">0</property>
<property name="default_height">0</property>
<property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
......@@ -70,7 +77,109 @@
</packing>
</child>
<child>
<placeholder/>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="scrollable">True</property>
<property name="enable_popup">True</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="range">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="datarangedialog|range">Data Range</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="series">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="datarangedialog|series">Data Series</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
......
......@@ -8,18 +8,16 @@
<property name="tooltip_text" translatable="yes" context="tp_RangeChooser|imageIB_RANGE|tooltip_text">Select data range</property>
<property name="icon_name">chart2/res/selectrange.png</property>
</object>
<object class="GtkBox" id="tp_RangeChooser">
<object class="GtkGrid" id="tp_RangeChooser">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
<child>
<object class="GtkBox" id="box1">
<object class="GtkGrid" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="FT_CAPTION_FOR_WIZARD">
<property name="visible">True</property>
......@@ -31,17 +29,16 @@
</attributes>
</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>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<object class="GtkGrid" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="spacing">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="FT_RANGE">
<property name="visible">True</property>
......@@ -52,9 +49,8 @@
<property name="xalign">0</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>
</packing>
</child>
<child>
......@@ -65,9 +61,8 @@
<property name="activates_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
......@@ -79,16 +74,14 @@
<property name="image">imageIB_RANGE</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
......@@ -103,9 +96,8 @@
<property name="draw_indicator">True</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">2</property>
</packing>
</child>
<child>
......@@ -120,9 +112,8 @@
<property name="group">RB_DATAROWS</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
......@@ -136,9 +127,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
......@@ -152,9 +142,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
......@@ -163,9 +152,8 @@
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="left_attach">0</property>
<property name="top_attach">6</property>
</packing>
</child>
<child>
......@@ -179,9 +167,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">7</property>
<property name="left_attach">0</property>
<property name="top_attach">7</property>
</packing>
</child>
<child>
......@@ -246,9 +233,8 @@
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">8</property>
<property name="left_attach">0</property>
<property name="top_attach">8</property>
</packing>
</child>
<child>
......@@ -257,16 +243,14 @@
<property name="label" translatable="yes" context="tp_RangeChooser|STR_PAGE_DATA_RANGE">Data Range</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">11</property>
<property name="left_attach">0</property>
<property name="top_attach">9</property>
</packing>
</child>
</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>
</packing>
</child>
</object>
......
......@@ -2028,6 +2028,7 @@ public:
virtual int get_selected_index() const override
{
assert(m_xTreeView->IsUpdateMode() && "don't request selection when frozen");
SvTreeListEntry* pEntry = m_xTreeView->FirstSelected();
if (!pEntry)
return -1;
......
......@@ -4587,6 +4587,7 @@ public:
virtual int get_selected_index() const override
{
assert(gtk_tree_view_get_model(m_pTreeView) && "don't request selection when frozen");
int nRet = -1;
GtkTreeIter iter;
GtkTreeModel* pModel;
......
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