about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-12-10 21:17:31 +0000
committerJames Booth <boothj5@gmail.com>2014-12-10 21:17:31 +0000
commit742748b05c263b0bf7266acc8a03b04170f88cf7 (patch)
tree69ecaa6a26f7e4888fdbb49f9ceaaa1ce80eb893 /src
parent706f31422dc73fff68c2955ec7e830943a5143e2 (diff)
downloadprofani-tty-742748b05c263b0bf7266acc8a03b04170f88cf7.tar.gz
Renamed chat_resource -> resource
Diffstat (limited to 'src')
-rw-r--r--src/command/command.c4
-rw-r--r--src/command/commands.c12
-rw-r--r--src/ui/core.c2
-rw-r--r--src/ui/titlebar.c8
-rw-r--r--src/ui/window.c4
-rw-r--r--src/ui/window.h2
6 files changed, 16 insertions, 16 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 022de166..1123af39 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -1782,9 +1782,9 @@ cmd_execute_default(const char * inp)
             } else {
                 GString *send_recipient = g_string_new(recipient);
                 ProfWin *current = wins_get_current();
-                if (current && current->wins.chat.chat_resource) {
+                if (current && current->wins.chat.resource) {
                     g_string_append(send_recipient, "/");
-                    g_string_append(send_recipient, current->wins.chat.chat_resource);
+                    g_string_append(send_recipient, current->wins.chat.resource);
                 }
 
 #ifdef HAVE_LIBOTR
diff --git a/src/command/commands.c b/src/command/commands.c
index 40310e45..34d0cf54 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -1151,9 +1151,9 @@ cmd_msg(gchar **args, struct cmd_help_t help)
         }
         GString *send_jid = g_string_new(usr_jid);
         ProfWin *current = wins_get_current();
-        if (current->type == WIN_CHAT && current->wins.chat.chat_resource) {
+        if (current->type == WIN_CHAT && current->wins.chat.resource) {
             g_string_append(send_jid, "/");
-            g_string_append(send_jid, current->wins.chat.chat_resource);
+            g_string_append(send_jid, current->wins.chat.resource);
         }
 
         if (msg != NULL) {
@@ -1574,11 +1574,11 @@ cmd_resource(gchar **args, struct cmd_help_t help)
             return TRUE;
         }
 
-        current->wins.chat.chat_resource = strdup(resource);
+        current->wins.chat.resource = strdup(resource);
         return TRUE;
 
     } else if (g_strcmp0(cmd, "off") == 0) {
-        FREE_SET_NULL(current->wins.chat.chat_resource);
+        FREE_SET_NULL(current->wins.chat.resource);
         return TRUE;
     } else {
         cons_show("Usage: %s", help.usage);
@@ -2941,9 +2941,9 @@ cmd_tiny(gchar **args, struct cmd_help_t help)
                 char *recipient = ui_current_recipient();
                 GString *send_recipient = g_string_new(recipient);
                 ProfWin *current = wins_get_current();
-                if (current && current->wins.chat.chat_resource) {
+                if (current && current->wins.chat.resource) {
                     g_string_append(send_recipient, "/");
-                    g_string_append(send_recipient, current->wins.chat.chat_resource);
+                    g_string_append(send_recipient, current->wins.chat.resource);
                 }
 
 #ifdef HAVE_LIBOTR
diff --git a/src/ui/core.c b/src/ui/core.c
index c62d6b4d..7cb0e010 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -888,7 +888,7 @@ _ui_gone_secure(const char * const recipient, gboolean trusted)
         return;
     }
 
-    FREE_SET_NULL(window->wins.chat.chat_resource);
+    FREE_SET_NULL(window->wins.chat.resource);
 
     window->wins.chat.is_otr = TRUE;
     window->wins.chat.is_trusted = trusted;
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c
index 5c11c346..8a022916 100644
--- a/src/ui/titlebar.c
+++ b/src/ui/titlebar.c
@@ -324,21 +324,21 @@ _show_contact_presence(void)
     int bracket_attrs = theme_attrs(THEME_TITLE_BRACKET);
 
     ProfWin *current = wins_get_current();
-    if (current && current->wins.chat.chat_resource) {
+    if (current && current->wins.chat.resource) {
         wprintw(win, "/");
-        wprintw(win, current->wins.chat.chat_resource);
+        wprintw(win, current->wins.chat.resource);
     }
 
     if (prefs_get_boolean(PREF_PRESENCE)) {
         theme_item_t presence_colour = THEME_TITLE_OFFLINE;
         const char *presence = "offline";
 
-        if (current && current->wins.chat.chat_resource) {
+        if (current && current->wins.chat.resource) {
             char *barejid = roster_barejid_from_name(current_recipient);
             if (barejid) {
                 PContact contact = roster_get_contact(barejid);
                 if (contact) {
-                    Resource *resource = p_contact_get_resource(contact, current->wins.chat.chat_resource);
+                    Resource *resource = p_contact_get_resource(contact, current->wins.chat.resource);
                     if (resource) {
                         presence = string_from_resource_presence(resource->presence);
                     }
diff --git a/src/ui/window.c b/src/ui/window.c
index 56225b67..ee096a98 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -122,7 +122,7 @@ win_create(const char * const title, win_type_t type)
     if (new_win->type == WIN_CHAT) {
         new_win->wins.chat.is_otr = FALSE;
         new_win->wins.chat.is_trusted = FALSE;
-        new_win->wins.chat.chat_resource = NULL;
+        new_win->wins.chat.resource = NULL;
     }
 
     scrollok(new_win->win, TRUE);
@@ -223,7 +223,7 @@ win_free(ProfWin* window)
     }
 
     if (window->type == WIN_CHAT) {
-        free(window->wins.chat.chat_resource);
+        free(window->wins.chat.resource);
     }
 
     free(window->from);
diff --git a/src/ui/window.h b/src/ui/window.h
index f613c72a..fd81aa06 100644
--- a/src/ui/window.h
+++ b/src/ui/window.h
@@ -86,7 +86,7 @@ typedef struct prof_win_t {
         struct {
             gboolean is_otr;
             gboolean is_trusted;
-            char *chat_resource;
+            char *resource;
         } chat;
 
         // WIN_MUC