From 3692b834c97c9933088d7082464fec5ae903920f Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Thu, 16 Nov 2006 19:01:27 +0100 Subject: [PATCH] move more things in the lib-ui. Signed-off-by: Pierre Habouzit --- Makefile.am | 6 +++--- browser.c | 2 +- buffy.c | 20 +++++++++----------- flags.c | 2 +- lib-ui/Makefile.am | 8 ++++---- lib-ui/curs_main.c | 3 ++- hdrline.c => lib-ui/hdrline.c | 0 lib-ui/menu.c | 11 +++++------ sidebar.c => lib-ui/sidebar.c | 2 +- sidebar.h => lib-ui/sidebar.h | 2 ++ mx.c | 3 ++- nntp/nntp.c | 13 ++++++------- pager.c | 3 +-- 13 files changed, 37 insertions(+), 38 deletions(-) rename hdrline.c => lib-ui/hdrline.c (100%) rename sidebar.c => lib-ui/sidebar.c (99%) rename sidebar.h => lib-ui/sidebar.h (93%) diff --git a/Makefile.am b/Makefile.am index f0dc512..63901d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,10 +21,10 @@ madmutt_SOURCES = $(BUILT_SOURCES) \ alias.c attach.c base64.c browser.c buffy.c \ charset.c compress.c commands.c complete.c \ compose.c copy.c editmsg.c init.c keymap.c lib.c \ - flags.c filter.c from.c handler.c hcache.c hdrline.c headers.c help.c hook.c \ + flags.c filter.c from.c handler.c hcache.c headers.c help.c hook.c \ main.c mbox.c mh.c muttlib.c mutt_idna.c mx.c \ pager.c pattern.c postpone.c query.c recvattach.c recvcmd.c \ - score.c send.c sendlib.c sidebar.c sort.c state.c status.c \ + score.c send.c sendlib.c sort.c state.c status.c \ thread.c account.c madmutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \ @@ -62,7 +62,7 @@ CPPFLAGS=@CPPFLAGS@ -I$(includedir) EXTRA_madmutt_SOURCES = \ account.c mutt_sasl.c dotlock.c remailer.c \ alias.h browser.h remailer.h state.h \ - mutt_idna.h mutt_libesmtp.c sidebar.h state.h + mutt_idna.h mutt_libesmtp.c state.h EXTRA_DIST = config.rpath COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \ configure account.h alias.h attach.h recvattach.h handler.h thread.h \ diff --git a/browser.c b/browser.c index 69f95da..244df97 100644 --- a/browser.c +++ b/browser.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "mutt.h" #include "mx.h" @@ -43,7 +44,6 @@ #ifdef USE_NNTP #include "nntp.h" #endif -#include "sidebar.h" #include "lib/list.h" diff --git a/buffy.c b/buffy.c index fa531aa..5befe84 100644 --- a/buffy.c +++ b/buffy.c @@ -14,11 +14,20 @@ # include "config.h" #endif +#include +#include +#include +#include +#include +#include +#include + #include #include #include #include +#include #include @@ -26,17 +35,6 @@ #include "buffy.h" #include "mx.h" #include "mh.h" -#include "sidebar.h" - - -#include -#include -#include -#include -#include -#include - -#include static time_t BuffyTime = 0; /* last time we started checking for mail */ diff --git a/flags.c b/flags.c index cbfb231..1babc0d 100644 --- a/flags.c +++ b/flags.c @@ -15,11 +15,11 @@ #include #include +#include #include "mutt.h" #include "sort.h" #include "mx.h" -#include "sidebar.h" #include diff --git a/lib-ui/Makefile.am b/lib-ui/Makefile.am index 3962458..d79b1f5 100644 --- a/lib-ui/Makefile.am +++ b/lib-ui/Makefile.am @@ -1,9 +1,9 @@ noinst_LIBRARIES = libui.a -libui_a_SOURCES = curses.h enter.h menu.h history.h \ - enter.c menu.c history.c \ - color.c curs_lib.c curs_main.c resize.c +libui_a_SOURCES = curses.h enter.h menu.h history.h sidebar.h \ + enter.c menu.c history.c sidebar.c \ + color.c curs_lib.c curs_main.c resize.c hdrline.c -noinst_HEADERS = curses.h enter.h menu.h history.h +noinst_HEADERS = curses.h enter.h menu.h history.h sidebar.h -include ../cflags.mk diff --git a/lib-ui/curs_main.c b/lib-ui/curs_main.c index 7b5b5ee..3fd1fb3 100644 --- a/lib-ui/curs_main.c +++ b/lib-ui/curs_main.c @@ -27,6 +27,8 @@ #include #include +#include + #include #include "curses.h" @@ -39,7 +41,6 @@ #include "recvattach.h" #include "buffy.h" #include "mx.h" -#include "sidebar.h" #include "thread.h" #include "xterm.h" diff --git a/hdrline.c b/lib-ui/hdrline.c similarity index 100% rename from hdrline.c rename to lib-ui/hdrline.c diff --git a/lib-ui/menu.c b/lib-ui/menu.c index 6290e99..4e99047 100644 --- a/lib-ui/menu.c +++ b/lib-ui/menu.c @@ -11,6 +11,10 @@ # include "config.h" #endif +#include +#include +#include + #include #include #include @@ -21,14 +25,9 @@ #include "mutt.h" #include "charset.h" -#include "sidebar.h" #include - -#include -#include - -#include +#include #define SW (option(OPTMBOXPANE)?SidebarWidth:0) diff --git a/sidebar.c b/lib-ui/sidebar.c similarity index 99% rename from sidebar.c rename to lib-ui/sidebar.c index 15a2eef..a216d69 100644 --- a/sidebar.c +++ b/lib-ui/sidebar.c @@ -21,10 +21,10 @@ #include #include +#include #include "mutt.h" #include "charset.h" -#include "sidebar.h" #include "buffy.h" #include "keymap.h" diff --git a/sidebar.h b/lib-ui/sidebar.h similarity index 93% rename from sidebar.h rename to lib-ui/sidebar.h index 9aba9a3..239366a 100644 --- a/sidebar.h +++ b/lib-ui/sidebar.h @@ -11,6 +11,8 @@ #ifndef _SIDEBAR_H #define _SIDEBAR_H +#include "mutt.h" /* because of CONTEXT :| */ + int sidebar_draw (int); void sidebar_draw_frames (void); void sidebar_scroll (int, int); diff --git a/mx.c b/mx.c index 190f527..936fc25 100644 --- a/mx.c +++ b/mx.c @@ -34,6 +34,8 @@ #include +#include + #include "mutt.h" #include "buffy.h" #include "mx.h" @@ -43,7 +45,6 @@ #include "thread.h" #include "copy.h" #include "keymap.h" -#include "sidebar.h" #include "compress.h" #include diff --git a/nntp/nntp.c b/nntp/nntp.c index f576fc0..6311ce9 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -13,6 +13,11 @@ #include #endif +#include +#include +#include +#include + #include #include #include @@ -21,23 +26,17 @@ #include #include +#include #include "mutt.h" #include "sort.h" #include "mx.h" #include "mx_nntp.h" #include "nntp.h" -#include "sidebar.h" #include "buffy.h" #include - -#include -#include -#include -#include - #define WANT_LISTGROUP_COMMAND 0 static unsigned int _checked = 0; diff --git a/pager.c b/pager.c index a3ee8c6..805fd43 100644 --- a/pager.c +++ b/pager.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "mutt.h" #include "alias.h" @@ -42,7 +43,6 @@ #include "attach.h" #include "recvattach.h" #include "charset.h" -#include "sidebar.h" #include "buffy.h" #include "mx.h" @@ -51,7 +51,6 @@ #include - #define ISHEADER(x) ((x) == MT_COLOR_HEADER || (x) == MT_COLOR_HDEFAULT) #define IsAttach(x) (x && (x)->bdy) -- 2.20.1