Mercurial > pidgin.yaz
comparison console/libgnt/gntwindow.c @ 14616:f1f1dcb26d89
[gaim-migrate @ 17344]
Add a barebone menu in the buddylist for account actions. (Press Ctrl+o)
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 24 Sep 2006 17:07:38 +0000 |
parents | 62bb53609a36 |
children | b7e145ea9076 |
comparison
equal
deleted
inserted
replaced
14615:bddedf8e4653 | 14616:f1f1dcb26d89 |
---|---|
8 }; | 8 }; |
9 | 9 |
10 static GntBoxClass *parent_class = NULL; | 10 static GntBoxClass *parent_class = NULL; |
11 static guint signals[SIGS] = { 0 }; | 11 static guint signals[SIGS] = { 0 }; |
12 | 12 |
13 gboolean (*org_keypress)(GntWidget *widget, const char *text); | 13 static gboolean (*org_keypress)(GntWidget *widget, const char *text); |
14 void (*org_destroy)(GntWidget *widget); | 14 static void (*org_destroy)(GntWidget *widget); |
15 | 15 |
16 static gboolean | 16 static gboolean |
17 gnt_window_key_pressed(GntWidget *widget, const char *text) | 17 gnt_window_key_pressed(GntWidget *widget, const char *text) |
18 { | 18 { |
19 if (strcmp(text, GNT_KEY_CTRL_O) == 0 && GNT_WINDOW(widget)->menu) { | 19 if (strcmp(text, GNT_KEY_CTRL_O) == 0 && GNT_WINDOW(widget)->menu) { |
106 return wid; | 106 return wid; |
107 } | 107 } |
108 | 108 |
109 void gnt_window_set_menu(GntWindow *window, GntMenu *menu) | 109 void gnt_window_set_menu(GntWindow *window, GntMenu *menu) |
110 { | 110 { |
111 /* If a menu already existed, then destroy that first. */ | |
112 if (window->menu) | |
113 gnt_widget_destroy(GNT_WIDGET(window->menu)); | |
111 window->menu = menu; | 114 window->menu = menu; |
112 } | 115 } |
113 | 116 |