about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-04-06 21:35:17 +0100
committerJames Booth <boothj5@gmail.com>2014-04-06 21:35:17 +0100
commitaa2a87d162b36edb472cd90e7954566ce0d1ddb4 (patch)
treef851d7861bff9df83431976d8e78c4e8c072a087
parentccfea12674d8af24f896b38f193b98c1e830339e (diff)
downloadprofani-tty-aa2a87d162b36edb472cd90e7954566ce0d1ddb4.tar.gz
Tidied ui dependencies
-rw-r--r--src/command/command.c2
-rw-r--r--src/command/commands.c4
-rw-r--r--src/main.c1
-rw-r--r--src/muc.c2
-rw-r--r--src/otr/otrlibv4.c2
-rw-r--r--src/profanity.c2
-rw-r--r--src/server_events.c11
-rw-r--r--src/server_events.h1
-rw-r--r--src/xmpp/bookmark.c4
-rw-r--r--src/xmpp/message.c1
10 files changed, 15 insertions, 15 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 9be99743..d4ad2d1a 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -46,9 +46,9 @@
 #include "tools/autocomplete.h"
 #include "tools/parser.h"
 #include "tools/tinyurl.h"
-#include "ui/ui.h"
 #include "xmpp/xmpp.h"
 #include "xmpp/bookmark.h"
+#include "ui/ui.h"
 
 typedef char*(*autocompleter)(char*, int*);
 
diff --git a/src/command/commands.c b/src/command/commands.c
index 929bf671..f179fcb8 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -43,11 +43,9 @@
 #include "tools/autocomplete.h"
 #include "tools/parser.h"
 #include "tools/tinyurl.h"
-#include "ui/ui.h"
-#include "ui/window.h"
-#include "ui/windows.h"
 #include "xmpp/xmpp.h"
 #include "xmpp/bookmark.h"
+#include "ui/ui.h"
 
 static void _update_presence(const resource_presence_t presence,
     const char * const show, gchar **args);
diff --git a/src/main.c b/src/main.c
index 7770f775..d26b737c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,6 +33,7 @@
 #include "otr/otr.h"
 #endif
 #include "xmpp/xmpp.h"
+
 #include "ui/ui.h"
 
 static gboolean disable_tls = FALSE;
diff --git a/src/muc.c b/src/muc.c
index eaca6b0b..9ee94755 100644
--- a/src/muc.c
+++ b/src/muc.c
@@ -29,8 +29,6 @@
 #include "jid.h"
 #include "tools/autocomplete.h"
 
-#include "ui/ui.h"
-
 typedef struct _muc_room_t {
     char *room; // e.g. test@conference.server
     char *nick; // e.g. Some User
diff --git a/src/otr/otrlibv4.c b/src/otr/otrlibv4.c
index 01afa868..3b9b643e 100644
--- a/src/otr/otrlibv4.c
+++ b/src/otr/otrlibv4.c
@@ -24,8 +24,6 @@
 #include <libotr/privkey.h>
 #include <libotr/message.h>
 
-#include "ui/ui.h"
-
 OtrlPolicy
 otrlib_policy(void)
 {
diff --git a/src/profanity.c b/src/profanity.c
index 102d5160..43eee835 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -47,8 +47,8 @@
 #include "otr/otr.h"
 #endif
 #include "resource.h"
-#include "ui/ui.h"
 #include "xmpp/xmpp.h"
+#include "ui/ui.h"
 
 static void _handle_idle_time(void);
 static void _init(const int disable_tls, char *log_level);
diff --git a/src/server_events.c b/src/server_events.c
index 2ae4d194..ac1fb2f5 100644
--- a/src/server_events.c
+++ b/src/server_events.c
@@ -29,14 +29,13 @@
 #include "config/preferences.h"
 #include "config/account.h"
 #include "roster_list.h"
-#include "ui/ui.h"
-
-#include "ui/windows.h"
 
 #ifdef HAVE_LIBOTR
 #include "otr/otr.h"
 #endif
 
+#include "ui/ui.h"
+
 // handle presence stanza errors
 void
 handle_presence_error(const char *from, const char * const type,
@@ -503,3 +502,9 @@ handle_autoping_cancel(void)
     cons_show_error("Server ping not supported, autoping disabled.");
     ui_current_page_off();
 }
+
+void
+handle_bookmark_autojoin(char *jid)
+{
+    ui_room_join(jid);
+}
diff --git a/src/server_events.h b/src/server_events.h
index 15de8f07..ebff2223 100644
--- a/src/server_events.h
+++ b/src/server_events.h
@@ -78,5 +78,6 @@ void handle_message_error(const char * const from, const char * const type,
     const char * const err_msg);
 void handle_presence_error(const char *from, const char * const type,
     const char *err_msg);
+void handle_bookmark_autojoin(char *jid);
 
 #endif
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c
index e86afdfd..6cc4775f 100644
--- a/src/xmpp/bookmark.c
+++ b/src/xmpp/bookmark.c
@@ -30,7 +30,7 @@
 #include "common.h"
 #include "log.h"
 #include "muc.h"
-#include "ui/ui.h"
+#include "server_events.h"
 #include "xmpp/connection.h"
 #include "xmpp/stanza.h"
 #include "xmpp/xmpp.h"
@@ -324,7 +324,7 @@ _bookmark_handle_result(xmpp_conn_t * const conn,
                 if (!muc_room_is_active(room_jid->barejid)) {
                     presence_join_room(jid, name, NULL);
                     /* TODO: this should be removed after fixing #195 */
-                    ui_room_join(jid);
+                    handle_bookmark_autojoin(jid);
                 }
                 jid_destroy(room_jid);
             } else {
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 499f3a61..7520aa0a 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -37,7 +37,6 @@
 #include "roster_list.h"
 #include "xmpp/stanza.h"
 #include "xmpp/xmpp.h"
-#include "ui/ui.h"
 
 #define HANDLE(ns, type, func) xmpp_handler_add(conn, func, ns, STANZA_NAME_MESSAGE, type, ctx)