Added C plugin code from plugins branch
This commit is contained in:
@@ -32,9 +32,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "prof_config.h"
|
||||
|
||||
#ifdef HAVE_GIT_VERSION
|
||||
#ifdef PROF_HAVE_GIT_VERSION
|
||||
#include "gitversion.h"
|
||||
#endif
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_LIBXSS
|
||||
#ifdef PROF_HAVE_LIBXSS
|
||||
#include <X11/extensions/scrnsaver.h>
|
||||
#endif
|
||||
#include <glib.h>
|
||||
#ifdef HAVE_NCURSESW_NCURSES_H
|
||||
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
|
||||
#include <ncursesw/ncurses.h>
|
||||
#elif HAVE_NCURSES_H
|
||||
#elif PROF_HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#endif
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
#include "jid.h"
|
||||
#include "log.h"
|
||||
#include "muc.h"
|
||||
#ifdef HAVE_LIBOTR
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#include "otr/otr.h"
|
||||
#endif
|
||||
#include "ui/ui.h"
|
||||
@@ -74,13 +74,14 @@
|
||||
#include "ui/window.h"
|
||||
#include "window_list.h"
|
||||
#include "xmpp/xmpp.h"
|
||||
#include "plugins/plugins.h"
|
||||
|
||||
static char *win_title;
|
||||
static int inp_size;
|
||||
static gboolean perform_resize = FALSE;
|
||||
static GTimer *ui_idle_time;
|
||||
|
||||
#ifdef HAVE_LIBXSS
|
||||
#ifdef PROF_HAVE_LIBXSS
|
||||
static Display *display;
|
||||
#endif
|
||||
|
||||
@@ -104,7 +105,7 @@ ui_init(void)
|
||||
wins_init();
|
||||
notifier_initialise();
|
||||
cons_about();
|
||||
#ifdef HAVE_LIBXSS
|
||||
#ifdef PROF_HAVE_LIBXSS
|
||||
display = XOpenDisplay(0);
|
||||
#endif
|
||||
ui_idle_time = g_timer_new();
|
||||
@@ -149,7 +150,7 @@ unsigned long
|
||||
ui_get_idle_time(void)
|
||||
{
|
||||
// if compiled with libxss, get the x sessions idle time
|
||||
#ifdef HAVE_LIBXSS
|
||||
#ifdef PROF_HAVE_LIBXSS
|
||||
XScreenSaverInfo *info = XScreenSaverAllocInfo();
|
||||
if (info && display) {
|
||||
XScreenSaverQueryInfo(display, DefaultRootWindow(display), info);
|
||||
@@ -496,7 +497,7 @@ ui_close_connected_win(int index)
|
||||
} else if (window->type == WIN_CHAT) {
|
||||
ProfChatWin *chatwin = (ProfChatWin*) window;
|
||||
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
||||
#ifdef HAVE_LIBOTR
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
if (chatwin->is_otr) {
|
||||
otr_end_session(chatwin->barejid);
|
||||
}
|
||||
@@ -1325,3 +1326,21 @@ ui_show_software_version(const char *const jid, const char *const presence,
|
||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "OS : %s", os);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ui_status_bar_inactive(const int win)
|
||||
{
|
||||
status_bar_inactive(win);
|
||||
}
|
||||
|
||||
void
|
||||
ui_status_bar_active(const int win)
|
||||
{
|
||||
status_bar_active(win);
|
||||
}
|
||||
|
||||
void
|
||||
ui_status_bar_new(const int win)
|
||||
{
|
||||
status_bar_new(win);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user