Mercurial > pidgin
diff console/gntconv.c @ 13916:fdf2dbed6faa
[gaim-migrate @ 16418]
Make the conversation windows bigger ... which is better *wink*.
Use Panel library to manage the windows.
Add a window-list that you can use to quickly switch to a window
(press Alt+w to bring it up).
Get rid of some unused codes.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 04 Jul 2006 01:32:39 +0000 |
parents | cc60d0861337 |
children | 9309d27d780c |
line wrap: on
line diff
--- a/console/gntconv.c Mon Jul 03 21:19:56 2006 +0000 +++ b/console/gntconv.c Tue Jul 04 01:32:39 2006 +0000 @@ -2,6 +2,7 @@ #include <util.h> #include "gntgaim.h" +#include "gntblist.h" #include "gntconv.h" #include "gnt.h" @@ -91,10 +92,14 @@ GGConv *ggc = g_hash_table_lookup(ggconvs, conv); char *title; GaimConversationType type; + int x, width; if (ggc) return; + gg_blist_get_position(&x, NULL); + gg_blist_get_size(&width, NULL); + ggc = g_new0(GGConv, 1); g_hash_table_insert(ggconvs, conv, ggc); @@ -102,25 +107,28 @@ type = gaim_conversation_get_type(conv); title = g_strdup_printf(_("%s"), gaim_conversation_get_name(conv)); - ggc->window = gnt_box_new(FALSE, TRUE); + ggc->window = gnt_box_new(TRUE, TRUE); gnt_box_set_title(GNT_BOX(ggc->window), title); gnt_box_set_toplevel(GNT_BOX(ggc->window), TRUE); + gnt_box_set_pad(GNT_BOX(ggc->window), 0); gnt_widget_set_name(ggc->window, title); ggc->tv = gnt_text_view_new(); gnt_box_add_widget(GNT_BOX(ggc->window), ggc->tv); gnt_widget_set_name(ggc->tv, "conversation-window-textview"); - gnt_widget_set_size(ggc->tv, getmaxx(stdscr) - 40, getmaxy(stdscr) - 15); + gnt_widget_set_size(ggc->tv, getmaxx(stdscr) - 2 - x - width, getmaxy(stdscr) - 4); ggc->entry = gnt_entry_new(NULL); gnt_box_add_widget(GNT_BOX(ggc->window), ggc->entry); gnt_widget_set_name(ggc->entry, "conversation-window-entry"); - gnt_widget_set_size(ggc->entry, getmaxx(stdscr) - 40, 1); g_signal_connect(G_OBJECT(ggc->entry), "key_pressed", G_CALLBACK(entry_key_pressed), ggc); g_signal_connect(G_OBJECT(ggc->window), "destroy", G_CALLBACK(closing_window), ggc); - gnt_widget_set_position(ggc->window, 32, 0); + /* XXX: I am assuming the buddylist is on the leftmost corner. + * That may not always be correct, since the windows can be moved. + * It might be an option to remember the position of conv. windows. */ + gnt_widget_set_position(ggc->window, x + width, 0); gnt_widget_show(ggc->window); g_free(title);