Mercurial > pidgin
comparison console/libgnt/wms/s.c @ 14613:62bb53609a36
[gaim-migrate @ 17341]
Menus and windows. I have added a test-app test/menu.c to show how to use it.
Pressing Ctrl+o brings up the menu for the window (if it has one).
It should now be possible to add menus for account-actions and all that stuff.
Patches are very welcome.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 24 Sep 2006 07:14:26 +0000 |
parents | 84a480acb6ad |
children | 29c6bec37b96 |
comparison
equal
deleted
inserted
replaced
14612:1f46715c08d9 | 14613:62bb53609a36 |
---|---|
1 #include "gnt.h" | |
1 #include "gntbox.h" | 2 #include "gntbox.h" |
3 #include "gntmenu.h" | |
2 #include "gntwm.h" | 4 #include "gntwm.h" |
3 | 5 |
4 #include "gntblist.h" | 6 #include "gntblist.h" |
5 | 7 |
6 #include <string.h> | 8 #include <string.h> |
50 { | 52 { |
51 int x, y, w, h; | 53 int x, y, w, h; |
52 int maxx, maxy; | 54 int maxx, maxy; |
53 const char *name; | 55 const char *name; |
54 | 56 |
57 if (GNT_IS_MENU(win)) | |
58 return new_panel(win->window); | |
55 getmaxyx(stdscr, maxy, maxx); | 59 getmaxyx(stdscr, maxy, maxx); |
56 | 60 |
57 gnt_widget_get_position(win, &x, &y); | 61 gnt_widget_get_position(win, &x, &y); |
58 gnt_widget_get_size(win, &w, &h); | 62 gnt_widget_get_size(win, &w, &h); |
59 | 63 |