diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-17 09:51:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-17 18:05:34 +0200 |
commit | 9a360f993d7a791c548801779d7f444f87541489 (patch) | |
tree | 5e18e3fc390c0719a7bbf39d64fa8e298069aefb | |
parent | 73a7c7ddbc52ed3fe512d4c5206e90810f14b50c (diff) |
weld DropDownFieldDialog
Change-Id: I58ceb44f96d8ae3e3732b85eafd44c4d6eab42aa
Reviewed-on: https://gerrit.libreoffice.org/53035
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/inc/swabstdlg.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 11 | ||||
-rw-r--r-- | sw/source/ui/fldui/DropDownFieldDialog.cxx | 125 | ||||
-rw-r--r-- | sw/source/uibase/inc/DropDownFieldDialog.hxx | 48 | ||||
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh2.cxx | 9 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/dropdownfielddialog.ui | 119 |
8 files changed, 185 insertions, 147 deletions
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index d64bc9aad389..92699b35f7ee 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -396,7 +396,7 @@ public: const SwDBData& rData) = 0; virtual VclPtr<SfxAbstractTabDialog> CreateSwFootNoteOptionDlg(vcl::Window *pParent, SwWrtShell &rSh) = 0; - virtual VclPtr<AbstractDropDownFieldDialog> CreateDropDownFieldDialog(SwWrtShell &rSh, + virtual VclPtr<AbstractDropDownFieldDialog> CreateDropDownFieldDialog(weld::Window* pParent, SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton) = 0; virtual VclPtr<SfxAbstractTabDialog> CreateSwEnvDlg ( vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert ) = 0; diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index cf431989c93f..fd0e2009e953 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -133,7 +133,12 @@ short AbstractSwConvertTableDlg_Impl::Execute() return m_xDlg->run(); } IMPL_ABSTDLG_BASE(AbstractSwInsertDBColAutoPilot_Impl); -IMPL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl); + +short AbstractDropDownFieldDialog_Impl::Execute() +{ + return m_xDlg->execute(); +} + IMPL_ABSTDLG_BASE(AbstractSwLabDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl); short AbstractSwAutoFormatDlg_Impl::Execute() @@ -281,12 +286,12 @@ void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::A bool AbstractDropDownFieldDialog_Impl::PrevButtonPressed() const { - return pDlg->PrevButtonPressed(); + return m_xDlg->PrevButtonPressed(); } bool AbstractDropDownFieldDialog_Impl::NextButtonPressed() const { - return pDlg->NextButtonPressed(); + return m_xDlg->NextButtonPressed(); } void AbstractSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId ) @@ -758,11 +763,10 @@ VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwFootNoteOptio return VclPtr<AbstractTabDialog_Impl>::Create( pDlg ); } -VclPtr<AbstractDropDownFieldDialog> SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog( +VclPtr<AbstractDropDownFieldDialog> SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog(weld::Window *pParent, SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton) { - VclPtr<sw::DropDownFieldDialog> pDlg = VclPtr<sw::DropDownFieldDialog>::Create(nullptr, rSh, pField, bPrevButton, bNextButton); - return VclPtr<AbstractDropDownFieldDialog_Impl>::Create( pDlg ); + return VclPtr<AbstractDropDownFieldDialog_Impl>::Create(new sw::DropDownFieldDialog(pParent, rSh, pField, bPrevButton, bNextButton)); } VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( vcl::Window* pParent, const SfxItemSet& rSet, diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index b708efc4098c..48fd7f95c91f 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -262,7 +262,14 @@ class AbstractSwInsertDBColAutoPilot_Impl : public AbstractSwInsertDBColAutoPil class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog { - DECL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl, sw::DropDownFieldDialog) +protected: + std::unique_ptr<sw::DropDownFieldDialog> m_xDlg; +public: + explicit AbstractDropDownFieldDialog_Impl(sw::DropDownFieldDialog* p) + : m_xDlg(p) + { + } + virtual short Execute() override; virtual bool PrevButtonPressed() const override; virtual bool NextButtonPressed() const override; }; @@ -537,7 +544,7 @@ public: const SwDBData& rData) override; virtual VclPtr<SfxAbstractTabDialog> CreateSwFootNoteOptionDlg(vcl::Window *pParent, SwWrtShell &rSh) override; - virtual VclPtr<AbstractDropDownFieldDialog> CreateDropDownFieldDialog(SwWrtShell &rSh, + virtual VclPtr<AbstractDropDownFieldDialog> CreateDropDownFieldDialog(weld::Window* pParent, SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton) override; virtual VclPtr<SfxAbstractTabDialog> CreateSwEnvDlg ( vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert ) override; virtual VclPtr<AbstractSwLabDlg> CreateSwLabDlg(const SfxItemSet& rSet, diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index 8de7bd7c32d8..d21758e062dc 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -28,126 +28,113 @@ using namespace ::com::sun::star; // edit insert-field -sw::DropDownFieldDialog::DropDownFieldDialog(vcl::Window *pParent, SwWrtShell &rS, +sw::DropDownFieldDialog::DropDownFieldDialog(weld::Window *pParent, SwWrtShell &rS, SwField* pField, bool bPrevButton, bool bNextButton) - : SvxStandardDialog(pParent, "DropdownFieldDialog", - "modules/swriter/ui/dropdownfielddialog.ui") - , rSh( rS ) - , pDropField(nullptr) + : GenericDialogController(pParent, "modules/swriter/ui/dropdownfielddialog.ui", "DropdownFieldDialog") + , m_rSh( rS ) + , m_pDropField(nullptr) , m_pPressedButton(nullptr) + , m_xListItemsLB(m_xBuilder->weld_tree_view("list")) + , m_xOKPB(m_xBuilder->weld_button("ok")) + , m_xPrevPB(m_xBuilder->weld_button("prev")) + , m_xNextPB(m_xBuilder->weld_button("next")) + , m_xEditPB(m_xBuilder->weld_button("edit")) { - get(m_pListItemsLB, "list"); - m_pListItemsLB->SetDropDownLineCount(12); - m_pListItemsLB->set_width_request(m_pListItemsLB->approximate_char_width()*32); - get(m_pOKPB, "ok"); - get(m_pPrevPB, "prev"); - get(m_pNextPB, "next"); - get(m_pEditPB, "edit"); - Link<ListBox&, void> aDoubleLk = LINK(this, DropDownFieldDialog, DoubleClickHdl); - m_pListItemsLB->SetDoubleClickHdl( aDoubleLk ); - - Link<Button*, void> aEditButtonLk = LINK(this, DropDownFieldDialog, EditHdl); - Link<Button*,void> aPrevButtonLk = LINK(this, DropDownFieldDialog, PrevHdl); - Link<Button*, void> aNextButtonLk = LINK(this, DropDownFieldDialog, NextHdl); - m_pEditPB->SetClickHdl(aEditButtonLk); + m_xListItemsLB->set_size_request(m_xListItemsLB->get_approximate_digit_width() * 24, + m_xListItemsLB->get_height_rows(12)); + Link<weld::TreeView&, void> aDoubleLk = LINK(this, DropDownFieldDialog, DoubleClickHdl); + m_xListItemsLB->connect_row_activated( aDoubleLk ); + + Link<weld::Button&, void> aEditButtonLk = LINK(this, DropDownFieldDialog, EditHdl); + Link<weld::Button&,void> aPrevButtonLk = LINK(this, DropDownFieldDialog, PrevHdl); + Link<weld::Button&, void> aNextButtonLk = LINK(this, DropDownFieldDialog, NextHdl); + m_xEditPB->connect_clicked(aEditButtonLk); if( bPrevButton || bNextButton ) { - m_pPrevPB->Show(); - m_pPrevPB->SetClickHdl(aPrevButtonLk); - m_pPrevPB->Enable(bPrevButton); + m_xPrevPB->show(); + m_xPrevPB->connect_clicked(aPrevButtonLk); + m_xPrevPB->set_sensitive(bPrevButton); - m_pNextPB->Show(); - m_pNextPB->SetClickHdl(aNextButtonLk); - m_pNextPB->Enable(bNextButton); + m_xNextPB->show(); + m_xNextPB->connect_clicked(aNextButtonLk); + m_xNextPB->set_sensitive(bNextButton); } if( SwFieldIds::Dropdown == pField->GetTyp()->Which() ) { - pDropField = static_cast<SwDropDownField*>(pField); - OUString sTitle = GetText(); - sTitle += pDropField->GetPar2(); - SetText(sTitle); - uno::Sequence< OUString > aItems = pDropField->GetItemSequence(); + m_pDropField = static_cast<SwDropDownField*>(pField); + OUString sTitle = m_xDialog->get_title(); + sTitle += m_pDropField->GetPar2(); + m_xDialog->set_title(sTitle); + uno::Sequence< OUString > aItems = m_pDropField->GetItemSequence(); const OUString* pArray = aItems.getConstArray(); - for(sal_Int32 i = 0; i < aItems.getLength(); i++) - m_pListItemsLB->InsertEntry(pArray[i]); - m_pListItemsLB->SelectEntry(pDropField->GetSelectedItem()); + for (sal_Int32 i = 0; i < aItems.getLength(); ++i) + m_xListItemsLB->append_text(pArray[i]); + m_xListItemsLB->select(m_pDropField->GetSelectedItem()); } - bool bEnable = !rSh.IsCursorReadonly(); - m_pOKPB->Enable( bEnable ); + bool bEnable = !m_rSh.IsCursorReadonly(); + m_xOKPB->set_sensitive(bEnable); - m_pListItemsLB->GrabFocus(); + m_xListItemsLB->grab_focus(); } sw::DropDownFieldDialog::~DropDownFieldDialog() { - disposeOnce(); -} - -void sw::DropDownFieldDialog::dispose() -{ - m_pListItemsLB.clear(); - m_pOKPB.clear(); - m_pPrevPB.clear(); - m_pNextPB.clear(); - m_pEditPB.clear(); - m_pPressedButton.clear(); - SvxStandardDialog::dispose(); } void sw::DropDownFieldDialog::Apply() { - if(pDropField) + if (m_pDropField) { - OUString sSelect = m_pListItemsLB->GetSelectedEntry(); - if(pDropField->GetPar1() != sSelect) + OUString sSelect = m_xListItemsLB->get_selected(); + if (m_pDropField->GetPar1() != sSelect) { - rSh.StartAllAction(); + m_rSh.StartAllAction(); std::unique_ptr<SwDropDownField> const pCopy( - static_cast<SwDropDownField *>( pDropField->CopyField() ) ); + static_cast<SwDropDownField*>(m_pDropField->CopyField())); pCopy->SetPar1(sSelect); - rSh.SwEditShell::UpdateFields(*pCopy); + m_rSh.SwEditShell::UpdateFields(*pCopy); - rSh.SetUndoNoResetModified(); - rSh.EndAllAction(); + m_rSh.SetUndoNoResetModified(); + m_rSh.EndAllAction(); } } } bool sw::DropDownFieldDialog::PrevButtonPressed() const { - return m_pPressedButton == m_pPrevPB; + return m_pPressedButton == m_xPrevPB.get(); } bool sw::DropDownFieldDialog::NextButtonPressed() const { - return m_pPressedButton == m_pNextPB; + return m_pPressedButton == m_xNextPB.get(); } -IMPL_LINK_NOARG(sw::DropDownFieldDialog, EditHdl, Button*, void) +IMPL_LINK_NOARG(sw::DropDownFieldDialog, EditHdl, weld::Button&, void) { - m_pPressedButton = m_pEditPB; - EndDialog(RET_OK); + m_pPressedButton = m_xEditPB.get(); + m_xDialog->response(RET_OK); } -IMPL_LINK_NOARG(sw::DropDownFieldDialog, PrevHdl, Button*, void) +IMPL_LINK_NOARG(sw::DropDownFieldDialog, PrevHdl, weld::Button&, void) { - m_pPressedButton = m_pPrevPB; - EndDialog(RET_OK); + m_pPressedButton = m_xPrevPB.get(); + m_xDialog->response(RET_OK); } -IMPL_LINK_NOARG(sw::DropDownFieldDialog, NextHdl, Button*, void) +IMPL_LINK_NOARG(sw::DropDownFieldDialog, NextHdl, weld::Button&, void) { - m_pPressedButton = m_pNextPB; - EndDialog(RET_OK); + m_pPressedButton = m_xNextPB.get(); + m_xDialog->response(RET_OK); } -IMPL_LINK_NOARG(sw::DropDownFieldDialog, DoubleClickHdl, ListBox&, void) +IMPL_LINK_NOARG(sw::DropDownFieldDialog, DoubleClickHdl, weld::TreeView&, void) { - EndDialog(RET_OK); + m_xDialog->response(RET_OK); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/DropDownFieldDialog.hxx b/sw/source/uibase/inc/DropDownFieldDialog.hxx index b2dbffaefa2c..13f3946a4679 100644 --- a/sw/source/uibase/inc/DropDownFieldDialog.hxx +++ b/sw/source/uibase/inc/DropDownFieldDialog.hxx @@ -19,10 +19,7 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_DROPDOWNFIELDDIALOG_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_DROPDOWNFIELDDIALOG_HXX -#include <svx/stddlg.hxx> -#include <vcl/fixed.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/button.hxx> +#include <vcl/weld.hxx> class SwDropDownField; class SwField; @@ -31,33 +28,36 @@ class SwWrtShell; // Dialog to edit drop down field selection namespace sw { -class DropDownFieldDialog : public SvxStandardDialog +class DropDownFieldDialog : public weld::GenericDialogController { - VclPtr<ListBox> m_pListItemsLB; + SwWrtShell &m_rSh; + SwDropDownField* m_pDropField; - VclPtr<OKButton> m_pOKPB; - VclPtr<PushButton> m_pPrevPB; - VclPtr<PushButton> m_pNextPB; + weld::Button* m_pPressedButton; + std::unique_ptr<weld::TreeView> m_xListItemsLB; + std::unique_ptr<weld::Button> m_xOKPB; + std::unique_ptr<weld::Button> m_xPrevPB; + std::unique_ptr<weld::Button> m_xNextPB; + std::unique_ptr<weld::Button> m_xEditPB; - VclPtr<PushButton> m_pEditPB; - - SwWrtShell &rSh; - SwDropDownField* pDropField; - - VclPtr<PushButton> m_pPressedButton; - - DECL_LINK(EditHdl, Button*, void); - DECL_LINK(PrevHdl, Button*, void); - DECL_LINK(NextHdl, Button*, void); - virtual void Apply() override; - DECL_LINK(DoubleClickHdl, ListBox&, void); + DECL_LINK(EditHdl, weld::Button&, void); + DECL_LINK(PrevHdl, weld::Button&, void); + DECL_LINK(NextHdl, weld::Button&, void); + void Apply(); + DECL_LINK(DoubleClickHdl, weld::TreeView&, void); public: - DropDownFieldDialog( vcl::Window *pParent, SwWrtShell &rSh, - SwField* pField, bool bPrevButton, bool bNextButton ); + DropDownFieldDialog(weld::Window *pParent, SwWrtShell &rSh, + SwField* pField, bool bPrevButton, bool bNextButton); virtual ~DropDownFieldDialog() override; - virtual void dispose() override; bool PrevButtonPressed() const; bool NextButtonPressed() const; + short execute() + { + short nRet = run(); + if (nRet == RET_OK) + Apply(); + return nRet; + } }; } //namespace sw diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index e9ba09ceafb1..3b593928cc9b 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -396,7 +396,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // update input fields bool StartInputFieldDlg(SwField*, bool bPrevButton, bool bNextButton, weld::Window* pParentWin, FieldDialogPressedButton* pPressedButton = nullptr); // update DropDown fields - bool StartDropDownFieldDlg(SwField*, bool bPrevButton, bool bNextButton, FieldDialogPressedButton* pPressedButton = nullptr); + bool StartDropDownFieldDlg(SwField*, bool bPrevButton, bool bNextButton, weld::Window* pParentWin, FieldDialogPressedButton* pPressedButton = nullptr); //"Handler" for changes at DrawView - for controls. virtual void DrawSelChanged( ) override; diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index 0a5525bbce97..fd1b177a7322 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -168,7 +168,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst ) pField = pTmp->GetField(nIndex); if (pField->GetTyp()->Which() == SwFieldIds::Dropdown) { - bCancel = StartDropDownFieldDlg(pField, bPrev, bNext, &ePressedButton); + bCancel = StartDropDownFieldDlg(pField, bPrev, bNext, GetView().GetFrameWeld(), &ePressedButton); } else bCancel = StartInputFieldDlg(pField, bPrev, bNext, GetView().GetFrameWeld(), &ePressedButton); @@ -279,12 +279,13 @@ bool SwWrtShell::StartInputFieldDlg(SwField* pField, bool bPrevButton, bool bNex return bRet; } -bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bPrevButton, bool bNextButton, SwWrtShell::FieldDialogPressedButton* pPressedButton) +bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bPrevButton, bool bNextButton, + weld::Window* pParentWin, SwWrtShell::FieldDialogPressedButton* pPressedButton) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - ScopedVclPtr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(*this, pField, bPrevButton, bNextButton)); + ScopedVclPtr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(pParentWin, *this, pField, bPrevButton, bNextButton)); OSL_ENSURE(pDlg, "Dialog creation failed!"); const short nRet = pDlg->Execute(); @@ -430,7 +431,7 @@ void SwWrtShell::ClickToField( const SwField& rField ) StartInputFieldDlg(const_cast<SwField*>(&rField), false, false, GetView().GetFrameWeld()); break; case SwFieldIds::Dropdown : - StartDropDownFieldDlg( const_cast<SwField*>(&rField), false, false ); + StartDropDownFieldDlg(const_cast<SwField*>(&rField), false, false, GetView().GetFrameWeld()); break; default: SAL_WARN_IF(rField.IsClickable(), "sw", "unhandled clickable field!"); diff --git a/sw/uiconfig/swriter/ui/dropdownfielddialog.ui b/sw/uiconfig/swriter/ui/dropdownfielddialog.ui index dea2059d6103..dcc60a36a026 100644 --- a/sw/uiconfig/swriter/ui/dropdownfielddialog.ui +++ b/sw/uiconfig/swriter/ui/dropdownfielddialog.ui @@ -1,6 +1,25 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.20.4 --> <interface domain="sw"> - <!-- interface-requires gtk+ 3.0 --> + <requires lib="gtk+" version="3.0"/> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-go-back</property> + </object> + <object class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-go-forward</property> + </object> + <object class="GtkListStore" id="liststore1"> + <columns> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + </columns> + </object> <object class="GtkDialog" id="DropdownFieldDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> @@ -17,16 +36,34 @@ <property name="can_focus">False</property> <property name="layout_style">end</property> <child> - <object class="GtkButton" id="ok"> - <property name="label">gtk-ok</property> + <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="sensitive">False</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="margin_top">3</property> - <property name="use_stock">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">6</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkButton" id="prev"> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="image">image1</property> + <property name="image_position">right</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="next"> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="image">image2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -35,8 +72,8 @@ </packing> </child> <child> - <object class="GtkButton" id="cancel"> - <property name="label">gtk-cancel</property> + <object class="GtkButton" id="edit"> + <property name="label">gtk-edit</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -49,11 +86,14 @@ </packing> </child> <child> - <object class="GtkButton" id="prev"> - <property name="label">gtk-media-previous</property> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="sensitive">False</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="no_show_all">True</property> <property name="use_stock">True</property> </object> <packing> @@ -63,8 +103,8 @@ </packing> </child> <child> - <object class="GtkButton" id="help"> - <property name="label">gtk-help</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="receives_default">True</property> @@ -74,12 +114,11 @@ <property name="expand">False</property> <property name="fill">True</property> <property name="position">3</property> - <property name="secondary">True</property> </packing> </child> <child> - <object class="GtkButton" id="edit"> - <property name="label">gtk-edit</property> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -92,20 +131,6 @@ <property name="secondary">True</property> </packing> </child> - <child> - <object class="GtkButton" id="next"> - <property name="label">gtk-media-next</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="no_show_all">True</property> - <property name="use_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> </object> <packing> <property name="expand">False</property> @@ -138,7 +163,7 @@ <property name="vexpand">True</property> <property name="row_spacing">6</property> <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> @@ -150,17 +175,30 @@ <property name="can_focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <property name="model">liststore1</property> + <property name="headers_visible">False</property> + <property name="headers_clickable">False</property> + <property name="search_column">0</property> + <property name="show_expanders">False</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="treeview-selection1"/> </child> + <child> + <object class="GtkTreeViewColumn" id="treeviewcolumn1"> + <child> + <object class="GtkCellRendererText" id="cellrenderertext1"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + </child> </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> @@ -187,12 +225,13 @@ </object> </child> <action-widgets> + <action-widget response="0">edit</action-widget> <action-widget response="-5">ok</action-widget> <action-widget response="-6">cancel</action-widget> - <action-widget response="0">prev</action-widget> <action-widget response="-11">help</action-widget> - <action-widget response="0">edit</action-widget> - <action-widget response="0">next</action-widget> </action-widgets> + <child> + <placeholder/> + </child> </object> </interface> |