Here is the patch modified as suggested
Gilles Saint-Denis

> 
> Hi Gilles,
> 
> This is an excellent patch and I will be happy to commit it, but 
> could you please make a new patch:
> 
>    (1) putting the new files into xap/win instead of gr/win (and 
> rename the new class accordingly)
>    (2) replace the (c) AbiSources in the two new files with your own 
> name.
> 
> Thanks.
> 
> Tomas
> 
> > The windows page break and paragraph dialogs use some label followed
> > by a line extending near the edge of the dialog. When theses labels
> > get localized, either the space available is not enough or there is
> > some blank space between the text end and the line beginning.
> > 
> > This patch add a new kind of window control who adapt the length of
> > the line to compensate for space used by the text.

? abi/src/af/xap/win/xap_Win32LabelledSeparator.cpp
? abi/src/af/xap/win/xap_Win32LabelledSeparator.h
Index: abi/src/af/xap/Makefile
===================================================================
RCS file: /cvsroot/abi/src/af/xap/Makefile,v
retrieving revision 1.80
diff -u -r1.80 Makefile
--- abi/src/af/xap/Makefile     2001/12/04 15:56:36     1.80
+++ abi/src/af/xap/Makefile     2002/01/27 16:36:58
@@ -81,7 +81,8 @@
 ifeq ($(ABI_FE), Win32)
 PLATFORM_OBJS +=       $(OBJDIR)/xap_$(ABI_FE)Slurp.$(OBJ_SUFFIX)              \
                        $(OBJDIR)/xap_$(ABI_FE)PreviewWidget.$(OBJ_SUFFIX)             
 \
-                       $(OBJDIR)/xap_$(ABI_FE)DialogHelper.$(OBJ_SUFFIX)
+                       $(OBJDIR)/xap_$(ABI_FE)DialogHelper.$(OBJ_SUFFIX)       \
+                       $(OBJDIR)/xap_$(ABI_FE)LabelledSeparator.$(OBJ_SUFFIX)
 endif
 
 ifeq ($(ABI_OPT_GNOME),1)
Index: abi/src/af/xap/win/Makefile
===================================================================
RCS file: /cvsroot/abi/src/af/xap/win/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- abi/src/af/xap/win/Makefile 2001/10/25 14:53:25     1.37
+++ abi/src/af/xap/win/Makefile 2002/01/27 16:37:00
@@ -45,7 +45,8 @@
                        xap_Win32Slurp.cpp                      \
                        xap_Win32Toolbar_Icons.cpp              \
                        xap_Win32DialogHelper.cpp               \
-                       xap_Win32Module.cpp
+                       xap_Win32Module.cpp     \
+                       xap_Win32LabelledSeparator.cpp
 
 TARGETS=               $(OBJS)
 
Index: abi/src/wp/ap/win/ap_Win32Dialog_Break.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_Break.cpp,v
retrieving revision 1.4
diff -u -r1.4 ap_Win32Dialog_Break.cpp
--- abi/src/wp/ap/win/ap_Win32Dialog_Break.cpp  1999/05/01 08:46:03     1.4
+++ abi/src/wp/ap/win/ap_Win32Dialog_Break.cpp  2002/01/27 16:37:14
@@ -26,6 +26,7 @@
 #include "xap_App.h"
 #include "xap_Win32App.h"
 #include "xap_Win32Frame.h"
+#include "xap_Win32LabelledSeparator.h"
 
 #include "ap_Strings.h"
 #include "ap_Dialog_Id.h"
@@ -60,6 +61,8 @@
        // raise the dialog
        XAP_Win32App * pWin32App = static_cast<XAP_Win32App *>(m_pApp);
        XAP_Win32Frame * pWin32Frame = static_cast<XAP_Win32Frame *>(pFrame);
+
+       XAP_Win32LabelledSeparator_RegisterClass(pWin32App);
 
        LPCTSTR lpTemplate = NULL;
 
Index: abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp,v
retrieving revision 1.17
diff -u -r1.17 ap_Win32Dialog_Paragraph.cpp
--- abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp      2001/03/19 03:52:20     1.17
+++ abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp      2002/01/27 16:37:18
@@ -34,6 +34,7 @@
 #include "ap_Preview_Paragraph.h"
 #include "ap_Win32Dialog_Paragraph.h"
 #include "xap_Win32PreviewWidget.h"
+#include "xap_Win32LabelledSeparator.h"
 
 #include "gr_Win32Graphics.h"
 
@@ -106,6 +107,8 @@
        // raise the dialog
        XAP_Win32App * pWin32App = static_cast<XAP_Win32App *>(m_pApp);
        XAP_Win32Frame * pWin32Frame = static_cast<XAP_Win32Frame *>(pFrame);
+
+       XAP_Win32LabelledSeparator_RegisterClass(pWin32App);
 
        LPCTSTR lpTemplate = NULL;
 
Index: abi/src/wp/ap/win/ap_Win32Res_DlgBreak.rc2
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Res_DlgBreak.rc2,v
retrieving revision 1.2
diff -u -r1.2 ap_Win32Res_DlgBreak.rc2
--- abi/src/wp/ap/win/ap_Win32Res_DlgBreak.rc2  2001/10/21 20:19:39     1.2
+++ abi/src/wp/ap/win/ap_Win32Res_DlgBreak.rc2  2002/01/27 16:37:18
@@ -48,8 +48,8 @@
 CAPTION "Break"
 FONT 8, "MS Sans Serif"
 BEGIN
-    CONTROL         "",                                        
AP_RID_DIALOG_BREAK_LINE,               "Static",SS_ETCHEDHORZ,7,11,150,1
-    LTEXT           "Insert  ",                        
AP_RID_DIALOG_BREAK_TEXT_INSERT,7,7,24,8
+    CONTROL         "Insert",                  AP_RID_DIALOG_BREAK_TEXT_INSERT,
+                                                                               
+"AbiLabelledSeparator",0x0,7,7,150,8
     CONTROL         "&Page break",             AP_RID_DIALOG_BREAK_RADIO_PAGE,
                                                                                
"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,15,19,62,10
     CONTROL         "&Column break",   AP_RID_DIALOG_BREAK_RADIO_COL,
@@ -62,8 +62,8 @@
                                                                                
"Button",BS_AUTORADIOBUTTON,    86,48,67,10
     CONTROL         "&Odd page",               AP_RID_DIALOG_BREAK_RADIO_ODD,
                                                                                
"Button",BS_AUTORADIOBUTTON,    86,62,67,10
-    CONTROL         "",                                        
AP_RID_DIALOG_BREAK_LINE,               "Static",SS_ETCHEDHORZ,7,39,150,1
-    LTEXT           "Section breaks  ",        
AP_RID_DIALOG_BREAK_TEXT_SECTION,7,35,54,8
+    CONTROL         "Section breaks  ",        AP_RID_DIALOG_BREAK_TEXT_SECTION,
+                                                                               
+"AbiLabelledSeparator",0x0,7,35,150,8
     CONTROL         "",                                        
AP_RID_DIALOG_BREAK_LINE,               "Static",SS_ETCHEDHORZ,7,78,150,1
     DEFPUSHBUTTON   "OK",                              AP_RID_DIALOG_BREAK_BTN_OK,    
         53,87,50,14
     PUSHBUTTON      "Cancel",                  AP_RID_DIALOG_BREAK_BTN_CANCEL, 
107,87,50,14
Index: abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2,v
retrieving revision 1.8
diff -u -r1.8 ap_Win32Res_DlgParagraph.rc2
--- abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2      2002/01/01 23:08:56     1.8
+++ abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2      2002/01/27 16:37:19
@@ -110,8 +110,8 @@
     LTEXT           "&Outline level:", AP_RID_DIALOG_PARA_TEXT_LEVEL,  141,6,43,8,NOT 
WS_VISIBLE
     COMBOBOX                                                   
AP_RID_DIALOG_PARA_COMBO_LEVEL, 198,4,52,97,
                                                                                
CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
-    CONTROL         "",                                        
AP_RID_DIALOG_PARA_LINE,                "Static",SS_ETCHEDHORZ,2,27,256,1
-    LTEXT           "Indentation",             AP_RID_DIALOG_PARA_TEXT_INDENT, 
2,23,40,8
+    CONTROL         "Indentation",             AP_RID_DIALOG_PARA_TEXT_INDENT,
+                                                                               
+"AbiLabelledSeparator", 0x0, 2,23,256,8
     LTEXT           "&Left:",                  AP_RID_DIALOG_PARA_TEXT_LEFT,   
12,38,40,8
     EDITTEXT                                                   
AP_RID_DIALOG_PARA_EDIT_LEFT,   54,36,52,12,ES_AUTOHSCROLL
     CONTROL         "Spin1",                   AP_RID_DIALOG_PARA_SPIN_LEFT,
@@ -130,8 +130,8 @@
     CONTROL         "Spin1",                   AP_RID_DIALOG_PARA_SPIN_BY,
                                                                                
"msctls_updown32",
                                                                                
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,232,36,11,14
-    CONTROL         "",                                        
AP_RID_DIALOG_PARA_LINE,                "Static",SS_ETCHEDHORZ,2,83,256,1
-    LTEXT           "Spacing",                 
AP_RID_DIALOG_PARA_TEXT_SPACING,2,79,31,8
+    CONTROL         "Spacing",                 AP_RID_DIALOG_PARA_TEXT_SPACING,
+                                                                               
+"AbiLabelledSeparator", 0x0, 2,79,256,8
     LTEXT           "&Before:",                        
AP_RID_DIALOG_PARA_TEXT_BEFORE, 12,95,40,8
     EDITTEXT                                                   
AP_RID_DIALOG_PARA_EDIT_BEFORE, 54,93,52,12,ES_AUTOHSCROLL
     CONTROL         "Spin1",                   AP_RID_DIALOG_PARA_SPIN_BEFORE,
@@ -150,8 +150,8 @@
     CONTROL         "Spin1",                   AP_RID_DIALOG_PARA_SPIN_AT,
                                                                                
"msctls_updown32",
                                                                                
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,232,93,11,14
-    CONTROL         "",                                        
AP_RID_DIALOG_PARA_LINE,                "Static",SS_ETCHEDHORZ,2,136,256,1
-    LTEXT           "Preview",                 
AP_RID_DIALOG_PARA_TEXT_PREVIEW,2,132,30,8
+    CONTROL         "Preview",                 AP_RID_DIALOG_PARA_TEXT_PREVIEW,
+                                                                               
+"AbiLabelledSeparator", 0x0, 2,132,256,8
     CONTROL         "(preview)",               AP_RID_DIALOG_PARA_PREVIEW,
                                                                                
"Button",BS_OWNERDRAW,                  14,145,233,65
 END
@@ -160,8 +160,8 @@
 STYLE WS_CHILD 
 FONT 8, "MS Sans Serif"
 BEGIN
-    CONTROL         "",                                        
AP_RID_DIALOG_PARA_LINE,                "Static",SS_ETCHEDHORZ,2,10,256,1
-    LTEXT           "Pagination",              AP_RID_DIALOG_PARA_TEXT_PAGE,   
2,6,38,8
+    CONTROL         "Pagination",              AP_RID_DIALOG_PARA_TEXT_PAGE,
+                                                                               
+"AbiLabelledSeparator", 0x0, 2,6,256,8
     CONTROL         "&Widow/Orphan control",
                                                                                
AP_RID_DIALOG_PARA_CHECK_WIDOW,
                                                                                
"Button",BS_AUTO3STATE | WS_TABSTOP,14,18,126,10
@@ -181,8 +181,8 @@
     CONTROL         "&Don't hyphenate",                
                                                                                
AP_RID_DIALOG_PARA_CHECK_NOHYPHEN,
                                                                                
"Button",BS_AUTO3STATE | WS_TABSTOP,14,78,126,10
-    CONTROL         "",                                        
AP_RID_DIALOG_PARA_LINE,                "Static",SS_ETCHEDHORZ,2,136,256,1
-    LTEXT           "Preview",                 
AP_RID_DIALOG_PARA_TEXT_PREVIEW,2,132,40,8
+    CONTROL         "Preview",                 AP_RID_DIALOG_PARA_TEXT_PREVIEW,
+                                                                               
+"AbiLabelledSeparator", 0x0, 2,132,256,8
     CONTROL         "(preview)",               AP_RID_DIALOG_PARA_PREVIEW,
                                                                                
"Button",BS_OWNERDRAW,                  14,145,233,65
 END

Attachment: xap_Win32LabelledSeparator.cpp
Description: Binary data

Attachment: xap_Win32LabelledSeparator.h
Description: Binary data

Reply via email to