~ubuntu-branches/ubuntu/raring/pidgin/raring

« back to all changes in this revision

Viewing changes to finch/libgnt/wms/irssi.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-22 21:51:41 UTC
  • mto: (46.1.1 karmic)
  • mto: This revision was merged to the branch mainline in revision 31.
  • Revision ID: james.westby@ubuntu.com-20081022215141-ofqitm4aggw7x7ip
Tags: upstream-2.5.2
ImportĀ upstreamĀ versionĀ 2.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * GNT - The GLib Ncurses Toolkit
 
3
 *
 
4
 * GNT is the legal property of its developers, whose names are too numerous
 
5
 * to list here.  Please refer to the COPYRIGHT file distributed with this
 
6
 * source distribution.
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation; either version 2 of the License, or
 
11
 * (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program; if not, write to the Free Software
 
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
 
21
 */
 
22
 
1
23
/**
2
24
 * 1. Buddylist is aligned on the left.
3
25
 * 2. The rest of the screen is split into MxN grid for conversation windows.
136
158
                                gnt_widget_set_position(win, x, y);
137
159
                                mvwin(win->window, y, x);
138
160
                        } else {
 
161
                                gnt_window_set_maximize(GNT_WINDOW(win), GNT_WINDOW_MAXIMIZE_Y);
139
162
                                remove_border_set_position_size(wm, win, 0, 0, -1, getmaxy(stdscr) - 1);
140
163
                                gnt_widget_get_size(win, &((Irssi*)wm)->buddylistwidth, NULL);
141
164
                                draw_line_separators((Irssi*)wm);
251
274
}
252
275
 
253
276
static void
 
277
refresh_window(GntWidget *widget, GntNode *node, Irssi *irssi)
 
278
{
 
279
        int vert, hor;
 
280
        int x, y, w, h;
 
281
 
 
282
        if (!GNT_IS_WINDOW(widget))
 
283
                return;
 
284
 
 
285
        if (is_budddylist(widget)) {
 
286
                return;
 
287
        }
 
288
 
 
289
        find_window_position(irssi, widget, &hor, &vert);
 
290
        get_xywh_for_frame(irssi, hor, vert, &x, &y, &w, &h);
 
291
        gnt_wm_move_window(GNT_WM(irssi), widget, x, y);
 
292
        gnt_wm_resize_window(GNT_WM(irssi), widget, w, h);
 
293
}
 
294
 
 
295
static void
254
296
irssi_terminal_refresh(GntWM *wm)
255
297
{
256
298
        draw_line_separators((Irssi*)wm);
 
299
        g_hash_table_foreach(wm->nodes, (GHFunc)refresh_window, wm);
257
300
}
258
301
 
259
302
static void