mirror of
https://github.com/profanity-im/profanity.git
synced 2025-07-26 12:14:28 -04:00
Small formatting changes
This commit is contained in:
parent
2137ffa25a
commit
4a2ff76059
2
Makefile
2
Makefile
@ -11,7 +11,7 @@ profanity: $(OBJS)
|
|||||||
log.o: log.h
|
log.o: log.h
|
||||||
windows.o: windows.h util.h
|
windows.o: windows.h util.h
|
||||||
title_bar.o: windows.h
|
title_bar.o: windows.h
|
||||||
input_bar.o: windows.h
|
input_bar.o: windows.h util.h
|
||||||
input_win.o: windows.h
|
input_win.o: windows.h
|
||||||
jabber.o: jabber.h log.h windows.h
|
jabber.o: jabber.h log.h windows.h
|
||||||
profanity.o: log.h windows.h jabber.h command.h
|
profanity.o: log.h windows.h jabber.h command.h
|
||||||
|
14
input_bar.c
14
input_bar.c
@ -1,5 +1,6 @@
|
|||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
static WINDOW *inp_bar;
|
static WINDOW *inp_bar;
|
||||||
|
|
||||||
@ -30,7 +31,18 @@ void inp_bar_active(int win)
|
|||||||
|
|
||||||
void inp_bar_print_message(char *msg)
|
void inp_bar_print_message(char *msg)
|
||||||
{
|
{
|
||||||
mvwprintw(inp_bar, 0, 0, msg);
|
mvwprintw(inp_bar, 0, 9, msg);
|
||||||
wrefresh(inp_bar);
|
wrefresh(inp_bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void inp_bar_update_time(void)
|
||||||
|
{
|
||||||
|
char bar_time[8];
|
||||||
|
char tstmp[80];
|
||||||
|
get_time(tstmp);
|
||||||
|
sprintf(bar_time, "[%s]", tstmp);
|
||||||
|
|
||||||
|
mvwprintw(inp_bar, 0, 1, bar_time);
|
||||||
|
wrefresh(inp_bar);
|
||||||
|
inp_put_back();
|
||||||
|
}
|
||||||
|
@ -82,3 +82,7 @@ void inp_get_password(char *passwd)
|
|||||||
echo();
|
echo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void inp_put_back(void)
|
||||||
|
{
|
||||||
|
wrefresh(inp_win);
|
||||||
|
}
|
||||||
|
@ -57,6 +57,8 @@ static void profanity_event_loop(int *ch, char *cmd, int *size)
|
|||||||
{
|
{
|
||||||
usleep(1);
|
usleep(1);
|
||||||
|
|
||||||
|
inp_bar_update_time();
|
||||||
|
|
||||||
// handle incoming messages
|
// handle incoming messages
|
||||||
jabber_process_events();
|
jabber_process_events();
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ void show_incomming_msg(char *from, char *message)
|
|||||||
char tstmp[80];
|
char tstmp[80];
|
||||||
get_time(tstmp);
|
get_time(tstmp);
|
||||||
|
|
||||||
sprintf(line, " [%s] %s: %s\n", tstmp, short_from, message);
|
sprintf(line, " [%s] <%s> %s\n", tstmp, short_from, message);
|
||||||
|
|
||||||
// find the chat window for sender
|
// find the chat window for sender
|
||||||
int i;
|
int i;
|
||||||
@ -136,7 +136,7 @@ void show_outgoing_msg(char *from, char *to, char *message)
|
|||||||
char line[100];
|
char line[100];
|
||||||
char tstmp[80];
|
char tstmp[80];
|
||||||
get_time(tstmp);
|
get_time(tstmp);
|
||||||
sprintf(line, " [%s] %s: %s\n", tstmp, from, message);
|
sprintf(line, " [%s] <%s> %s\n", tstmp, from, message);
|
||||||
|
|
||||||
// find the chat window for recipient
|
// find the chat window for recipient
|
||||||
int i;
|
int i;
|
||||||
|
@ -14,16 +14,18 @@ void create_input_bar(void);
|
|||||||
void create_input_window(void);
|
void create_input_window(void);
|
||||||
|
|
||||||
// input bar actions
|
// input bar actions
|
||||||
|
void inp_bar_print_message(char *msg);
|
||||||
void inp_bar_inactive(int win);
|
void inp_bar_inactive(int win);
|
||||||
void inp_bar_active(int win);
|
void inp_bar_active(int win);
|
||||||
|
void inp_bar_update_time(void);
|
||||||
|
|
||||||
// input window actions
|
// input window actions
|
||||||
void inp_get_command_str(char *cmd);
|
void inp_get_command_str(char *cmd);
|
||||||
void inp_poll_char(int *ch, char command[], int *size);
|
void inp_poll_char(int *ch, char command[], int *size);
|
||||||
void inp_clear(void);
|
void inp_clear(void);
|
||||||
|
void inp_put_back(void);
|
||||||
void inp_non_block(void);
|
void inp_non_block(void);
|
||||||
void inp_get_password(char *passwd);
|
void inp_get_password(char *passwd);
|
||||||
void inp_bar_print_message(char *msg);
|
|
||||||
|
|
||||||
void gui_init(void);
|
void gui_init(void);
|
||||||
void gui_close(void);
|
void gui_close(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user