Arghh... I always write a nice long email just so I can forget to attach the
files....
Here they are.
-shack
On Thu, Oct 14, 1999 at 01:57:30AM -0500, Stephen Hack wrote:
> Well, I have a rough working copy of the Options dialog.
>
> Attachments
> options.diff a cvs diff -c >options.diff from the abi/src directory
> options.tar all the new files to be added from the abi/src
>directory
>
> What this patch currently can do:
> * Pull up the options dialog
> * Allow you to change the Auto Check as you Type options
> - all the other check boxes do not do anything yet
> * Save the auto spell check in the PrefSchemes. If there is a current
> scheme besides _builtin_, then it will add it, otherwise, it'll create
> a new one (user_prefs)
>
> What it does NOT do, yet:
> * Actually change the auto check functionallity, but it will save it to
> the preferences file for the next time that Abiword is loaded
> * I don't have access to a Win32/BeOS machine so I can't test (compile)
> the win32 code. I don't know if it will work, but it *should*
>
> Notes:
> Currently, I force a save of the preferences. (if not autosave, then save
> now) Should not be in there in the long run, but should add the
> options|Preferences tab soon (probably next)
>
> Todo:
> * Add a call back feature to the preferences so the appropriate sections
> of code can be notified when a preference has changed
> * Add a new tab page -
> Spelling
> SpellCheckDirectory
> SpellCheckWordList
> undo Ignore/Un-Ignore
> re-Check now
> View
> Ruler
> Units
> Toolbars ?
> Preferences
> Auto Save
> Save Now
> Toolbar (or should this be like the toolbars|customize... dlg?
> Apperance
> LabelSet ?
> Layouts ?
>
>
> -shack
>
> --
> Less research... More sleep...
? Linux_2.2.12-7_i386_OBJ
? Linux_2.2.12-7_i386_DBG
? mktags
? options.diff
? wp/ap/beos/ap_BeOSDialog_Options.h
? wp/ap/beos/ap_BeOSDialog_Options.cpp
? wp/ap/unix/ap_UnixDialog_Options.h
? wp/ap/unix/ap_UnixDialog_Options.cpp
? wp/ap/win/ap_Win32Dialog_Options.h
? wp/ap/win/ap_Win32Dialog_Options.cpp
? wp/ap/xp/ap_Dialog_Options.h
? wp/ap/xp/ap_Dialog_Options.cpp
Index: wp/ap/Makefile
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/Makefile,v
retrieving revision 1.51
diff -c -r1.51 Makefile
*** Makefile 1999/10/04 19:07:37 1.51
--- Makefile 1999/10/14 06:16:42
***************
*** 30,35 ****
--- 30,36 ----
$(OBJDIR)/ap_$(ABI_FE)Clipboard.$(OBJ_SUFFIX) \
$(OBJDIR)/ap_$(ABI_FE)DialogFactory.$(OBJ_SUFFIX) \
$(OBJDIR)/ap_$(ABI_FE)Dialog_Break.$(OBJ_SUFFIX) \
+ $(OBJDIR)/ap_$(ABI_FE)Dialog_Options.$(OBJ_SUFFIX) \
$(OBJDIR)/ap_$(ABI_FE)Dialog_Paragraph.$(OBJ_SUFFIX) \
$(OBJDIR)/ap_$(ABI_FE)Dialog_Replace.$(OBJ_SUFFIX) \
$(OBJDIR)/ap_$(ABI_FE)Dialog_Spell.$(OBJ_SUFFIX) \
***************
*** 52,57 ****
--- 53,59 ----
OBJS= $(PLATFORM_OBJS) \
$(OBJDIR)/ap_Dialog_Break.$(OBJ_SUFFIX) \
+ $(OBJDIR)/ap_Dialog_Options.$(OBJ_SUFFIX) \
$(OBJDIR)/ap_Dialog_Paragraph.$(OBJ_SUFFIX) \
$(OBJDIR)/ap_Dialog_Replace.$(OBJ_SUFFIX) \
$(OBJDIR)/ap_Dialog_Spell.$(OBJ_SUFFIX) \
Index: wp/ap/unix/Makefile
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/unix/Makefile,v
retrieving revision 1.28
diff -c -r1.28 Makefile
*** Makefile 1999/10/04 19:07:39 1.28
--- Makefile 1999/10/14 06:16:42
***************
*** 28,33 ****
--- 28,34 ----
ap_$(ABI_FE)Clipboard.cpp \
ap_$(ABI_FE)DialogFactory.cpp \
ap_$(ABI_FE)Dialog_Break.cpp \
+ ap_$(ABI_FE)Dialog_Options.cpp \
ap_$(ABI_FE)Dialog_Paragraph.cpp \
ap_$(ABI_FE)Dialog_Replace.cpp \
ap_$(ABI_FE)Dialog_Spell.cpp \
Index: wp/ap/unix/ap_UnixDialog_All.h
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/unix/ap_UnixDialog_All.h,v
retrieving revision 1.19
diff -c -r1.19 ap_UnixDialog_All.h
*** ap_UnixDialog_All.h 1999/10/04 19:07:39 1.19
--- ap_UnixDialog_All.h 1999/10/14 06:16:42
***************
*** 45,50 ****
--- 45,51 ----
# include "ap_UnixDialog_Replace.h"
# include "ap_UnixDialog_Break.h"
# include "ap_UnixDialog_Paragraph.h"
+ # include "ap_UnixDialog_Options.h"
# include "ap_UnixDialog_Spell.h"
// ... add new dialogs here ...
***************
*** 66,71 ****
--- 67,73 ----
DeclareDialog(AP_DIALOG_ID_BREAK, AP_UnixDialog_Break)
DeclareDialog(AP_DIALOG_ID_SPELL, AP_UnixDialog_Spell)
DeclareDialog(AP_DIALOG_ID_PARAGRAPH, AP_UnixDialog_Paragraph)
+ DeclareDialog(AP_DIALOG_ID_OPTIONS, AP_UnixDialog_Options)
// ... also add new dialogs here ...
Index: wp/ap/win/Makefile
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/win/Makefile,v
retrieving revision 1.27
diff -c -r1.27 Makefile
*** Makefile 1999/10/04 19:07:40 1.27
--- Makefile 1999/10/14 06:16:42
***************
*** 29,34 ****
--- 29,35 ----
ap_$(ABI_FE)DialogFactory.cpp \
ap_$(ABI_FE)Dialog_Break.cpp \
ap_$(ABI_FE)Dialog_Replace.cpp \
+ ap_$(ABI_FE)Dialog_Options.cpp \
ap_$(ABI_FE)Dialog_Paragraph.cpp \
ap_$(ABI_FE)Dialog_Spell.cpp \
ap_$(ABI_FE)Frame.cpp \
Index: wp/ap/win/ap_Win32Dialog_All.h
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_All.h,v
retrieving revision 1.18
diff -c -r1.18 ap_Win32Dialog_All.h
*** ap_Win32Dialog_All.h 1999/10/05 16:17:30 1.18
--- ap_Win32Dialog_All.h 1999/10/14 06:16:42
***************
*** 40,45 ****
--- 40,46 ----
# include "ap_Win32Dialog_Replace.h"
# include "ap_Win32Dialog_Break.h"
+ # include "ap_Win32Dialog_Options.h"
# include "ap_Win32Dialog_Paragraph.h"
# include "ap_Win32Dialog_Spell.h"
***************
*** 61,66 ****
--- 62,68 ----
DeclareDialog(AP_DIALOG_ID_FIND, AP_Win32Dialog_Replace)
DeclareDialog(AP_DIALOG_ID_BREAK, AP_Win32Dialog_Break)
DeclareDialog(AP_DIALOG_ID_SPELL, AP_Win32Dialog_Spell)
+ DeclareDialog(AP_DIALOG_ID_OPTIONS, AP_Win32Dialog_Options)
DeclareDialog(AP_DIALOG_ID_PARAGRAPH, AP_Win32Dialog_Paragraph)
// ... also add new dialogs here ...
Index: wp/ap/xp/Makefile
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/xp/Makefile,v
retrieving revision 1.45
diff -c -r1.45 Makefile
*** Makefile 1999/10/04 19:07:41 1.45
--- Makefile 1999/10/14 06:16:42
***************
*** 26,31 ****
--- 26,32 ----
CPPSRCS= ap_Dialog_Break.cpp \
ap_Dialog_Goto.cpp \
+ ap_Dialog_Options.cpp \
ap_Dialog_Paragraph.cpp \
ap_Dialog_Replace.cpp \
ap_Dialog_Spell.cpp \
Index: wp/ap/xp/ap_Dialog_Id.h
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/xp/ap_Dialog_Id.h,v
retrieving revision 1.11
diff -c -r1.11 ap_Dialog_Id.h
*** ap_Dialog_Id.h 1999/10/04 19:07:41 1.11
--- ap_Dialog_Id.h 1999/10/14 06:16:42
***************
*** 36,41 ****
--- 36,42 ----
AP_DIALOG_ID_BREAK, /* insert page,
column, section, etc. breaks */
AP_DIALOG_ID_SPELL, /* spell check */
AP_DIALOG_ID_PARAGRAPH, /* paragraph settings dialog */
+ AP_DIALOG_ID_OPTIONS, /* edit|options settings
+dialog */
/* ... add others here ... */
AP_DIALOG_ID__LAST__ /* must be last */
Index: wp/ap/xp/ap_EditMethods.cpp
===================================================================
RCS file: /u2/cvsroot/abi/src/wp/ap/xp/ap_EditMethods.cpp,v
retrieving revision 1.151
diff -c -r1.151 ap_EditMethods.cpp
*** ap_EditMethods.cpp 1999/10/14 01:50:46 1.151
--- ap_EditMethods.cpp 1999/10/14 06:16:43
***************
*** 42,47 ****
--- 42,48 ----
#include "ap_Dialog_Replace.h"
#include "ap_Dialog_Goto.h"
#include "ap_Dialog_Break.h"
+ #include "ap_Dialog_Options.h"
#include "ap_Dialog_Paragraph.h"
#include "ap_Dialog_Spell.h"
***************
*** 3251,3257 ****
--- 3252,3297 ----
}
+ static UT_Bool s_doOptionsDlg(FV_View * pView)
+ {
+ XAP_Frame * pFrame = (XAP_Frame *) pView->getParentData();
+ UT_ASSERT(pFrame);
+
+ pFrame->raise();
+
+ XAP_DialogFactory * pDialogFactory
+ = (XAP_DialogFactory *)(pFrame->getDialogFactory());
+
+ AP_Dialog_Options * pDialog
+ = (AP_Dialog_Options
+*)(pDialogFactory->requestDialog(AP_DIALOG_ID_OPTIONS));
+ UT_ASSERT(pDialog);
+ // run the dialog
+ pDialog->runModal(pFrame);
+
+ // get the dialog answer
+ AP_Dialog_Options::tAnswer answer = pDialog->getAnswer();
+
+ switch (answer)
+ {
+ case AP_Dialog_Options::a_OK:
+
+ break;
+
+ case AP_Dialog_Options::a_CANCEL:
+ // do nothing
+ break;
+ default:
+ UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
+ }
+
+ pDialogFactory->releaseDialog(pDialog);
+
+ return UT_TRUE;
+ }
+
+
+
/*****************************************************************/
Defun1(dlgFont)
***************
*** 3612,3622 ****
Defun1(dlgOptions)
{
! XAP_Frame * pFrame = (XAP_Frame *) pAV_View->getParentData();
! UT_ASSERT(pFrame);
!
! s_TellNotImplemented(pFrame, "Options dialog", __LINE__);
! return UT_TRUE;
}
--- 3652,3660 ----
Defun1(dlgOptions)
{
! ABIWORD_VIEW;
!
! return s_doOptionsDlg(pView);
}
options.tar