And this is why I prefer header munging on mailing lists. :)
Here is my not quite perfect patch. This adds LoadDefaultStyles as a
boolean value to the AbiWord.Profile.
If false, only the normal style shows up. I know pasting isn't the
preferred diff method, but I can't seem to recall the preferred way and
no one's awake on IRC. :) So it's pasted and attached.
Index: abi/src/text/ptbl/xp/pt_PieceTable.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/ptbl/xp/pt_PieceTable.cpp,v
retrieving revision 1.128
diff -u -3 -p -r1.128 pt_PieceTable.cpp
--- abi/src/text/ptbl/xp/pt_PieceTable.cpp 8 Aug 2005 07:42:07 -0000
1.128
+++ abi/src/text/ptbl/xp/pt_PieceTable.cpp 11 Aug 2005 14:54:10 -0000
@@ -39,7 +39,14 @@
#include "px_CR_SpanChange.h"
#include "px_CR_Strux.h"
#include "pd_Style.h"
-
+#include "ap_Prefs_SchemeIds.h"
+#include "xap_Prefs_SchemeIds.h"
+#include "ap_Prefs.h"
+#include "xap_App.h"
+#include "ut_types.h"
+#include "ut_debugmsg.h"
+#include "ut_string.h"
+#include "ap_Args.h"
// TODO: calculate this from pf_FRAG_STRUX_*_LENGTH instead?
#define pt_BOD_POSITION 2
@@ -76,7 +83,12 @@ void pt_PieceTable::setPieceTableState(P
{
// transition from create to loading.
// populate the builtin styles
- _loadBuiltinStyles();
+
+ bool b = false;
+
+ XAP_App::getApp()->getPrefs()->getPrefsValueBool
(AP_PREF_KEY_LoadDefaultStyles,&b);
+
+ if( b ) _loadBuiltinStyles();
}
if ((m_pts==PTS_Loading) && (pts==PTS_Editing))
Index: abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h,v
retrieving revision 1.48
diff -u -3 -p -r1.48 ap_Prefs_SchemeIds.h
--- abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h 21 Jun 2005 17:33:00 -0000
1.48
+++ abi/src/wp/ap/xp/ap_Prefs_SchemeIds.h 11 Aug 2005 14:54:11 -0000
@@ -40,6 +40,9 @@
// abi/src/xap/xp/xap_Prefs_SchemeIds.h.
//////////////////////////////////////////////////////////////////////////////
+#define AP_PREF_KEY_LoadDefaultStyles "LoadDefaultStyles"
+#define AP_PREF_DEFAULT_LoadDefaultStyles "1"
+
#define AP_PREF_KEY_CursorBlink "CursorBlink" /* enable cursor
blink {0,1} */
#define AP_PREF_DEFAULT_CursorBlink "1"
@@ -166,6 +169,7 @@
#else /* AP_PREFS_SCHEMEIDS_H */
#ifdef dcl
+dcl(LoadDefaultStyles)
dcl(CloseOnLastDoc)
dcl(DefaultSaveFormat)
dcl(CursorBlink)
-- David Bolack <dbolack@electricmulch.com>
This archive was generated by hypermail 2.1.8 : Thu Aug 11 2005 - 17:12:50 CEST