On Tue, 29 Feb 2000, Randy Kramer wrote:
> (1) I agree 100% that it should affect the current window.
Cool.
> View | Rulers was a surprise -- turning the Ruler on or off affected
> only the current window, not all open windows!
OK, so this is how MSWord does it. And also, a while ago,
Paul Rohr wrote:
> - should affect the current frame
> - should NOT affect any other open frames
> - should affect any future frames opened during this session
> - should also affect frames opened in future sessions
So let's go with that, then? Not entirely what you were
looking for Randy, but closer than it currently is and
compatible both with Paul's UI goals and MSWord's behavior.
Attached is the (small) patch.
- Kevin Vajk
<[EMAIL PROTECTED]>
diff -u -d -r -P abi.orig/src/wp/ap/xp/ap_Dialog_Options.cpp
abi/src/wp/ap/xp/ap_Dialog_Options.cpp
--- abi.orig/src/wp/ap/xp/ap_Dialog_Options.cpp Wed Dec 8 14:15:33 1999
+++ abi/src/wp/ap/xp/ap_Dialog_Options.cpp Tue Feb 29 16:19:22 2000
@@ -36,6 +36,7 @@
#include "ap_Dialog_Options.h"
#include "ap_Prefs_SchemeIds.h"
#include "ap_Strings.h"
+#include "ap_FrameData.h"
AP_Dialog_Options::AP_Dialog_Options(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id
id)
: XAP_Dialog_NonPersistent(pDlgFactory,id)
@@ -67,6 +68,9 @@
XAP_Prefs *pPrefs = m_pApp->getPrefs();
UT_ASSERT(pPrefs);
+ AP_FrameData *pFrameData = (AP_FrameData *)m_pFrame->getFrameData();
+ UT_ASSERT(pFrameData);
+
XAP_PrefsScheme *pPrefsScheme = pPrefs->getCurrentScheme();
UT_ASSERT(pPrefs->getCurrentScheme());
@@ -105,8 +109,18 @@
Save_Pref_Bool( pPrefsScheme, AP_PREF_KEY_SpellCheckNumbers,
_gatherSpellNumbers() );
Save_Pref_Bool( pPrefsScheme, AP_PREF_KEY_SpellCheckInternet,
_gatherSpellInternet() );
- Save_Pref_Bool( pPrefsScheme, AP_PREF_KEY_RulerVisible, _gatherViewShowRuler()
);
Save_Pref_Bool( pPrefsScheme, AP_PREF_KEY_CursorBlink,
_gatherViewCursorBlink() );
+ Save_Pref_Bool( pPrefsScheme, AP_PREF_KEY_RulerVisible, _gatherViewShowRuler()
+);
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ // If we changed whether the ruler is to be visible
+ // or hidden, then update the current window:
+ // (If we didn't change anything, leave it alone)
+ if ( _gatherViewShowRuler() != pFrameData->m_bShowRuler )
+ {
+ pFrameData->m_bShowRuler = _gatherViewShowRuler() ;
+ m_pFrame->toggleRuler( _gatherViewShowRuler() );
+ }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// save ruler units value