[Libreoffice-commits] core.git: 4 commits - helpcontent2 sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk
Caolán McNamara
caolanm at redhat.com
Mon Apr 29 03:41:11 PDT 2013
helpcontent2 | 2
sw/UIConfig_swriter.mk | 1
sw/inc/helpid.h | 1
sw/inc/index.hrc | 5
sw/source/ui/index/idxmrk.src | 52 ---------
sw/source/ui/index/swuiidxmrk.cxx | 40 +++----
sw/uiconfig/swriter/ui/newuserindexdialog.ui | 153 +++++++++++++++++++++++++++
7 files changed, 172 insertions(+), 82 deletions(-)
New commits:
commit 2b21f71065b44949cce2a9acbc5f379f0ab86ab6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 29 11:36:53 2013 +0100
convert new user index dialog to .ui format
Change-Id: I7943c7e388b1cb73311d666ff600a31ac70c2838
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 4adc14c..53195ee 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -348,7 +348,6 @@
#define HID_TOX_ENTRY_BUTTON "SW_HID_TOX_ENTRY_BUTTON"
#define HID_TOX_ENTRY_EDIT "SW_HID_TOX_ENTRY_EDIT"
-#define HID_DLG_NEW_USER_IDX "SW_HID_DLG_NEW_USER_IDX"
#define HID_TOKEN_WINDOW "SW_HID_TOKEN_WINDOW"
#define HID_AUTH_FIELD_IDENTIFIER "SW_HID_AUTH_FIELD_IDENTIFIER"
diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc
index c16cc54..6f3ec1e 100644
--- a/sw/inc/index.hrc
+++ b/sw/inc/index.hrc
@@ -26,7 +26,6 @@
#include "rcid.hrc"
-#define DLG_INSIDXMARK (RC_INDEX_BEGIN + 3)
#define DLG_MULTMRK (RC_INDEX_BEGIN + 5)
#define STR_TITLE (RC_INDEX_BEGIN + 6)
@@ -39,14 +38,10 @@
#define STR_IDXMRK_INSERT (RC_INDEX_BEGIN + 13)
#define STR_IDXMRK_EDIT (RC_INDEX_BEGIN + 14)
-#define DLG_NEW_USER_IDX (RC_INDEX_BEGIN + 17)
-
#define STR_FILE_NOT_FOUND (RC_INDEX_BEGIN + 18)
#define DLG_CHANGE_AUTH_ENTRY (RC_INDEX_BEGIN + 19)
#define DLG_CREATE_AUTOMARK (RC_INDEX_BEGIN + 20)
-#define DLG_EDIT_IDXMARK_CJK (RC_INDEX_BEGIN + 21)
-#define DLG_INSIDXMARK_CJK (RC_INDEX_BEGIN + 22)
#endif // _INDEX_HRC
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src
index 3f78a53..5835d83 100644
--- a/sw/source/ui/index/idxmrk.src
+++ b/sw/source/ui/index/idxmrk.src
@@ -23,58 +23,6 @@
#include "helpid.h"
#include "cmdid.h"
-ModalDialog DLG_NEW_USER_IDX
-{
- OutputSize = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE;
- Sizeable = FALSE ;
- HelpID = HID_DLG_NEW_USER_IDX;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 194 , 60 ) ;
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 141 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 141 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 141 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- FixedLine FL_NAME
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 130 , 8 ) ;
-
- Text [ en-US ] = "New user index";
- };
- FixedText FT_NAME
- {
- Pos = MAP_APPFONT ( 12 , 17 ) ;
- Size = MAP_APPFONT ( 40 , 8 ) ;
-
- Text [ en-US ] = "~Name";
- };
- Edit ED_NAME
- {
- HelpID = "sw:Edit:DLG_NEW_USER_IDX:ED_NAME";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 55 , 15 ) ;
- Size = MAP_APPFONT ( 78 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- };
- Text [ en-US ] = "Create New User-defined Index";
-};
-
String STR_IDXMRK_EDIT
{
Text [ en-US ] = "Edit Index Entry" ;
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 13f3fe3..e9cf706 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -573,36 +573,28 @@ void SwIndexMarkPane::UpdateKeyBoxes()
class SwNewUserIdxDlg : public ModalDialog
{
- OKButton aOKPB;
- CancelButton aCancelPB;
- HelpButton aHelpPB;
- FixedLine aNameFL;
- FixedText aNameFT;
- Edit aNameED;
+ OKButton* m_pOKPB;
+ Edit* m_pNameED;
- SwIndexMarkPane* pDlg;
+ SwIndexMarkPane* m_pDlg;
DECL_LINK( ModifyHdl, Edit*);
public:
- SwNewUserIdxDlg(SwIndexMarkPane* pPane) :
- ModalDialog(&(pPane->GetDialog()), SW_RES(DLG_NEW_USER_IDX)),
- aOKPB(this, SW_RES( PB_OK )),
- aCancelPB(this, SW_RES( PB_CANCEL )),
- aHelpPB(this, SW_RES( PB_HELP )),
- aNameFL(this, SW_RES( FL_NAME )),
- aNameFT(this, SW_RES( FT_NAME )),
- aNameED(this, SW_RES( ED_NAME )),
- pDlg(pPane)
+ SwNewUserIdxDlg(SwIndexMarkPane* pPane)
+ : ModalDialog(&(pPane->GetDialog()), "NewUserIndexDialog",
+ "modules/swriter/ui/newuserindexdialog.ui")
+ , m_pDlg(pPane)
{
- FreeResource();
- aNameED.SetModifyHdl(LINK(this, SwNewUserIdxDlg, ModifyHdl));
- aOKPB.Enable(sal_False);
- aNameED.GrabFocus();
+ get(m_pOKPB, "ok");
+ get(m_pNameED, "entry");
+ m_pNameED->SetModifyHdl(LINK(this, SwNewUserIdxDlg, ModifyHdl));
+ m_pOKPB->Enable(sal_False);
+ m_pNameED->GrabFocus();
}
virtual void Apply();
- String GetName(){return aNameED.GetText();}
+ String GetName(){return m_pNameED->GetText();}
};
void SwNewUserIdxDlg::Apply()
{
@@ -610,7 +602,7 @@ void SwNewUserIdxDlg::Apply()
IMPL_LINK( SwNewUserIdxDlg, ModifyHdl, Edit*, pEdit)
{
- aOKPB.Enable(!pEdit->GetText().isEmpty() && !pDlg->IsTOXType(pEdit->GetText()));
+ m_pOKPB->Enable(!pEdit->GetText().isEmpty() && !m_pDlg->IsTOXType(pEdit->GetText()));
return 0;
}
commit 6a035215ea8463bc3ac6ebed9091e2354dc7b2a5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 29 11:09:02 2013 +0100
convert new user index dialog to .ui format
Change-Id: I459f847a67282bd1e3dc914e25a39815a6e177a0
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index b4bd3de..eb100cf 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/inserttable \
sw/uiconfig/swriter/ui/linenumbering \
sw/uiconfig/swriter/ui/mergetabledialog \
+ sw/uiconfig/swriter/ui/newuserindexdialog \
sw/uiconfig/swriter/ui/numparapage \
sw/uiconfig/swriter/ui/numberingnamedialog \
sw/uiconfig/swriter/ui/opttestpage \
diff --git a/sw/uiconfig/swriter/ui/newuserindexdialog.ui b/sw/uiconfig/swriter/ui/newuserindexdialog.ui
new file mode 100644
index 0000000..754ee70
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/newuserindexdialog.ui
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkDialog" id="NewUserIndexDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Create New User-defined Index</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 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>
+ <child>
+ <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>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</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="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Name</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="swlo-NoSpaceEdit" 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>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">New user index</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">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
commit e6efaf7953285003b7bf885dcf9624d5900af330
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 29 11:08:30 2013 +0100
set mnemonic widgets for new bibliography author widgets
Change-Id: Id6c566ada50bd4d6f4043bbff25114e7872b7cc8
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 0844d5a..13f3fe3 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1517,7 +1517,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent,
pTypeListBox->Show();
pTypeListBox->SetSelectHdl(LINK(this, SwCreateAuthEntryDlg_Impl, EnableHdl));
pTypeListBox->SetHelpId(aCurInfo.pHelpId);
-
+ pFixedTexts[nIndex]->set_mnemonic_widget(pTypeListBox);
}
else if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField && !m_bNewEntryMode)
{
@@ -1542,6 +1542,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent,
pIdentifierBox->set_hexpand(true);
pIdentifierBox->Show();
pIdentifierBox->SetHelpId(aCurInfo.pHelpId);
+ pFixedTexts[nIndex]->set_mnemonic_widget(pIdentifierBox);
}
else
{
@@ -1563,6 +1564,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent,
pEdits[nIndex]->Enable(sal_False);
}
}
+ pFixedTexts[nIndex]->set_mnemonic_widget(pEdits[nIndex]);
}
if(bLeft)
++nLeftRow;
commit 9be05608f65c835b9e307bc503c49cf8cfb44570
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 29 11:40:41 2013 +0100
Updated core
Project: help 0021ca3f232ca48538685fc75e70616d5e12c407
diff --git a/helpcontent2 b/helpcontent2
index 53c7b09..0021ca3 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 53c7b09224a3206cc72f65a4001b32e912ca5a45
+Subproject commit 0021ca3f232ca48538685fc75e70616d5e12c407
More information about the Libreoffice-commits
mailing list