about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/core.c71
-rw-r--r--src/ui/ui.h6
-rw-r--r--src/ui/window.h1
-rw-r--r--src/ui/windows.c28
-rw-r--r--src/ui/windows.h1
5 files changed, 0 insertions, 107 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 24461ad3..0ab87f13 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -234,12 +234,6 @@ _ui_win_exists(int index)
 }
 
 static gboolean
-_ui_duck_exists(void)
-{
-    return wins_duck_exists();
-}
-
-static gboolean
 _ui_xmlconsole_exists(void)
 {
     return wins_xmlconsole_exists();
@@ -1235,15 +1229,6 @@ _ui_new_chat_win(const char * const to)
 }
 
 static void
-_ui_create_duck_win(void)
-{
-    ProfWin *window = wins_new("DuckDuckGo search", WIN_DUCK);
-    int num = wins_get_num(window);
-    ui_switch_win(num);
-    win_save_println(window, "Type ':help' to find out more.");
-}
-
-static void
 _ui_create_xmlconsole_win(void)
 {
     ProfWin *window = wins_new("XML Console", WIN_XML);
@@ -1262,57 +1247,6 @@ _ui_open_xmlconsole_win(void)
 }
 
 static void
-_ui_open_duck_win(void)
-{
-    ProfWin *window = wins_get_by_recipient("DuckDuckGo search");
-    if (window != NULL) {
-        int num = wins_get_num(window);
-        ui_switch_win(num);
-    }
-}
-
-static void
-_ui_duck(const char * const query)
-{
-    ProfWin *window = wins_get_by_recipient("DuckDuckGo search");
-    if (window != NULL) {
-        win_save_println(window, "");
-        win_save_print(window, '-', NULL, NO_EOL, COLOUR_ME, "", "Query  : ");
-        win_save_print(window, '-', NULL, NO_DATE, 0, "", query);
-    }
-}
-
-static void
-_ui_duck_result(const char * const result)
-{
-    ProfWin *window = wins_get_by_recipient("DuckDuckGo search");
-
-    if (window != NULL) {
-        win_save_print(window, '-', NULL, NO_EOL, COLOUR_THEM, "", "Result  : ");
-
-        glong offset = 0;
-        while (offset < g_utf8_strlen(result, -1)) {
-            gchar *ptr = g_utf8_offset_to_pointer(result, offset);
-            gunichar unichar = g_utf8_get_char(ptr);
-            if (unichar == '\n') {
-                win_save_newline(window);
-                win_save_print(window, '-', NULL, NO_EOL, 0, "", "");
-            } else {
-                gchar *string = g_ucs4_to_utf8(&unichar, 1, NULL, NULL, NULL);
-                if (string != NULL) {
-                    win_save_print(window, '-', NULL, NO_DATE | NO_EOL, 0, "", string);
-                    g_free(string);
-                }
-            }
-
-            offset++;
-        }
-
-        win_save_newline(window);
-    }
-}
-
-static void
 _ui_outgoing_msg(const char * const from, const char * const to,
     const char * const message)
 {
@@ -2993,7 +2927,6 @@ ui_init_module(void)
     ui_resize = _ui_resize;
     ui_load_colours = _ui_load_colours;
     ui_win_exists = _ui_win_exists;
-    ui_duck_exists = _ui_duck_exists;
     ui_contact_typing = _ui_contact_typing;
     ui_get_recipients = _ui_get_recipients;
     ui_incoming_msg = _ui_incoming_msg;
@@ -3027,10 +2960,6 @@ ui_init_module(void)
     ui_print_system_msg_from_recipient = _ui_print_system_msg_from_recipient;
     ui_recipient_gone = _ui_recipient_gone;
     ui_new_chat_win = _ui_new_chat_win;
-    ui_create_duck_win = _ui_create_duck_win;
-    ui_open_duck_win = _ui_open_duck_win;
-    ui_duck = _ui_duck;
-    ui_duck_result = _ui_duck_result;
     ui_outgoing_msg = _ui_outgoing_msg;
     ui_room_join = _ui_room_join;
     ui_room_roster = _ui_room_roster;
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 9781d1b6..9c1888f6 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -209,12 +209,6 @@ void (*ui_info)(void);
 void (*ui_status_private)(void);
 void (*ui_info_private)(void);
 
-void (*ui_create_duck_win)(void);
-void (*ui_open_duck_win)(void);
-void (*ui_duck)(const char * const query);
-void (*ui_duck_result)(const char * const result);
-gboolean (*ui_duck_exists)(void);
-
 void (*ui_tidy_wins)(void);
 void (*ui_prune_wins)(void);
 gboolean (*ui_swap_wins)(int source_win, int target_win);
diff --git a/src/ui/window.h b/src/ui/window.h
index 68bab0e7..185bdd6e 100644
--- a/src/ui/window.h
+++ b/src/ui/window.h
@@ -62,7 +62,6 @@ typedef enum {
     WIN_MUC,
     WIN_MUC_CONFIG,
     WIN_PRIVATE,
-    WIN_DUCK,
     WIN_XML
 } win_type_t;
 
diff --git a/src/ui/windows.c b/src/ui/windows.c
index 0542f3da..c9f04cb5 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -343,25 +343,6 @@ wins_show_subwin(ProfWin *window)
 }
 
 gboolean
-wins_duck_exists(void)
-{
-    GList *values = g_hash_table_get_values(windows);
-    GList *curr = values;
-
-    while (curr != NULL) {
-        ProfWin *window = curr->data;
-        if (window->type == WIN_DUCK) {
-            g_list_free(values);
-            return TRUE;
-        }
-        curr = g_list_next(curr);
-    }
-
-    g_list_free(values);
-    return FALSE;
-}
-
-gboolean
 wins_xmlconsole_exists(void)
 {
     GList *values = g_hash_table_get_values(windows);
@@ -585,7 +566,6 @@ wins_create_summary(void)
         GString *priv_string;
         GString *muc_string;
         GString *muc_config_string;
-        GString *duck_string;
         GString *xml_string;
 
         switch (window->type)
@@ -663,14 +643,6 @@ wins_create_summary(void)
 
                 break;
 
-            case WIN_DUCK:
-                duck_string = g_string_new("");
-                g_string_printf(duck_string, "%d: DuckDuckGo search", ui_index);
-                result = g_slist_append(result, strdup(duck_string->str));
-                g_string_free(duck_string, TRUE);
-
-                break;
-
             case WIN_XML:
                 xml_string = g_string_new("");
                 g_string_printf(xml_string, "%d: XML console", ui_index);
diff --git a/src/ui/windows.h b/src/ui/windows.h
index 7b3a94f8..0b72ee0e 100644
--- a/src/ui/windows.h
+++ b/src/ui/windows.h
@@ -52,7 +52,6 @@ gboolean wins_is_current(ProfWin *window);
 ProfWin * wins_new(const char * const from, win_type_t type);
 int wins_get_total_unread(void);
 void wins_resize_all(void);
-gboolean wins_duck_exists(void);
 GSList * wins_get_chat_recipients(void);
 GSList * wins_get_prune_recipients(void);
 void wins_lost_connection(void);