From 88739d5c59022b4d1f1b67da3128cb4a3266ecf9 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 21 Apr 2015 23:28:52 +0100 Subject: Moved new chat win events to client events module --- src/command/commands.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/command') diff --git a/src/command/commands.c b/src/command/commands.c index 0febccd8..713cd0ef 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -738,7 +738,7 @@ gboolean cmd_win(gchar **args, struct cmd_help_t help) { int num = atoi(args[0]); - gboolean switched = ui_switch_win(num); + gboolean switched = ui_switch_win_num(num); if (switched == FALSE) { cons_show("Window %d does not exist.", num); } @@ -1347,7 +1347,13 @@ cmd_msg(gchar **args, struct cmd_help_t help) client_send_msg(barejid, msg); return TRUE; } else { - ui_new_chat_win(barejid); + ProfWin *window = (ProfWin*)wins_get_chat(barejid); + if (window) { + client_focus_win(window); + } else { + client_new_chat_win(barejid); + } + #ifdef HAVE_LIBOTR if (otr_is_secure(barejid)) { ui_gone_secure(barejid, otr_is_trusted(barejid)); @@ -2467,7 +2473,7 @@ cmd_form(gchar **args, struct cmd_help_t help) current = wins_get_console(); } int num = wins_get_num(current); - ui_switch_win(num); + ui_switch_win_num(num); } return TRUE; @@ -2775,7 +2781,7 @@ cmd_room(gchar **args, struct cmd_help_t help) if (confwin != NULL) { num = wins_get_num(window); - ui_switch_win(num); + ui_switch_win_num(num); } else { iq_request_room_config_form(mucwin->roomjid); } @@ -4180,7 +4186,12 @@ cmd_otr(gchar **args, struct cmd_help_t help) barejid = contact; } - ui_new_chat_win(barejid); + ProfWin *window = (ProfWin*)wins_get_chat(barejid); + if (window) { + client_focus_win(window); + } else { + client_new_chat_win(barejid); + } if (ui_current_win_is_otr()) { ui_current_print_formatted_line('!', 0, "You are already in an OTR session."); -- cgit 1.4.1-2-gfad0 ommitter
path: root/tools/iso/kernel.soso/devfs.h
blob: 19b90a330cef1b597e26e0823fdf4e696b14dd23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#ifndef DEVFS_H
#define DEVFS_H

#include "device.h"
#include "fs.h"
#include "common.h"

void initializeDevFS();
FileSystemNode* registerDevice(Device* device);

#endif // DEVFS_H