proposed bugfix for #2374


Subject: proposed bugfix for #2374
From: Robert Altenburg (rca@xlation.com)
Date: Tue Jan 22 2002 - 21:27:21 CST


The attached diff is a fix for bug 2374 "Abi pops
up font warning dialog on commandline conversion"

ap_UnixApp.cpp at ~ line 1261 discovers bShowApp=false
but doesn't tell anyone else. This results in
xap_UnixFontManager.cpp popping up the font warning
even if it's in commanline mode.

What I did was have xap_App.cpp & it's children
remember the status of the bShowApp and have
xap_UnixFontManager.cpp check it to see if it should
pop the warning.

While this works, I think a more general solution
would be to re-write the initialize function so that
when it finds it is running "headless" it skips all the
parts of the initialization that it won't need. (I
could see running it as a filter on my mail server so
I never have to see *.doc files as attachments. :)

Disclaimer:
Although I've made an attempt to R what FMs I could find
I'm new to Abiword, so if I have missed a far more obvious
solution or violated any or all existing coding conventions
or social protocols with this suggestion, I would appreciate
pointers in the right direction

-
Rob Altenburg
> The CRT is the retina of the mind's eye.

Index: abi/src/af/xap/unix/xap_UnixFontManager.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixFontManager.cpp,v
retrieving revision 1.60
diff -r1.60 xap_UnixFontManager.cpp
296c297
< if(bShowWarning)

---
> 				if(bShowWarning && pApp->getDisplayStatus())			
Index: abi/src/af/xap/xp/xap_App.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/xap/xp/xap_App.cpp,v
retrieving revision 1.76
diff -r1.76 xap_App.cpp
49a50
> bool XAP_App::bIsShowDisplay = true;
755a757,766
> }
> 
> 
> bool XAP_App::setDisplayStatus(bool b) {
> bIsShowDisplay = b;
> return true;
> }
> 
> bool XAP_App::getDisplayStatus(void) {
> return bIsShowDisplay;
Index: abi/src/af/xap/xp/xap_App.h
===================================================================
RCS file: /cvsroot/abi/src/af/xap/xp/xap_App.h,v
retrieving revision 1.79
diff -r1.79 xap_App.h
153a154,156
>     
> 	virtual bool getDisplayStatus(void);
> 	virtual bool setDisplayStatus(bool b);
174a178,180
> 
> 
> 	static bool bIsShowDisplay;
Index: abi/src/wp/ap/unix/ap_UnixApp.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/unix/ap_UnixApp.cpp,v
retrieving revision 1.134
diff -r1.134 ap_UnixApp.cpp
1274a1275,1276
> 
>     if (!bShowApp) pMyUnixApp->setDisplayStatus(false);
Index: abi/src/wp/ap/unix/gnome/ap_UnixGnomeApp.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/unix/gnome/ap_UnixGnomeApp.cpp,v
retrieving revision 1.37
diff -r1.37 ap_UnixGnomeApp.cpp
177a178,179
>    if (!bShowApp) pMyUnixApp->setDisplayStatus(false);
> 



This archive was generated by hypermail 2b25 : Tue Jan 22 2002 - 21:21:48 CST