projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
435389d
)
MessageView: don't expose the user to json syntax.
author
Wilfried Goesgens
<dothebart@citadel.org>
Mon, 4 Jun 2012 17:29:27 +0000
(19:29 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Mon, 4 Jun 2012 17:29:27 +0000
(19:29 +0200)
webcit/messages.c
patch
|
blob
|
history
diff --git
a/webcit/messages.c
b/webcit/messages.c
index f990c8700b09d1e358e502181194cccc5ec5c045..2ce2ff6c8afe15cd3c600fca3450dec7c969e3b6 100644
(file)
--- a/
webcit/messages.c
+++ b/
webcit/messages.c
@@
-37,6
+37,15
@@
typedef struct _MsgPartEvaluatorStruct {
MsgPartEvaluatorFunc f;
} MsgPartEvaluatorStruct;
MsgPartEvaluatorFunc f;
} MsgPartEvaluatorStruct;
+void fixview()
+{
+ /* workaround for json listview; its not useable directly */
+ if (WC->CurRoom.view == VIEW_JSON_LIST) {
+ StrBuf *View = NewStrBuf();
+ StrBufPrintf(View, "%d", VIEW_MAILBOX);
+ putbstr("view", View);;
+ }
+}
int load_message(message_summary *Msg,
StrBuf *FoundCharset,
StrBuf **Error)
int load_message(message_summary *Msg,
StrBuf *FoundCharset,
StrBuf **Error)
@@
-1123,6
+1132,7
@@
void post_message(void)
if (saving_to_drafts) {
AppendImportantMessage(_("Message has been saved to Drafts.\n"), -1);
gotoroom(WCC->CurRoom.name);
if (saving_to_drafts) {
AppendImportantMessage(_("Message has been saved to Drafts.\n"), -1);
gotoroom(WCC->CurRoom.name);
+ fixview();
readloop(readnew, eUseDefault);
FreeStrBuf(&Buf);
return;
readloop(readnew, eUseDefault);
FreeStrBuf(&Buf);
return;
@@
-1174,6
+1184,7
@@
void post_message(void)
* Otherwise, just go to the "read messages" loop.
*/
else {
* Otherwise, just go to the "read messages" loop.
*/
else {
+ fixview();
readloop(readnew, eUseDefault);
}
}
readloop(readnew, eUseDefault);
}
}
@@
-1345,6
+1356,7
@@
void display_enter(void)
}
else if (rc != 2) { /* Any other error means that we cannot continue */
rc = GetServerStatusMsg(Line, &Result, 0, 2);
}
else if (rc != 2) { /* Any other error means that we cannot continue */
rc = GetServerStatusMsg(Line, &Result, 0, 2);
+ fixview();
readloop(readnew, eUseDefault);
FreeStrBuf(&Line);
return;
readloop(readnew, eUseDefault);
FreeStrBuf(&Line);
return;
@@
-1616,6
+1628,7
@@
void display_enter(void)
else if (rc != 2) { /* Any other error means that we cannot continue */
AppendImportantMessage(ChrPtr(CmdBuf) + 4, StrLength(CmdBuf) - 4);
FreeStrBuf(&CmdBuf);
else if (rc != 2) { /* Any other error means that we cannot continue */
AppendImportantMessage(ChrPtr(CmdBuf) + 4, StrLength(CmdBuf) - 4);
FreeStrBuf(&CmdBuf);
+ fixview();
readloop(readnew, eUseDefault);
return;
}
readloop(readnew, eUseDefault);
return;
}
@@
-1654,6
+1667,8
@@
void delete_msg(void)
StrBuf_ServGetln(Line);
GetServerStatusMsg(Line, NULL, 1, 0);
StrBuf_ServGetln(Line);
GetServerStatusMsg(Line, NULL, 1, 0);
+ fixview();
+
readloop(readnew, eUseDefault);
}
readloop(readnew, eUseDefault);
}
@@
-1678,6
+1693,7
@@
void move_msg(void)
AppendImportantMessage(_("The message was not moved."), -1);
}
AppendImportantMessage(_("The message was not moved."), -1);
}
+ fixview();
readloop(readnew, eUseDefault);
}
readloop(readnew, eUseDefault);
}