Move declaration and definition of win_get_last_sent_message to the correct place
This commit is contained in:
@@ -398,6 +398,7 @@ void win_command_exec_error(ProfWin* window, const char* const command, const ch
|
||||
void win_handle_command_list(ProfWin* window, GSList* cmds);
|
||||
void win_handle_command_exec_status(ProfWin* window, const char* const type, const char* const value);
|
||||
void win_handle_command_exec_result_note(ProfWin* window, const char* const type, const char* const value);
|
||||
char* win_get_last_sent_message(ProfWin* window);
|
||||
|
||||
// desktop notifications
|
||||
void notifier_initialise(void);
|
||||
|
||||
@@ -398,6 +398,35 @@ win_get_tab_identifier(ProfWin* window)
|
||||
}
|
||||
}
|
||||
|
||||
char*
|
||||
win_get_last_sent_message(ProfWin* window)
|
||||
{
|
||||
char* last_message = NULL;
|
||||
switch (window->type) {
|
||||
case WIN_CHAT:
|
||||
{
|
||||
ProfChatWin* chatwin = (ProfChatWin*)window;
|
||||
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
||||
last_message = chatwin->last_message;
|
||||
break;
|
||||
}
|
||||
case WIN_MUC:
|
||||
{
|
||||
ProfMucWin* mucwin = (ProfMucWin*)window;
|
||||
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
|
||||
last_message = mucwin->last_message;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (last_message == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return last_message;
|
||||
}
|
||||
|
||||
char*
|
||||
win_to_string(ProfWin* window)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user