|
[Simplemail-cvs] CVS: amiga-mui configwnd.c,1.15,1.16 readwnd.c,1.26,1.27
From: Sebastian Bauer <sba@us...> - 2001-06-24 10:33
|
Update of /cvsroot/simplemail/amiga-mui
In directory usw-pr-cvs1:/tmp/cvs-serv20902/amiga-mui
Modified Files:
configwnd.c readwnd.c
Log Message:
Font selection added
Index: configwnd.c
===================================================================
RCS file: /cvsroot/simplemail/amiga-mui/configwnd.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** configwnd.c 2001/06/20 09:57:31 1.15
--- configwnd.c 2001/06/24 10:33:38 1.16
***************
*** 26,29 ****
--- 26,30 ----
#include <stdio.h>
+ #include <libraries/asl.h>
#include <libraries/iffparse.h> /* MAKE_ID */
#include <libraries/mui.h>
***************
*** 61,64 ****
--- 62,67 ----
static Object *receive_sizes_sizes;
static Object *read_wrap_checkbox;
+ static Object *read_fixedfont_string;
+ static Object *read_propfont_string;
static Object *account_name_string;
***************
*** 99,102 ****
--- 102,106 ----
static Object *user_group;
static Object *tcpip_receive_group;
+ static Object *write_group;
static Object *accounts_group;
static Object *account_group;
***************
*** 173,176 ****
--- 177,183 ----
struct signature *signature;
+ if (user.config.read_propfont) free(user.config.read_propfont);
+ if (user.config.read_fixedfont) free(user.config.read_fixedfont);
+
user.config.dst = xget(user_dst_check,MUIA_Selected);
user.config.read_wordwrap = xget(read_wrap_checkbox, MUIA_Selected);
***************
*** 178,181 ****
--- 185,190 ----
user.config.receive_size = value2size(xget(receive_sizes_sizes, MUIA_Numeric_Value));
user.config.signatures_use = xget(signatures_use_checkbox, MUIA_Selected);
+ user.config.read_propfont = mystrdup((char*)xget(read_propfont_string,MUIA_String_Contents));
+ user.config.read_fixedfont = mystrdup((char*)xget(read_fixedfont_string,MUIA_String_Contents));
get_account();
***************
*** 349,352 ****
--- 358,381 ----
/******************************************************************
+ Initialize the write group
+ *******************************************************************/
+ static int init_write_group(void)
+ {
+ write_group = ColGroup(2),
+ MUIA_ShowMe, FALSE,
+ Child, MakeLabel("Welcome phrase"),
+ Child, BetterStringObject,StringFrame,End,
+
+ Child, MakeLabel("Welcome phrase with address"),
+ Child, BetterStringObject,StringFrame,End,
+
+ Child, MakeLabel("Closing phrase"),
+ Child, BetterStringObject,StringFrame,End,
+ End;
+ if (!write_group) return 0;
+ return 1;
+ }
+
+ /******************************************************************
Add a new account
*******************************************************************/
***************
*** 573,576 ****
--- 602,620 ----
mails_read_group = ColGroup(2),
MUIA_ShowMe, FALSE,
+ Child, MakeLabel("Proportional Font"),
+ Child, PopaslObject,
+ MUIA_Popasl_Type, ASL_FontRequest,
+ MUIA_Popstring_String, read_propfont_string = BetterStringObject, StringFrame, MUIA_String_Contents, user.config.read_propfont,End,
+ MUIA_Popstring_Button, PopButton(MUII_PopUp),
+ End,
+
+ Child, MakeLabel("Fixed Font"),
+ Child, PopaslObject,
+ MUIA_Popasl_Type, ASL_FontRequest,
+ MUIA_Popstring_String, read_fixedfont_string = BetterStringObject, StringFrame, MUIA_String_Contents, user.config.read_fixedfont, End,
+ MUIA_Popstring_Button, PopButton(MUII_PopUp),
+ ASLFO_FixedWidthOnly, TRUE,
+ End,
+
Child, MakeLabel("Wordwrap plain text"),
Child, HGroup,
***************
*** 657,661 ****
static int init_signature_group(void)
{
! Object *edit_button;
Object *slider = ScrollbarObject, End;
Object *tagline_button;
--- 701,705 ----
static int init_signature_group(void)
{
! /* Object *edit_button;*/
Object *slider = ScrollbarObject, End;
Object *tagline_button;
***************
*** 669,673 ****
Child, MakeLabel("Name"),
Child, signature_name_string = BetterStringObject, StringFrame, End,
! Child, edit_button = MakeButton("Edit in external editor"),
End,
Child, HGroup,
--- 713,717 ----
Child, MakeLabel("Name"),
Child, signature_name_string = BetterStringObject, StringFrame, End,
! /* Child, edit_button = MakeButton("Edit in external editor"),*/
End,
Child, HGroup,
***************
*** 693,697 ****
if (!signature_group) return 0;
! set(edit_button, MUIA_Weight,0);
DoMethod(tagline_button,MUIM_Notify,MUIA_Pressed,FALSE,signature_texteditor,3,MUIM_TextEditor_InsertText,"%t",MUIV_TextEditor_InsertText_Cursor);
--- 737,741 ----
if (!signature_group) return 0;
! /* set(edit_button, MUIA_Weight,0);*/
DoMethod(tagline_button,MUIM_Notify,MUIA_Pressed,FALSE,signature_texteditor,3,MUIM_TextEditor_InsertText,"%t",MUIV_TextEditor_InsertText_Cursor);
***************
*** 713,717 ****
init_accounts_group();
init_account_group();
-
init_user_group();
init_tcpip_receive_group();
--- 757,760 ----
***************
*** 719,722 ****
--- 762,766 ----
init_signatures_group();
init_signature_group();
+ init_write_group();
config_wnd = WindowObject,
***************
*** 740,743 ****
--- 784,788 ----
Child, signatures_group,
Child, signature_group,
+ Child, write_group,
Child, RectangleObject,
MUIA_Weight, 1,
***************
*** 794,798 ****
{
DoMethod(config_tree, MUIM_NListtree_Insert, "Read", mails_read_group, treenode, MUIV_NListtree_Insert_PrevNode_Tail, 0);
! DoMethod(config_tree, MUIM_NListtree_Insert, "Write", NULL, treenode, MUIV_NListtree_Insert_PrevNode_Tail, 0);
DoMethod(config_tree, MUIM_NListtree_Insert, "Reply", NULL, treenode, MUIV_NListtree_Insert_PrevNode_Tail, 0);
DoMethod(config_tree, MUIM_NListtree_Insert, "Forward", NULL, treenode, MUIV_NListtree_Insert_PrevNode_Tail, 0);
--- 839,843 ----
{
DoMethod(config_tree, MUIM_NListtree_Insert, "Read", mails_read_group, treenode, MUIV_NListtree_Insert_PrevNode_Tail, 0);
! DoMethod(config_tree, MUIM_NListtree_Insert, "Write", write_group, treenode, MUIV_NListtree_Insert_PrevNode_Tail, 0);
DoMethod(config_tree, MUIM_NListtree_Insert, "Reply", NULL, treenode, MUIV_NListtree_Insert_PrevNode_Tail, 0);
DoMethod(config_tree, MUIM_NListtree_Insert, "Forward", NULL, treenode, MUIV_NListtree_Insert_PrevNode_Tail, 0);
Index: readwnd.c
===================================================================
RCS file: /cvsroot/simplemail/amiga-mui/readwnd.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** readwnd.c 2001/06/02 18:14:59 1.26
--- readwnd.c 2001/06/24 10:33:38 1.27
***************
*** 131,134 ****
--- 131,135 ----
{
char *html_mail;
+ char *font_buf;
SetAttrs(data->html_simplehtml,
***************
*** 137,142 ****
TAG_DONE);
html_mail = text2html(buf, buf_end - buf,
! TEXT2HTML_ENDBODY_TAG|TEXT2HTML_FIXED_FONT|(user.config.read_wordwrap?0:TEXT2HTML_NOWRAP));
DoMethod(data->html_simplehtml, MUIM_SimpleHTML_AppendBuffer, html_mail, strlen(html_mail));
--- 138,172 ----
TAG_DONE);
+ if (font_buf = mystrdup(user.config.read_fixedfont))
+ {
+ char *end = strchr(font_buf,'/');
+ if (end)
+ {
+ int size = atoi(end+1);
+ *end = 0;
+
+ DoMethod(data->html_simplehtml,MUIM_SimpleHTML_FontSubst,"fixedmail",3,font_buf,size);
+ }
+ free(font_buf);
+ }
+
+ if (font_buf = mystrdup(user.config.read_propfont))
+ {
+ char *end = strchr(font_buf,'/');
+ if (end)
+ {
+ int size = atoi(end+1);
+ *end = 0;
+
+ DoMethod(data->html_simplehtml,MUIM_SimpleHTML_FontSubst,"normal",2,font_buf,size);
+ DoMethod(data->html_simplehtml,MUIM_SimpleHTML_FontSubst,"normal",3,font_buf,size);
+ DoMethod(data->html_simplehtml,MUIM_SimpleHTML_FontSubst,"normal",4,font_buf,size);
+ }
+ free(font_buf);
+ }
+
+
html_mail = text2html(buf, buf_end - buf,
! TEXT2HTML_ENDBODY_TAG|TEXT2HTML_FIXED_FONT|(user.config.read_wordwrap?0:TEXT2HTML_NOWRAP),"<FONT FACE=\"fixedmail\" SIZE=\"+1\">");
DoMethod(data->html_simplehtml, MUIM_SimpleHTML_AppendBuffer, html_mail, strlen(html_mail));
|
| Thread | Author | Date |
|---|---|---|
| [Simplemail-cvs] CVS: amiga-mui configwnd.c,1.15,1.16 readwnd.c,1.26,1.27 | Sebastian Bauer <sba@us...> |