Mercurial > pidgin
annotate console/gntpounce.c @ 15808:b0d74443fa2a
Protection against missing SHA1C
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 17 Mar 2007 17:38:12 +0000 |
parents | 704d40050800 |
children |
rev | line source |
---|---|
15502
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 /** |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 * @file gntpounce.c GNT Buddy Pounce API |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 * @ingroup gntui |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 * |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
5 * gaim |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
6 * |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 * Gaim is the legal property of its developers, whose names are too numerous |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 * to list here. Please refer to the COPYRIGHT file distributed with this |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 * source distribution. |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
10 * |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
11 * This program is free software; you can redistribute it and/or modify |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 * it under the terms of the GNU General Public License as published by |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
13 * the Free Software Foundation; either version 2 of the License, or |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
14 * (at your option) any later version. |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
15 * |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
16 * This program is distributed in the hope that it will be useful, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
19 * GNU General Public License for more details. |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
20 * |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
21 * You should have received a copy of the GNU General Public License |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
22 * along with this program; if not, write to the Free Software |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
24 * |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
25 */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
26 #include <gnt.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
27 #include <gntbox.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
28 #include <gntbutton.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
29 #include <gntcheckbox.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
30 #include <gntcombobox.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
31 #include <gntentry.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
32 #include <gntlabel.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
33 #include <gntline.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
34 #include <gnttree.h> |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
35 #include "internal.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
36 #include "gntgaim.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
37 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
38 #include "account.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
39 #include "conversation.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
40 #include "debug.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
41 #include "notify.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
42 #include "prpl.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
43 #include "request.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
44 #include "server.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
45 #include "util.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
46 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
47 #include "gntpounce.h" |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
48 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
49 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
50 typedef struct |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
51 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
52 /* Pounce data */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
53 GaimPounce *pounce; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
54 GaimAccount *account; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
55 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
56 /* The window */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
57 GntWidget *window; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
58 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
59 /* Pounce on Whom */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
60 GntWidget *account_menu; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
61 GntWidget *buddy_entry; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
62 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
63 /* Pounce options */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
64 GntWidget *on_away; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
65 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
66 /* Pounce When Buddy... */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
67 GntWidget *signon; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
68 GntWidget *signoff; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
69 GntWidget *away; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
70 GntWidget *away_return; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
71 GntWidget *idle; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
72 GntWidget *idle_return; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
73 GntWidget *typing; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
74 GntWidget *typed; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
75 GntWidget *stop_typing; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
76 GntWidget *message_recv; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
77 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
78 /* Action */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
79 GntWidget *open_win; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
80 GntWidget *popup; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
81 GntWidget *popup_entry; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
82 GntWidget *send_msg; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
83 GntWidget *send_msg_entry; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
84 GntWidget *exec_cmd; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
85 GntWidget *exec_cmd_entry; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
86 GntWidget *play_sound; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
87 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
88 GntWidget *save_pounce; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
89 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
90 /* Buttons */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
91 GntWidget *save_button; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
92 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
93 } GaimGntPounceDialog; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
94 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
95 typedef struct |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
96 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
97 GntWidget *window; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
98 GntWidget *tree; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
99 GntWidget *modify_button; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
100 GntWidget *delete_button; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
101 } PouncesManager; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
102 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
103 static PouncesManager *pounces_manager = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
104 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
105 /************************************************************************** |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
106 * Callbacks |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
107 **************************************************************************/ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
108 static gint |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
109 delete_win_cb(GntWidget *w, GaimGntPounceDialog *dialog) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
110 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
111 gnt_widget_destroy(dialog->window); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
112 g_free(dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
113 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
114 return TRUE; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
115 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
116 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
117 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
118 cancel_cb(GntWidget *w, GaimGntPounceDialog *dialog) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
119 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
120 gnt_widget_destroy(dialog->window); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
121 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
122 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
123 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
124 add_pounce_to_treeview(GntTree *tree, GaimPounce *pounce) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
125 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
126 GaimAccount *account; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
127 const char *pouncer; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
128 const char *pouncee; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
129 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
130 account = gaim_pounce_get_pouncer(pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
131 pouncer = gaim_account_get_username(account); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
132 pouncee = gaim_pounce_get_pouncee(pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
133 gnt_tree_add_row_last(tree, pounce, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
134 gnt_tree_create_row(tree, pouncer, pouncee), NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
135 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
136 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
137 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
138 populate_pounces_list(PouncesManager *dialog) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
139 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
140 const GList *pounces; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
141 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
142 gnt_tree_remove_all(GNT_TREE(dialog->tree)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
143 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
144 for (pounces = gaim_pounces_get_all(); pounces != NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
145 pounces = g_list_next(pounces)) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
146 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
147 add_pounce_to_treeview(GNT_TREE(dialog->tree), pounces->data); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
148 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
149 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
150 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
151 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
152 update_pounces(void) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
153 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
154 /* Rebuild the pounces list if the pounces manager is open */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
155 if (pounces_manager != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
156 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
157 populate_pounces_list(pounces_manager); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
158 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
159 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
160 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
161 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
162 signed_on_off_cb(GaimConnection *gc, gpointer user_data) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
163 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
164 update_pounces(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
165 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
166 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
167 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
168 save_pounce_cb(GntWidget *w, GaimGntPounceDialog *dialog) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
169 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
170 const char *name; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
171 const char *message, *command, *reason; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
172 GaimPounceEvent events = GAIM_POUNCE_NONE; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
173 GaimPounceOption options = GAIM_POUNCE_OPTION_NONE; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
174 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
175 name = gnt_entry_get_text(GNT_ENTRY(dialog->buddy_entry)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
176 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
177 if (*name == '\0') |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
178 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
179 gaim_notify_error(NULL, NULL, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
180 _("Please enter a buddy to pounce."), NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
181 return; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
182 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
183 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
184 /* Options */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
185 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->on_away))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
186 options |= GAIM_POUNCE_OPTION_AWAY; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
187 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
188 /* Events */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
189 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->signon))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
190 events |= GAIM_POUNCE_SIGNON; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
191 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
192 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->signoff))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
193 events |= GAIM_POUNCE_SIGNOFF; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
194 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
195 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->away))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
196 events |= GAIM_POUNCE_AWAY; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
197 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
198 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->away_return))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
199 events |= GAIM_POUNCE_AWAY_RETURN; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
200 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
201 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->idle))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
202 events |= GAIM_POUNCE_IDLE; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
203 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
204 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->idle_return))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
205 events |= GAIM_POUNCE_IDLE_RETURN; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
206 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
207 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->typing))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
208 events |= GAIM_POUNCE_TYPING; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
209 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
210 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->typed))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
211 events |= GAIM_POUNCE_TYPED; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
212 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
213 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->stop_typing))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
214 events |= GAIM_POUNCE_TYPING_STOPPED; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
215 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
216 if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->message_recv))) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
217 events |= GAIM_POUNCE_MESSAGE_RECEIVED; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
218 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
219 /* Data fields */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
220 message = gnt_entry_get_text(GNT_ENTRY(dialog->send_msg_entry)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
221 command = gnt_entry_get_text(GNT_ENTRY(dialog->exec_cmd_entry)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
222 reason = gnt_entry_get_text(GNT_ENTRY(dialog->popup_entry)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
223 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
224 if (*reason == '\0') reason = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
225 if (*message == '\0') message = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
226 if (*command == '\0') command = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
227 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
228 if (dialog->pounce == NULL) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
229 dialog->pounce = gaim_pounce_new(GAIM_GNT_UI, dialog->account, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
230 name, events, options); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
231 } else { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
232 gaim_pounce_set_events(dialog->pounce, events); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
233 gaim_pounce_set_options(dialog->pounce, options); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
234 gaim_pounce_set_pouncer(dialog->pounce, dialog->account); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
235 gaim_pounce_set_pouncee(dialog->pounce, name); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
236 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
237 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
238 /* Actions */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
239 gaim_pounce_action_set_enabled(dialog->pounce, "open-window", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
240 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->open_win))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
241 gaim_pounce_action_set_enabled(dialog->pounce, "popup-notify", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
242 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->popup))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
243 gaim_pounce_action_set_enabled(dialog->pounce, "send-message", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
244 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->send_msg))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
245 gaim_pounce_action_set_enabled(dialog->pounce, "execute-command", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
246 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->exec_cmd))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
247 gaim_pounce_action_set_enabled(dialog->pounce, "play-beep", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
248 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->play_sound))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
249 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
250 gaim_pounce_action_set_attribute(dialog->pounce, "send-message", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
251 "message", message); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
252 gaim_pounce_action_set_attribute(dialog->pounce, "execute-command", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
253 "command", command); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
254 gaim_pounce_action_set_attribute(dialog->pounce, "popup-notify", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
255 "reason", reason); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
256 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
257 /* Set the defaults for next time. */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
258 gaim_prefs_set_bool("/gaim/gnt/pounces/default_actions/open-window", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
259 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->open_win))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
260 gaim_prefs_set_bool("/gaim/gnt/pounces/default_actions/popup-notify", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
261 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->popup))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
262 gaim_prefs_set_bool("/gaim/gnt/pounces/default_actions/send-message", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
263 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->send_msg))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
264 gaim_prefs_set_bool("/gaim/gnt/pounces/default_actions/execute-command", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
265 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->exec_cmd))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
266 gaim_prefs_set_bool("/gaim/gnt/pounces/default_actions/play-beep", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
267 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->play_sound))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
268 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
269 gaim_pounce_set_save(dialog->pounce, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
270 gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->save_pounce))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
271 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
272 gaim_pounce_set_pouncer(dialog->pounce, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
273 (GaimAccount *)gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->account_menu))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
274 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
275 update_pounces(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
276 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
277 gnt_widget_destroy(dialog->window); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
278 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
279 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
280 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
281 void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
282 gg_pounce_editor_show(GaimAccount *account, const char *name, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
283 GaimPounce *cur_pounce) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
284 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
285 GaimGntPounceDialog *dialog; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
286 GntWidget *window; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
287 GntWidget *bbox; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
288 GntWidget *hbox; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
289 GntWidget *button; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
290 GntWidget *combo; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
291 GList *list; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
292 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
293 g_return_if_fail((cur_pounce != NULL) || |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
294 (account != NULL) || |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
295 (gaim_accounts_get_all() != NULL)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
296 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
297 dialog = g_new0(GaimGntPounceDialog, 1); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
298 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
299 if (cur_pounce != NULL) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
300 dialog->pounce = cur_pounce; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
301 dialog->account = gaim_pounce_get_pouncer(cur_pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
302 } else if (account != NULL) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
303 dialog->pounce = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
304 dialog->account = account; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
305 } else { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
306 GList *connections = gaim_connections_get_all(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
307 GaimConnection *gc; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
308 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
309 if (connections != NULL) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
310 gc = (GaimConnection *)connections->data; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
311 dialog->account = gaim_connection_get_account(gc); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
312 } else |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
313 dialog->account = gaim_accounts_get_all()->data; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
314 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
315 dialog->pounce = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
316 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
317 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
318 /* Create the window. */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
319 dialog->window = window = gnt_vbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
320 gnt_box_set_pad(GNT_BOX(window), 0); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
321 gnt_box_set_toplevel(GNT_BOX(window), TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
322 gnt_box_set_alignment(GNT_BOX(window), GNT_ALIGN_LEFT); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
323 gnt_box_set_title(GNT_BOX(window), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
324 (cur_pounce == NULL |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
325 ? _("New Buddy Pounce") : _("Edit Buddy Pounce"))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
326 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
327 g_signal_connect(G_OBJECT(window), "destroy", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
328 G_CALLBACK(delete_win_cb), dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
329 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
330 gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Pounce Who"), GNT_TEXT_FLAG_BOLD)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
331 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
332 /* Account: */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
333 gnt_box_add_widget(GNT_BOX(window), gnt_label_new(_("Account:"))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
334 dialog->account_menu = combo = gnt_combo_box_new(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
335 list = gaim_accounts_get_all(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
336 for (; list; list = list->next) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
337 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
338 GaimAccount *account; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
339 char *text; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
340 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
341 account = list->data; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
342 text = g_strdup_printf("%s (%s)", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
343 gaim_account_get_username(account), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
344 gaim_account_get_protocol_name(account)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
345 gnt_combo_box_add_data(GNT_COMBO_BOX(combo), account, text); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
346 g_free(text); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
347 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
348 if (dialog->account) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
349 gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), dialog->account); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
350 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
351 gnt_box_add_widget(GNT_BOX(window), combo); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
352 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
353 /* Buddy: */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
354 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
355 gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Buddy name:"))); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
356 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
357 dialog->buddy_entry = gnt_entry_new(NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
358 gnt_box_add_widget(GNT_BOX(hbox), dialog->buddy_entry); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
359 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
360 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
361 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
362 if (cur_pounce != NULL) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
363 gnt_entry_set_text(GNT_ENTRY(dialog->buddy_entry), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
364 gaim_pounce_get_pouncee(cur_pounce)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
365 } else if (name != NULL) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
366 gnt_entry_set_text(GNT_ENTRY(dialog->buddy_entry), name); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
367 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
368 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
369 gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
370 gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Pounce When Buddy..."), GNT_TEXT_FLAG_BOLD)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
371 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
372 dialog->signon = gnt_check_box_new(_("Signs on")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
373 dialog->signoff = gnt_check_box_new(_("Signs off")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
374 dialog->away = gnt_check_box_new(_("Goes away")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
375 dialog->away_return = gnt_check_box_new(_("Returns from away")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
376 dialog->idle = gnt_check_box_new(_("Becomes idle")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
377 dialog->idle_return = gnt_check_box_new(_("Is no longer idle")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
378 dialog->typing = gnt_check_box_new(_("Starts typing")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
379 dialog->typed = gnt_check_box_new(_("Pauses while typing")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
380 dialog->stop_typing = gnt_check_box_new(_("Stops typing")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
381 dialog->message_recv = gnt_check_box_new(_("Sends a message")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
382 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
383 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
384 gnt_box_set_pad(GNT_BOX(hbox), 2); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
385 gnt_box_add_widget(GNT_BOX(hbox), dialog->signon); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
386 gnt_box_add_widget(GNT_BOX(hbox), dialog->signoff); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
387 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
388 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
389 gnt_box_set_pad(GNT_BOX(hbox), 2); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
390 gnt_box_add_widget(GNT_BOX(hbox), dialog->away); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
391 gnt_box_add_widget(GNT_BOX(hbox), dialog->away_return); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
392 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
393 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
394 gnt_box_set_pad(GNT_BOX(hbox), 2); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
395 gnt_box_add_widget(GNT_BOX(hbox), dialog->idle); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
396 gnt_box_add_widget(GNT_BOX(hbox), dialog->idle_return); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
397 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
398 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
399 gnt_box_set_pad(GNT_BOX(hbox), 2); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
400 gnt_box_add_widget(GNT_BOX(hbox), dialog->typing); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
401 gnt_box_add_widget(GNT_BOX(hbox), dialog->typed); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
402 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
403 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
404 gnt_box_set_pad(GNT_BOX(hbox), 2); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
405 gnt_box_add_widget(GNT_BOX(hbox), dialog->stop_typing); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
406 gnt_box_add_widget(GNT_BOX(hbox), dialog->message_recv); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
407 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
408 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
409 /* Create the "Action" frame. */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
410 gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
411 gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Action"), GNT_TEXT_FLAG_BOLD)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
412 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
413 dialog->open_win = gnt_check_box_new(_("Open an IM window")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
414 dialog->popup = gnt_check_box_new(_("Pop up a notification")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
415 dialog->send_msg = gnt_check_box_new(_("Send a message")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
416 dialog->exec_cmd = gnt_check_box_new(_("Execute a command")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
417 dialog->play_sound = gnt_check_box_new(_("Play a sound")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
418 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
419 dialog->send_msg_entry = gnt_entry_new(NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
420 dialog->exec_cmd_entry = gnt_entry_new(NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
421 dialog->popup_entry = gnt_entry_new(NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
422 dialog->exec_cmd_entry = gnt_entry_new(NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
423 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
424 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
425 gnt_box_add_widget(GNT_BOX(hbox), dialog->open_win); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
426 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
427 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
428 gnt_box_add_widget(GNT_BOX(hbox), dialog->popup); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
429 gnt_box_add_widget(GNT_BOX(hbox), dialog->popup_entry); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
430 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
431 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
432 gnt_box_add_widget(GNT_BOX(hbox), dialog->send_msg); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
433 gnt_box_add_widget(GNT_BOX(hbox), dialog->send_msg_entry); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
434 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
435 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
436 gnt_box_add_widget(GNT_BOX(hbox), dialog->exec_cmd); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
437 gnt_box_add_widget(GNT_BOX(hbox), dialog->exec_cmd_entry); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
438 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
439 hbox = gnt_hbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
440 gnt_box_add_widget(GNT_BOX(hbox), dialog->play_sound); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
441 gnt_box_add_widget(GNT_BOX(window), hbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
442 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
443 gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
444 gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Options"), GNT_TEXT_FLAG_BOLD)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
445 dialog->on_away = gnt_check_box_new(_("Pounce only when my status is not available")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
446 gnt_box_add_widget(GNT_BOX(window), dialog->on_away); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
447 dialog->save_pounce = gnt_check_box_new(_("Recurring")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
448 gnt_box_add_widget(GNT_BOX(window), dialog->save_pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
449 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
450 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
451 gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
452 /* Now the button box! */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
453 bbox = gnt_hbox_new(TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
454 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
455 /* Cancel button */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
456 button = gnt_button_new(_("Cancel")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
457 gnt_box_add_widget(GNT_BOX(bbox), button); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
458 g_signal_connect(G_OBJECT(button), "activate", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
459 G_CALLBACK(cancel_cb), dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
460 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
461 /* Save button */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
462 dialog->save_button = button = gnt_button_new(_("Save")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
463 gnt_box_add_widget(GNT_BOX(bbox), button); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
464 g_signal_connect(G_OBJECT(button), "activate", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
465 G_CALLBACK(save_pounce_cb), dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
466 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
467 gnt_box_add_widget(GNT_BOX(window), bbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
468 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
469 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
470 /* Set the values of stuff. */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
471 if (cur_pounce != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
472 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
473 GaimPounceEvent events = gaim_pounce_get_events(cur_pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
474 GaimPounceOption options = gaim_pounce_get_options(cur_pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
475 const char *value; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
476 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
477 /* Options */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
478 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->on_away), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
479 (options & GAIM_POUNCE_OPTION_AWAY)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
480 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
481 /* Events */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
482 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->signon), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
483 (events & GAIM_POUNCE_SIGNON)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
484 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->signoff), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
485 (events & GAIM_POUNCE_SIGNOFF)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
486 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->away), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
487 (events & GAIM_POUNCE_AWAY)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
488 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->away_return), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
489 (events & GAIM_POUNCE_AWAY_RETURN)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
490 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->idle), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
491 (events & GAIM_POUNCE_IDLE)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
492 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->idle_return), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
493 (events & GAIM_POUNCE_IDLE_RETURN)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
494 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->typing), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
495 (events & GAIM_POUNCE_TYPING)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
496 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->typed), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
497 (events & GAIM_POUNCE_TYPED)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
498 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->stop_typing), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
499 (events & GAIM_POUNCE_TYPING_STOPPED)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
500 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->message_recv), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
501 (events & GAIM_POUNCE_MESSAGE_RECEIVED)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
502 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
503 /* Actions */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
504 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->open_win), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
505 gaim_pounce_action_is_enabled(cur_pounce, "open-window")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
506 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->popup), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
507 gaim_pounce_action_is_enabled(cur_pounce, "popup-notify")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
508 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->send_msg), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
509 gaim_pounce_action_is_enabled(cur_pounce, "send-message")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
510 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->exec_cmd), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
511 gaim_pounce_action_is_enabled(cur_pounce, "execute-command")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
512 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->play_sound), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
513 gaim_pounce_action_is_enabled(cur_pounce, "play-beep")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
514 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
515 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->save_pounce), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
516 gaim_pounce_get_save(cur_pounce)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
517 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
518 if ((value = gaim_pounce_action_get_attribute(cur_pounce, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
519 "send-message", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
520 "message")) != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
521 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
522 gnt_entry_set_text(GNT_ENTRY(dialog->send_msg_entry), value); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
523 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
524 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
525 if ((value = gaim_pounce_action_get_attribute(cur_pounce, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
526 "popup-notify", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
527 "reason")) != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
528 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
529 gnt_entry_set_text(GNT_ENTRY(dialog->popup_entry), value); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
530 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
531 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
532 if ((value = gaim_pounce_action_get_attribute(cur_pounce, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
533 "execute-command", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
534 "command")) != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
535 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
536 gnt_entry_set_text(GNT_ENTRY(dialog->exec_cmd_entry), value); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
537 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
538 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
539 else |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
540 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
541 GaimBuddy *buddy = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
542 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
543 if (name != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
544 buddy = gaim_find_buddy(account, name); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
545 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
546 /* Set some defaults */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
547 if (buddy == NULL) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
548 gnt_check_box_set_checked( |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
549 GNT_CHECK_BOX(dialog->signon), TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
550 } else { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
551 if (!GAIM_BUDDY_IS_ONLINE(buddy)) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
552 gnt_check_box_set_checked( |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
553 GNT_CHECK_BOX(dialog->signon), TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
554 } else { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
555 gboolean default_set = FALSE; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
556 GaimPresence *presence = gaim_buddy_get_presence(buddy); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
557 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
558 if (gaim_presence_is_idle(presence)) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
559 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
560 gnt_check_box_set_checked( |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
561 GNT_CHECK_BOX(dialog->idle_return), TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
562 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
563 default_set = TRUE; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
564 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
565 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
566 if (!gaim_presence_is_available(presence)) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
567 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
568 gnt_check_box_set_checked( |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
569 GNT_CHECK_BOX(dialog->away_return), TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
570 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
571 default_set = TRUE; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
572 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
573 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
574 if (!default_set) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
575 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
576 gnt_check_box_set_checked( |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
577 GNT_CHECK_BOX(dialog->signon), TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
578 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
579 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
580 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
581 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
582 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->open_win), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
583 gaim_prefs_get_bool("/gaim/gnt/pounces/default_actions/open-window")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
584 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->popup), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
585 gaim_prefs_get_bool("/gaim/gnt/pounces/default_actions/popup-notify")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
586 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->send_msg), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
587 gaim_prefs_get_bool("/gaim/gnt/pounces/default_actions/send-message")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
588 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->exec_cmd), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
589 gaim_prefs_get_bool("/gaim/gnt/pounces/default_actions/execute-command")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
590 gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->play_sound), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
591 gaim_prefs_get_bool("/gaim/gnt/pounces/default_actions/play-beep")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
592 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
593 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
594 gnt_widget_show(window); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
595 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
596 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
597 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
598 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
599 static gboolean |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
600 pounces_manager_destroy_cb(GntWidget *widget, gpointer user_data) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
601 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
602 PouncesManager *dialog = user_data; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
603 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
604 dialog->window = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
605 gg_pounces_manager_hide(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
606 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
607 return FALSE; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
608 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
609 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
610 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
611 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
612 pounces_manager_add_cb(GntButton *button, gpointer user_data) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
613 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
614 gg_pounce_editor_show(NULL, NULL, NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
615 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
616 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
617 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
618 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
619 pounces_manager_modify_cb(GntButton *button, gpointer user_data) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
620 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
621 PouncesManager *dialog = user_data; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
622 GaimPounce *pounce = gnt_tree_get_selection_data(GNT_TREE(dialog->tree)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
623 gg_pounce_editor_show(NULL, NULL, pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
624 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
625 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
626 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
627 pounces_manager_delete_confirm_cb(GaimPounce *pounce) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
628 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
629 gnt_tree_remove(GNT_TREE(pounces_manager->tree), pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
630 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
631 gaim_request_close_with_handle(pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
632 gaim_pounce_destroy(pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
633 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
634 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
635 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
636 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
637 pounces_manager_delete_cb(GntButton *button, gpointer user_data) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
638 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
639 PouncesManager *dialog = user_data; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
640 GaimPounce *pounce; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
641 GaimAccount *account; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
642 const char *pouncer, *pouncee; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
643 char *buf; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
644 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
645 pounce = (GaimPounce *)gnt_tree_get_selection_data(GNT_TREE(dialog->tree)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
646 account = gaim_pounce_get_pouncer(pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
647 pouncer = gaim_account_get_username(account); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
648 pouncee = gaim_pounce_get_pouncee(pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
649 buf = g_strdup_printf(_("Are you sure you want to delete the pounce on %s for %s?"), pouncee, pouncer); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
650 gaim_request_action(pounce, NULL, buf, NULL, 0, pounce, 2, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
651 _("Delete"), pounces_manager_delete_confirm_cb, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
652 _("Cancel"), NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
653 g_free(buf); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
654 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
655 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
656 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
657 pounces_manager_close_cb(GntButton *button, gpointer user_data) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
658 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
659 gg_pounces_manager_hide(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
660 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
661 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
662 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
663 void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
664 gg_pounces_manager_show(void) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
665 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
666 PouncesManager *dialog; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
667 GntWidget *bbox; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
668 GntWidget *button; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
669 GntWidget *tree; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
670 GntWidget *win; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
671 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
672 if (pounces_manager != NULL) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
673 return; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
674 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
675 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
676 pounces_manager = dialog = g_new0(PouncesManager, 1); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
677 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
678 dialog->window = win = gnt_vbox_new(FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
679 gnt_box_set_toplevel(GNT_BOX(win), TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
680 gnt_box_set_title(GNT_BOX(win), _("Buddy Pounces")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
681 gnt_box_set_pad(GNT_BOX(win), 0); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
682 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
683 g_signal_connect(G_OBJECT(win), "destroy", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
684 G_CALLBACK(pounces_manager_destroy_cb), dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
685 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
686 /* List of saved buddy pounces */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
687 dialog->tree = tree = GNT_WIDGET(gnt_tree_new_with_columns(2)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
688 gnt_tree_set_column_titles(GNT_TREE(tree), "Account", "Pouncee", NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
689 gnt_tree_set_show_title(GNT_TREE(tree), TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
690 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
691 gnt_box_add_widget(GNT_BOX(win), tree); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
692 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
693 /* Button box. */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
694 bbox = gnt_hbox_new(TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
695 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
696 /* Add button */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
697 button = gnt_button_new(_("Add")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
698 gnt_box_add_widget(GNT_BOX(bbox), button); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
699 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
700 g_signal_connect(G_OBJECT(button), "activate", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
701 G_CALLBACK(pounces_manager_add_cb), dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
702 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
703 /* Modify button */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
704 button = gnt_button_new(_("Modify")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
705 dialog->modify_button = button; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
706 gnt_box_add_widget(GNT_BOX(bbox), button); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
707 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
708 g_signal_connect(G_OBJECT(button), "activate", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
709 G_CALLBACK(pounces_manager_modify_cb), dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
710 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
711 /* Delete button */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
712 button = gnt_button_new(_("Delete")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
713 dialog->delete_button = button; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
714 gnt_box_add_widget(GNT_BOX(bbox), button); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
715 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
716 g_signal_connect(G_OBJECT(button), "activate", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
717 G_CALLBACK(pounces_manager_delete_cb), dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
718 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
719 /* Close button */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
720 button = gnt_button_new(_("Close")); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
721 gnt_box_add_widget(GNT_BOX(bbox), button); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
722 gnt_widget_show(button); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
723 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
724 g_signal_connect(G_OBJECT(button), "activate", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
725 G_CALLBACK(pounces_manager_close_cb), dialog); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
726 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
727 gnt_box_add_widget(GNT_BOX(win), bbox); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
728 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
729 gnt_widget_show(win); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
730 populate_pounces_list(pounces_manager); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
731 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
732 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
733 void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
734 gg_pounces_manager_hide(void) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
735 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
736 if (pounces_manager == NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
737 return; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
738 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
739 if (pounces_manager->window != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
740 gnt_widget_destroy(pounces_manager->window); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
741 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
742 gaim_signals_disconnect_by_handle(pounces_manager); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
743 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
744 g_free(pounces_manager); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
745 pounces_manager = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
746 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
747 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
748 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
749 pounce_cb(GaimPounce *pounce, GaimPounceEvent events, void *data) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
750 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
751 GaimConversation *conv; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
752 GaimAccount *account; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
753 GaimBuddy *buddy; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
754 const char *pouncee; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
755 const char *alias; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
756 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
757 pouncee = gaim_pounce_get_pouncee(pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
758 account = gaim_pounce_get_pouncer(pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
759 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
760 buddy = gaim_find_buddy(account, pouncee); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
761 if (buddy != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
762 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
763 alias = gaim_buddy_get_alias(buddy); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
764 if (alias == NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
765 alias = pouncee; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
766 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
767 else |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
768 alias = pouncee; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
769 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
770 if (gaim_pounce_action_is_enabled(pounce, "open-window")) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
771 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
772 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, pouncee, account); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
773 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
774 if (conv == NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
775 conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, pouncee); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
776 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
777 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
778 if (gaim_pounce_action_is_enabled(pounce, "popup-notify")) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
779 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
780 char *tmp; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
781 const char *name_shown; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
782 const char *reason; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
783 reason = gaim_pounce_action_get_attribute(pounce, "popup-notify", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
784 "reason"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
785 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
786 /* |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
787 * Here we place the protocol name in the pounce dialog to lessen |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
788 * confusion about what protocol a pounce is for. |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
789 */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
790 tmp = g_strdup_printf( |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
791 (events & GAIM_POUNCE_TYPING) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
792 _("%s has started typing to you (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
793 (events & GAIM_POUNCE_TYPED) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
794 _("%s has paused while typing to you (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
795 (events & GAIM_POUNCE_SIGNON) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
796 _("%s has signed on (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
797 (events & GAIM_POUNCE_IDLE_RETURN) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
798 _("%s has returned from being idle (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
799 (events & GAIM_POUNCE_AWAY_RETURN) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
800 _("%s has returned from being away (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
801 (events & GAIM_POUNCE_TYPING_STOPPED) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
802 _("%s has stopped typing to you (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
803 (events & GAIM_POUNCE_SIGNOFF) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
804 _("%s has signed off (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
805 (events & GAIM_POUNCE_IDLE) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
806 _("%s has become idle (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
807 (events & GAIM_POUNCE_AWAY) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
808 _("%s has gone away. (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
809 (events & GAIM_POUNCE_MESSAGE_RECEIVED) ? |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
810 _("%s has sent you a message. (%s)") : |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
811 _("Unknown pounce event. Please report this!"), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
812 alias, gaim_account_get_protocol_name(account)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
813 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
814 /* |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
815 * Ok here is where I change the second argument, title, from |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
816 * NULL to the account alias if we have it or the account |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
817 * name if that's all we have |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
818 */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
819 if ((name_shown = gaim_account_get_alias(account)) == NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
820 name_shown = gaim_account_get_username(account); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
821 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
822 if (reason == NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
823 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
824 gaim_notify_info(NULL, name_shown, tmp, gaim_date_format_full(NULL)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
825 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
826 else |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
827 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
828 char *tmp2 = g_strdup_printf("%s\n\n%s", reason, gaim_date_format_full(NULL)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
829 gaim_notify_info(NULL, name_shown, tmp, tmp2); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
830 g_free(tmp2); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
831 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
832 g_free(tmp); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
833 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
834 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
835 if (gaim_pounce_action_is_enabled(pounce, "send-message")) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
836 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
837 const char *message; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
838 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
839 message = gaim_pounce_action_get_attribute(pounce, "send-message", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
840 "message"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
841 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
842 if (message != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
843 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
844 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, pouncee, account); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
845 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
846 if (conv == NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
847 conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, pouncee); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
848 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
849 gaim_conversation_write(conv, NULL, message, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
850 GAIM_MESSAGE_SEND, time(NULL)); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
851 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
852 serv_send_im(account->gc, (char *)pouncee, (char *)message, 0); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
853 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
854 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
855 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
856 if (gaim_pounce_action_is_enabled(pounce, "execute-command")) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
857 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
858 const char *command; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
859 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
860 command = gaim_pounce_action_get_attribute(pounce, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
861 "execute-command", "command"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
862 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
863 if (command != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
864 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
865 char *localecmd = g_locale_from_utf8(command, -1, NULL, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
866 NULL, NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
867 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
868 if (localecmd != NULL) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
869 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
870 int pid = fork(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
871 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
872 if (pid == 0) { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
873 char *args[4]; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
874 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
875 args[0] = "sh"; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
876 args[1] = "-c"; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
877 args[2] = (char *)localecmd; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
878 args[3] = NULL; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
879 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
880 execvp(args[0], args); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
881 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
882 _exit(0); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
883 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
884 g_free(localecmd); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
885 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
886 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
887 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
888 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
889 if (gaim_pounce_action_is_enabled(pounce, "play-beep")) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
890 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
891 beep(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
892 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
893 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
894 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
895 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
896 free_pounce(GaimPounce *pounce) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
897 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
898 update_pounces(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
899 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
900 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
901 static void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
902 new_pounce(GaimPounce *pounce) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
903 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
904 gaim_pounce_action_register(pounce, "open-window"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
905 gaim_pounce_action_register(pounce, "popup-notify"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
906 gaim_pounce_action_register(pounce, "send-message"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
907 gaim_pounce_action_register(pounce, "execute-command"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
908 gaim_pounce_action_register(pounce, "play-beep"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
909 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
910 update_pounces(); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
911 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
912 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
913 void * |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
914 gg_pounces_get_handle() |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
915 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
916 static int handle; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
917 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
918 return &handle; |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
919 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
920 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
921 void |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
922 gg_pounces_init(void) |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
923 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
924 gaim_pounces_register_handler(GAIM_GNT_UI, pounce_cb, new_pounce, |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
925 free_pounce); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
926 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
927 gaim_prefs_add_none("/gaim/gnt/pounces"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
928 gaim_prefs_add_none("/gaim/gnt/pounces/default_actions"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
929 gaim_prefs_add_bool("/gaim/gnt/pounces/default_actions/open-window", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
930 FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
931 gaim_prefs_add_bool("/gaim/gnt/pounces/default_actions/popup-notify", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
932 TRUE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
933 gaim_prefs_add_bool("/gaim/gnt/pounces/default_actions/send-message", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
934 FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
935 gaim_prefs_add_bool("/gaim/gnt/pounces/default_actions/execute-command", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
936 FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
937 gaim_prefs_add_bool("/gaim/gnt/pounces/default_actions/play-beep", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
938 FALSE); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
939 gaim_prefs_add_none("/gaim/gnt/pounces/dialog"); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
940 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
941 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
942 gg_pounces_get_handle(), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
943 GAIM_CALLBACK(signed_on_off_cb), NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
944 gaim_signal_connect(gaim_connections_get_handle(), "signed-off", |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
945 gg_pounces_get_handle(), |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
946 GAIM_CALLBACK(signed_on_off_cb), NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
947 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
948 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
949 /* XXX: There's no such thing in pidgin. Perhaps there should be? */ |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
950 void gg_pounces_uninit() |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
951 { |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
952 gaim_pounces_register_handler(GAIM_GNT_UI, NULL, NULL, NULL); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
953 |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
954 gaim_signals_disconnect_by_handle(gg_pounces_get_handle()); |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
955 } |
704d40050800
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
956 |