about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-07-08 20:02:34 +0100
committerJames Booth <boothj5@gmail.com>2014-07-08 20:02:34 +0100
commit82d8d81dfb4d12cd6d3698c2ed075b43f2ff691d (patch)
tree677399f2ad722549cd9cdfa315edb871390f8a83
parentc4844a0626c53ceba5b94686b1f71bb67d9b03eb (diff)
parentb91f421628e35914e7f85580f0c1c5278e377462 (diff)
downloadprofani-tty-82d8d81dfb4d12cd6d3698c2ed075b43f2ff691d.tar.gz
Merge branch 'master' into winbuffers
-rw-r--r--profrc.example58
-rw-r--r--src/ui/windows.c6
2 files changed, 62 insertions, 2 deletions
diff --git a/profrc.example b/profrc.example
new file mode 100644
index 00000000..88a04e50
--- /dev/null
+++ b/profrc.example
@@ -0,0 +1,58 @@
+[ui]
+splash=true
+intype=true
+beep=false
+statuses.muc=all
+theme=boothj5
+history=true
+titlebar=true
+mouse=false
+flash=false
+vercheck=false
+statuses.console=all
+statuses.chat=all
+
+[connection]
+autoping=60
+reconnect=5
+account=me@server.org
+
+[chatstates]
+enabled=true
+outtype=false
+gone=10
+
+[notifications]
+remind=60
+invite=true
+sub=true
+message=true
+room=mention
+message.current=true
+room.current=true
+typing=true
+typing.current=false
+message.text=true
+room.text=true
+
+[alias]
+friends=/who online friends
+bob=/msg bob@server.org hey wassup?
+
+[logging]
+chlog=true
+grlog=true
+maxsize=1048580
+rotate=true
+shared=true
+
+[otr]
+warn=true
+log=redact
+policy=manual
+
+[presence]
+autoaway.mode=away
+autoaway.time=15
+autoaway.message=Away from computer
+autoaway.check=true
diff --git a/src/ui/windows.c b/src/ui/windows.c
index d1ba16a2..24d0f4c3 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -111,8 +111,9 @@ wins_get_next(void)
     // if there is a next window return it
     curr = g_list_next(curr);
     if (curr != NULL) {
+        int next = GPOINTER_TO_INT(curr->data);
         g_list_free(keys);
-        return wins_get_by_num(GPOINTER_TO_INT(curr->data));
+        return wins_get_by_num(next);
     // otherwise return the first window (console)
     } else {
         g_list_free(keys);
@@ -139,8 +140,9 @@ wins_get_previous(void)
     // if there is a previous window return it
     curr = g_list_previous(curr);
     if (curr != NULL) {
+        int previous = GPOINTER_TO_INT(curr->data);
         g_list_free(keys);
-        return wins_get_by_num(GPOINTER_TO_INT(curr->data));
+        return wins_get_by_num(previous);
     // otherwise return the last window
     } else {
         int new_num = GPOINTER_TO_INT(g_list_last(keys)->data);