Sat, 17 Nov 2007 00:12:30 +0000
This merge has the effect of reverting the hinting code from trunk.
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
1 | /** |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
2 | * @file gntpounce.c GNT Buddy Pounce API |
|
16255
fa61ee19f526
Rename the Doxygen group from gntui to finch and define the finch group
Richard Laager <rlaager@pidgin.im>
parents:
15931
diff
changeset
|
3 | * @ingroup finch |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | /* finch |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
7 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15906
diff
changeset
|
8 | * Finch is the legal property of its developers, whose names are too numerous |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
10 | * source distribution. |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
11 | * |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
12 | * This program is free software; you can redistribute it and/or modify |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
13 | * it under the terms of the GNU General Public License as published by |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
14 | * the Free Software Foundation; either version 2 of the License, or |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
15 | * (at your option) any later version. |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
16 | * |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
17 | * This program is distributed in the hope that it will be useful, |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
20 | * GNU General Public License for more details. |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
21 | * |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
22 | * You should have received a copy of the GNU General Public License |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
23 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19554
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
25 | * |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
26 | */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
27 | #include <gnt.h> |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
28 | #include <gntbox.h> |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
29 | #include <gntbutton.h> |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
30 | #include <gntcheckbox.h> |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
31 | #include <gntcombobox.h> |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
32 | #include <gntentry.h> |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
33 | #include <gntlabel.h> |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
34 | #include <gntline.h> |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
35 | #include <gnttree.h> |
|
18763
7731e1028071
Add utility function to trigger some button when some key is pressed with
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18400
diff
changeset
|
36 | #include <gntutils.h> |
|
7731e1028071
Add utility function to trigger some button when some key is pressed with
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18400
diff
changeset
|
37 | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
38 | #include "internal.h" |
| 15884 | 39 | #include "finch.h" |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
40 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
41 | #include "account.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
42 | #include "conversation.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
43 | #include "debug.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
44 | #include "notify.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
45 | #include "prpl.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
46 | #include "request.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
47 | #include "server.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
48 | #include "util.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
49 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
50 | #include "gntpounce.h" |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
51 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
52 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
53 | typedef struct |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
54 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
55 | /* Pounce data */ |
| 15884 | 56 | PurplePounce *pounce; |
| 57 | PurpleAccount *account; | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
58 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
59 | /* The window */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
60 | GntWidget *window; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
61 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
62 | /* Pounce on Whom */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
63 | GntWidget *account_menu; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
64 | GntWidget *buddy_entry; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
65 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
66 | /* Pounce options */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
67 | GntWidget *on_away; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
68 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
69 | /* Pounce When Buddy... */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
70 | GntWidget *signon; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
71 | GntWidget *signoff; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
72 | GntWidget *away; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
73 | GntWidget *away_return; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
74 | GntWidget *idle; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
75 | GntWidget *idle_return; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
76 | GntWidget *typing; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
77 | GntWidget *typed; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
78 | GntWidget *stop_typing; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
79 | GntWidget *message_recv; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
80 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
81 | /* Action */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
82 | GntWidget *open_win; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
83 | GntWidget *popup; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
84 | GntWidget *popup_entry; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
85 | GntWidget *send_msg; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
86 | GntWidget *send_msg_entry; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
87 | GntWidget *exec_cmd; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
88 | GntWidget *exec_cmd_entry; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
89 | GntWidget *play_sound; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
90 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
91 | GntWidget *save_pounce; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
92 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
93 | /* Buttons */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
94 | GntWidget *save_button; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
95 | |
| 15884 | 96 | } PurpleGntPounceDialog; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
97 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
98 | typedef struct |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
99 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
100 | GntWidget *window; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
101 | GntWidget *tree; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
102 | GntWidget *modify_button; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
103 | GntWidget *delete_button; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
104 | } PouncesManager; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
105 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
106 | static PouncesManager *pounces_manager = NULL; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
107 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
108 | /************************************************************************** |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
109 | * Callbacks |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
110 | **************************************************************************/ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
111 | static gint |
| 15884 | 112 | delete_win_cb(GntWidget *w, PurpleGntPounceDialog *dialog) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
113 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
114 | gnt_widget_destroy(dialog->window); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
115 | g_free(dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
116 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
117 | return TRUE; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
118 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
119 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
120 | static void |
| 15884 | 121 | cancel_cb(GntWidget *w, PurpleGntPounceDialog *dialog) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
122 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
123 | gnt_widget_destroy(dialog->window); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
124 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
125 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
126 | static void |
| 15884 | 127 | add_pounce_to_treeview(GntTree *tree, PurplePounce *pounce) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
128 | { |
| 15884 | 129 | PurpleAccount *account; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
130 | const char *pouncer; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
131 | const char *pouncee; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
132 | |
| 15884 | 133 | account = purple_pounce_get_pouncer(pounce); |
| 134 | pouncer = purple_account_get_username(account); | |
| 135 | pouncee = purple_pounce_get_pouncee(pounce); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
136 | gnt_tree_add_row_last(tree, pounce, |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
137 | gnt_tree_create_row(tree, pouncer, pouncee), NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
138 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
139 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
140 | static void |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
141 | populate_pounces_list(PouncesManager *dialog) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
142 | { |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
143 | GList *pounces; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
144 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
145 | gnt_tree_remove_all(GNT_TREE(dialog->tree)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
146 | |
|
18209
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18190
diff
changeset
|
147 | for (pounces = purple_pounces_get_all_for_ui(FINCH_UI); pounces != NULL; |
|
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18190
diff
changeset
|
148 | pounces = g_list_delete_link(pounces, pounces)) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
149 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
150 | add_pounce_to_treeview(GNT_TREE(dialog->tree), pounces->data); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
151 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
152 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
153 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
154 | static void |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
155 | update_pounces(void) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
156 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
157 | /* Rebuild the pounces list if the pounces manager is open */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
158 | if (pounces_manager != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
159 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
160 | populate_pounces_list(pounces_manager); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
161 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
162 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
163 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
164 | static void |
| 15884 | 165 | signed_on_off_cb(PurpleConnection *gc, gpointer user_data) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
166 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
167 | update_pounces(); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
168 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
169 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
170 | static void |
|
21269
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
171 | setup_buddy_list_suggestion(GntEntry *entry, gboolean offline) |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
172 | { |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
173 | PurpleBlistNode *node = purple_blist_get_root(); |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
174 | for (; node; node = purple_blist_node_next(node, offline)) { |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
175 | if (!PURPLE_BLIST_NODE_IS_BUDDY(node)) |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
176 | continue; |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
177 | gnt_entry_add_suggest(entry, purple_buddy_get_name((PurpleBuddy*)node)); |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
178 | } |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
179 | } |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
180 | |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
181 | static void |
| 15884 | 182 | save_pounce_cb(GntWidget *w, PurpleGntPounceDialog *dialog) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
183 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
184 | const char *name; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
185 | const char *message, *command, *reason; |
| 15884 | 186 | PurplePounceEvent events = PURPLE_POUNCE_NONE; |
| 187 | PurplePounceOption options = PURPLE_POUNCE_OPTION_NONE; | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
188 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
189 | name = gnt_entry_get_text(GNT_ENTRY(dialog->buddy_entry)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
190 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
191 | if (*name == '\0') |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
192 | { |
| 15884 | 193 | purple_notify_error(NULL, NULL, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
194 | _("Please enter a buddy to pounce."), NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
195 | return; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
196 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
197 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
198 | /* Options */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
199 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->on_away))) |
| 15884 | 200 | options |= PURPLE_POUNCE_OPTION_AWAY; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
201 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
202 | /* Events */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
203 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->signon))) |
| 15884 | 204 | events |= PURPLE_POUNCE_SIGNON; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
205 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
206 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->signoff))) |
| 15884 | 207 | events |= PURPLE_POUNCE_SIGNOFF; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
208 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
209 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->away))) |
| 15884 | 210 | events |= PURPLE_POUNCE_AWAY; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
211 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
212 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->away_return))) |
| 15884 | 213 | events |= PURPLE_POUNCE_AWAY_RETURN; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
214 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
215 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->idle))) |
| 15884 | 216 | events |= PURPLE_POUNCE_IDLE; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
217 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
218 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->idle_return))) |
| 15884 | 219 | events |= PURPLE_POUNCE_IDLE_RETURN; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
220 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
221 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->typing))) |
| 15884 | 222 | events |= PURPLE_POUNCE_TYPING; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
223 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
224 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->typed))) |
| 15884 | 225 | events |= PURPLE_POUNCE_TYPED; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
226 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
227 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->stop_typing))) |
| 15884 | 228 | events |= PURPLE_POUNCE_TYPING_STOPPED; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
229 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
230 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->message_recv))) |
| 15884 | 231 | events |= PURPLE_POUNCE_MESSAGE_RECEIVED; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
232 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
233 | /* Data fields */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
234 | message = gnt_entry_get_text(GNT_ENTRY(dialog->send_msg_entry)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
235 | command = gnt_entry_get_text(GNT_ENTRY(dialog->exec_cmd_entry)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
236 | reason = gnt_entry_get_text(GNT_ENTRY(dialog->popup_entry)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
237 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
238 | if (*reason == '\0') reason = NULL; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
239 | if (*message == '\0') message = NULL; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
240 | if (*command == '\0') command = NULL; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
241 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
242 | if (dialog->pounce == NULL) { |
| 15884 | 243 | dialog->pounce = purple_pounce_new(FINCH_UI, dialog->account, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
244 | name, events, options); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
245 | } else { |
| 15884 | 246 | purple_pounce_set_events(dialog->pounce, events); |
| 247 | purple_pounce_set_options(dialog->pounce, options); | |
| 248 | purple_pounce_set_pouncer(dialog->pounce, dialog->account); | |
| 249 | purple_pounce_set_pouncee(dialog->pounce, name); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
250 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
251 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
252 | /* Actions */ |
| 15884 | 253 | purple_pounce_action_set_enabled(dialog->pounce, "open-window", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
254 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->open_win))); |
| 15884 | 255 | purple_pounce_action_set_enabled(dialog->pounce, "popup-notify", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
256 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->popup))); |
| 15884 | 257 | purple_pounce_action_set_enabled(dialog->pounce, "send-message", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
258 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->send_msg))); |
| 15884 | 259 | purple_pounce_action_set_enabled(dialog->pounce, "execute-command", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
260 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->exec_cmd))); |
| 15884 | 261 | purple_pounce_action_set_enabled(dialog->pounce, "play-beep", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
262 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->play_sound))); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
263 | |
| 15884 | 264 | purple_pounce_action_set_attribute(dialog->pounce, "send-message", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
265 | "message", message); |
| 15884 | 266 | purple_pounce_action_set_attribute(dialog->pounce, "execute-command", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
267 | "command", command); |
| 15884 | 268 | purple_pounce_action_set_attribute(dialog->pounce, "popup-notify", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
269 | "reason", reason); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
270 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
271 | /* Set the defaults for next time. */ |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
272 | purple_prefs_set_bool("/finch/pounces/default_actions/open-window", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
273 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->open_win))); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
274 | purple_prefs_set_bool("/finch/pounces/default_actions/popup-notify", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
275 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->popup))); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
276 | purple_prefs_set_bool("/finch/pounces/default_actions/send-message", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
277 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->send_msg))); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
278 | purple_prefs_set_bool("/finch/pounces/default_actions/execute-command", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
279 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->exec_cmd))); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
280 | purple_prefs_set_bool("/finch/pounces/default_actions/play-beep", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
281 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->play_sound))); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
282 | |
| 15884 | 283 | purple_pounce_set_save(dialog->pounce, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
284 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->save_pounce))); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
285 | |
| 15884 | 286 | purple_pounce_set_pouncer(dialog->pounce, |
| 287 | (PurpleAccount *)gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->account_menu))); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
288 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
289 | update_pounces(); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
290 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
291 | gnt_widget_destroy(dialog->window); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
292 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
293 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
294 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
295 | void |
| 15884 | 296 | finch_pounce_editor_show(PurpleAccount *account, const char *name, |
| 297 | PurplePounce *cur_pounce) | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
298 | { |
| 15884 | 299 | PurpleGntPounceDialog *dialog; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
300 | GntWidget *window; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
301 | GntWidget *bbox; |
|
16366
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
302 | GntWidget *hbox, *vbox; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
303 | GntWidget *button; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
304 | GntWidget *combo; |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
305 | GList *list; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
306 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
307 | g_return_if_fail((cur_pounce != NULL) || |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
308 | (account != NULL) || |
| 15884 | 309 | (purple_accounts_get_all() != NULL)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
310 | |
| 15884 | 311 | dialog = g_new0(PurpleGntPounceDialog, 1); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
312 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
313 | if (cur_pounce != NULL) { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
314 | dialog->pounce = cur_pounce; |
| 15884 | 315 | dialog->account = purple_pounce_get_pouncer(cur_pounce); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
316 | } else if (account != NULL) { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
317 | dialog->pounce = NULL; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
318 | dialog->account = account; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
319 | } else { |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
320 | GList *connections = purple_connections_get_all(); |
| 15884 | 321 | PurpleConnection *gc; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
322 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
323 | if (connections != NULL) { |
| 15884 | 324 | gc = (PurpleConnection *)connections->data; |
| 325 | dialog->account = purple_connection_get_account(gc); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
326 | } else |
| 15884 | 327 | dialog->account = purple_accounts_get_all()->data; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
328 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
329 | dialog->pounce = NULL; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
330 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
331 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
332 | /* Create the window. */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
333 | dialog->window = window = gnt_vbox_new(FALSE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
334 | gnt_box_set_pad(GNT_BOX(window), 0); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
335 | gnt_box_set_toplevel(GNT_BOX(window), TRUE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
336 | gnt_box_set_alignment(GNT_BOX(window), GNT_ALIGN_LEFT); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
337 | gnt_box_set_title(GNT_BOX(window), |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
338 | (cur_pounce == NULL |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
339 | ? _("New Buddy Pounce") : _("Edit Buddy Pounce"))); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
340 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
341 | g_signal_connect(G_OBJECT(window), "destroy", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
342 | G_CALLBACK(delete_win_cb), dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
343 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
344 | gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Pounce Who"), GNT_TEXT_FLAG_BOLD)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
345 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
346 | /* Account: */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
347 | gnt_box_add_widget(GNT_BOX(window), gnt_label_new(_("Account:"))); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
348 | dialog->account_menu = combo = gnt_combo_box_new(); |
| 15884 | 349 | list = purple_accounts_get_all(); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
350 | for (; list; list = list->next) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
351 | { |
| 15884 | 352 | PurpleAccount *account; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
353 | char *text; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
354 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
355 | account = list->data; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
356 | text = g_strdup_printf("%s (%s)", |
| 15884 | 357 | purple_account_get_username(account), |
| 358 | purple_account_get_protocol_name(account)); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
359 | gnt_combo_box_add_data(GNT_COMBO_BOX(combo), account, text); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
360 | g_free(text); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
361 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
362 | if (dialog->account) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
363 | gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), dialog->account); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
364 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
365 | gnt_box_add_widget(GNT_BOX(window), combo); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
366 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
367 | /* Buddy: */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
368 | hbox = gnt_hbox_new(FALSE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
369 | gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Buddy name:"))); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
370 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
371 | dialog->buddy_entry = gnt_entry_new(NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
372 | gnt_box_add_widget(GNT_BOX(hbox), dialog->buddy_entry); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
373 | |
|
21269
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
374 | setup_buddy_list_suggestion(GNT_ENTRY(dialog->buddy_entry), TRUE); |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
375 | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
376 | gnt_box_add_widget(GNT_BOX(window), hbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
377 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
378 | if (cur_pounce != NULL) { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
379 | gnt_entry_set_text(GNT_ENTRY(dialog->buddy_entry), |
| 15884 | 380 | purple_pounce_get_pouncee(cur_pounce)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
381 | } else if (name != NULL) { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
382 | gnt_entry_set_text(GNT_ENTRY(dialog->buddy_entry), name); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
383 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
384 | |
|
16366
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
385 | /* Create the event frame */ |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
386 | gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
387 | gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Pounce When Buddy..."), GNT_TEXT_FLAG_BOLD)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
388 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
389 | dialog->signon = gnt_check_box_new(_("Signs on")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
390 | dialog->signoff = gnt_check_box_new(_("Signs off")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
391 | dialog->away = gnt_check_box_new(_("Goes away")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
392 | dialog->away_return = gnt_check_box_new(_("Returns from away")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
393 | dialog->idle = gnt_check_box_new(_("Becomes idle")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
394 | dialog->idle_return = gnt_check_box_new(_("Is no longer idle")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
395 | dialog->typing = gnt_check_box_new(_("Starts typing")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
396 | dialog->typed = gnt_check_box_new(_("Pauses while typing")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
397 | dialog->stop_typing = gnt_check_box_new(_("Stops typing")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
398 | dialog->message_recv = gnt_check_box_new(_("Sends a message")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
399 | |
|
16366
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
400 | hbox = gnt_hbox_new(TRUE); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
401 | gnt_box_set_pad(GNT_BOX(hbox), 2); |
|
16366
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
402 | |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
403 | vbox = gnt_vbox_new(FALSE); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
404 | gnt_box_set_pad(GNT_BOX(vbox), 0); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
405 | gnt_box_add_widget(GNT_BOX(hbox), vbox); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
406 | |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
407 | gnt_box_add_widget(GNT_BOX(vbox), dialog->signon); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
408 | gnt_box_add_widget(GNT_BOX(vbox), dialog->away); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
409 | gnt_box_add_widget(GNT_BOX(vbox), dialog->idle); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
410 | gnt_box_add_widget(GNT_BOX(vbox), dialog->typing); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
411 | gnt_box_add_widget(GNT_BOX(vbox), dialog->stop_typing); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
412 | |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
413 | vbox = gnt_vbox_new(FALSE); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
414 | gnt_box_set_pad(GNT_BOX(vbox), 0); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
415 | gnt_box_add_widget(GNT_BOX(hbox), vbox); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
416 | |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
417 | gnt_box_add_widget(GNT_BOX(vbox), dialog->signoff); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
418 | gnt_box_add_widget(GNT_BOX(vbox), dialog->away_return); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
419 | gnt_box_add_widget(GNT_BOX(vbox), dialog->idle_return); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
420 | gnt_box_add_widget(GNT_BOX(vbox), dialog->typed); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
421 | gnt_box_add_widget(GNT_BOX(vbox), dialog->message_recv); |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
422 | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
423 | gnt_box_add_widget(GNT_BOX(window), hbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
424 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
425 | /* Create the "Action" frame. */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
426 | gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
427 | gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Action"), GNT_TEXT_FLAG_BOLD)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
428 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
429 | dialog->open_win = gnt_check_box_new(_("Open an IM window")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
430 | dialog->popup = gnt_check_box_new(_("Pop up a notification")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
431 | dialog->send_msg = gnt_check_box_new(_("Send a message")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
432 | dialog->exec_cmd = gnt_check_box_new(_("Execute a command")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
433 | dialog->play_sound = gnt_check_box_new(_("Play a sound")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
434 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
435 | dialog->send_msg_entry = gnt_entry_new(NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
436 | dialog->exec_cmd_entry = gnt_entry_new(NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
437 | dialog->popup_entry = gnt_entry_new(NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
438 | dialog->exec_cmd_entry = gnt_entry_new(NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
439 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
440 | hbox = gnt_hbox_new(FALSE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
441 | gnt_box_add_widget(GNT_BOX(hbox), dialog->open_win); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
442 | gnt_box_add_widget(GNT_BOX(window), hbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
443 | hbox = gnt_hbox_new(FALSE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
444 | gnt_box_add_widget(GNT_BOX(hbox), dialog->popup); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
445 | gnt_box_add_widget(GNT_BOX(hbox), dialog->popup_entry); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
446 | gnt_box_add_widget(GNT_BOX(window), hbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
447 | hbox = gnt_hbox_new(FALSE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
448 | gnt_box_add_widget(GNT_BOX(hbox), dialog->send_msg); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
449 | gnt_box_add_widget(GNT_BOX(hbox), dialog->send_msg_entry); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
450 | gnt_box_add_widget(GNT_BOX(window), hbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
451 | hbox = gnt_hbox_new(FALSE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
452 | gnt_box_add_widget(GNT_BOX(hbox), dialog->exec_cmd); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
453 | gnt_box_add_widget(GNT_BOX(hbox), dialog->exec_cmd_entry); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
454 | gnt_box_add_widget(GNT_BOX(window), hbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
455 | hbox = gnt_hbox_new(FALSE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
456 | gnt_box_add_widget(GNT_BOX(hbox), dialog->play_sound); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
457 | gnt_box_add_widget(GNT_BOX(window), hbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
458 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
459 | gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
460 | gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Options"), GNT_TEXT_FLAG_BOLD)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
461 | dialog->on_away = gnt_check_box_new(_("Pounce only when my status is not available")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
462 | gnt_box_add_widget(GNT_BOX(window), dialog->on_away); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
463 | dialog->save_pounce = gnt_check_box_new(_("Recurring")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
464 | gnt_box_add_widget(GNT_BOX(window), dialog->save_pounce); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
465 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
466 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
467 | gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
468 | /* Now the button box! */ |
|
19554
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
469 | bbox = gnt_hbox_new(FALSE); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
470 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
471 | /* Cancel button */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
472 | button = gnt_button_new(_("Cancel")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
473 | gnt_box_add_widget(GNT_BOX(bbox), button); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
474 | g_signal_connect(G_OBJECT(button), "activate", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
475 | G_CALLBACK(cancel_cb), dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
476 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
477 | /* Save button */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
478 | dialog->save_button = button = gnt_button_new(_("Save")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
479 | gnt_box_add_widget(GNT_BOX(bbox), button); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
480 | g_signal_connect(G_OBJECT(button), "activate", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
481 | G_CALLBACK(save_pounce_cb), dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
482 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
483 | gnt_box_add_widget(GNT_BOX(window), bbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
484 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
485 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
486 | /* Set the values of stuff. */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
487 | if (cur_pounce != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
488 | { |
| 15884 | 489 | PurplePounceEvent events = purple_pounce_get_events(cur_pounce); |
| 490 | PurplePounceOption options = purple_pounce_get_options(cur_pounce); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
491 | const char *value; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
492 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
493 | /* Options */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
494 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->on_away), |
| 15884 | 495 | (options & PURPLE_POUNCE_OPTION_AWAY)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
496 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
497 | /* Events */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
498 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->signon), |
| 15884 | 499 | (events & PURPLE_POUNCE_SIGNON)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
500 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->signoff), |
| 15884 | 501 | (events & PURPLE_POUNCE_SIGNOFF)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
502 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->away), |
| 15884 | 503 | (events & PURPLE_POUNCE_AWAY)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
504 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->away_return), |
| 15884 | 505 | (events & PURPLE_POUNCE_AWAY_RETURN)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
506 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->idle), |
| 15884 | 507 | (events & PURPLE_POUNCE_IDLE)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
508 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->idle_return), |
| 15884 | 509 | (events & PURPLE_POUNCE_IDLE_RETURN)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
510 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->typing), |
| 15884 | 511 | (events & PURPLE_POUNCE_TYPING)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
512 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->typed), |
| 15884 | 513 | (events & PURPLE_POUNCE_TYPED)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
514 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->stop_typing), |
| 15884 | 515 | (events & PURPLE_POUNCE_TYPING_STOPPED)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
516 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->message_recv), |
| 15884 | 517 | (events & PURPLE_POUNCE_MESSAGE_RECEIVED)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
518 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
519 | /* Actions */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
520 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->open_win), |
| 15884 | 521 | purple_pounce_action_is_enabled(cur_pounce, "open-window")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
522 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->popup), |
| 15884 | 523 | purple_pounce_action_is_enabled(cur_pounce, "popup-notify")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
524 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->send_msg), |
| 15884 | 525 | purple_pounce_action_is_enabled(cur_pounce, "send-message")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
526 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->exec_cmd), |
| 15884 | 527 | purple_pounce_action_is_enabled(cur_pounce, "execute-command")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
528 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->play_sound), |
| 15884 | 529 | purple_pounce_action_is_enabled(cur_pounce, "play-beep")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
530 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
531 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->save_pounce), |
| 15884 | 532 | purple_pounce_get_save(cur_pounce)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
533 | |
| 15884 | 534 | if ((value = purple_pounce_action_get_attribute(cur_pounce, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
535 | "send-message", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
536 | "message")) != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
537 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
538 | gnt_entry_set_text(GNT_ENTRY(dialog->send_msg_entry), value); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
539 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
540 | |
| 15884 | 541 | if ((value = purple_pounce_action_get_attribute(cur_pounce, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
542 | "popup-notify", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
543 | "reason")) != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
544 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
545 | gnt_entry_set_text(GNT_ENTRY(dialog->popup_entry), value); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
546 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
547 | |
| 15884 | 548 | if ((value = purple_pounce_action_get_attribute(cur_pounce, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
549 | "execute-command", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
550 | "command")) != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
551 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
552 | gnt_entry_set_text(GNT_ENTRY(dialog->exec_cmd_entry), value); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
553 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
554 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
555 | else |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
556 | { |
| 15884 | 557 | PurpleBuddy *buddy = NULL; |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
558 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
559 | if (name != NULL) |
| 15884 | 560 | buddy = purple_find_buddy(account, name); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
561 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
562 | /* Set some defaults */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
563 | if (buddy == NULL) { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
564 | gnt_check_box_set_checked( |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
565 | GNT_CHECK_BOX(dialog->signon), TRUE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
566 | } else { |
| 15884 | 567 | if (!PURPLE_BUDDY_IS_ONLINE(buddy)) { |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
568 | gnt_check_box_set_checked( |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
569 | GNT_CHECK_BOX(dialog->signon), TRUE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
570 | } else { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
571 | gboolean default_set = FALSE; |
| 15884 | 572 | PurplePresence *presence = purple_buddy_get_presence(buddy); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
573 | |
| 15884 | 574 | if (purple_presence_is_idle(presence)) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
575 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
576 | gnt_check_box_set_checked( |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
577 | GNT_CHECK_BOX(dialog->idle_return), TRUE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
578 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
579 | default_set = TRUE; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
580 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
581 | |
| 15884 | 582 | if (!purple_presence_is_available(presence)) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
583 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
584 | gnt_check_box_set_checked( |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
585 | GNT_CHECK_BOX(dialog->away_return), TRUE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
586 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
587 | default_set = TRUE; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
588 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
589 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
590 | if (!default_set) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
591 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
592 | gnt_check_box_set_checked( |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
593 | GNT_CHECK_BOX(dialog->signon), TRUE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
594 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
595 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
596 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
597 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
598 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->open_win), |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
599 | purple_prefs_get_bool("/finch/pounces/default_actions/open-window")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
600 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->popup), |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
601 | purple_prefs_get_bool("/finch/pounces/default_actions/popup-notify")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
602 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->send_msg), |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
603 | purple_prefs_get_bool("/finch/pounces/default_actions/send-message")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
604 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->exec_cmd), |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
605 | purple_prefs_get_bool("/finch/pounces/default_actions/execute-command")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
606 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->play_sound), |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
607 | purple_prefs_get_bool("/finch/pounces/default_actions/play-beep")); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
608 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
609 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
610 | gnt_widget_show(window); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
611 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
612 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
613 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
614 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
615 | static gboolean |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
616 | pounces_manager_destroy_cb(GntWidget *widget, gpointer user_data) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
617 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
618 | PouncesManager *dialog = user_data; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
619 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
620 | dialog->window = NULL; |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
621 | finch_pounces_manager_hide(); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
622 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
623 | return FALSE; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
624 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
625 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
626 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
627 | static void |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
628 | pounces_manager_add_cb(GntButton *button, gpointer user_data) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
629 | { |
|
19554
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
630 | if (purple_accounts_get_all() == NULL) { |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
631 | purple_notify_error(NULL, _("Cannot create pounce"), |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
632 | _("You do not have any accounts."), |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
633 | _("You must create an account first before you can create a pounce.")); |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
634 | return; |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
635 | } |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
636 | finch_pounce_editor_show(NULL, NULL, NULL); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
637 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
638 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
639 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
640 | static void |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
641 | pounces_manager_modify_cb(GntButton *button, gpointer user_data) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
642 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
643 | PouncesManager *dialog = user_data; |
| 15884 | 644 | PurplePounce *pounce = gnt_tree_get_selection_data(GNT_TREE(dialog->tree)); |
|
19554
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
645 | if (pounce) |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
646 | finch_pounce_editor_show(NULL, NULL, pounce); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
647 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
648 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
649 | static void |
| 15884 | 650 | pounces_manager_delete_confirm_cb(PurplePounce *pounce) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
651 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
652 | gnt_tree_remove(GNT_TREE(pounces_manager->tree), pounce); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
653 | |
| 15884 | 654 | purple_request_close_with_handle(pounce); |
| 655 | purple_pounce_destroy(pounce); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
656 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
657 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
658 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
659 | static void |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
660 | pounces_manager_delete_cb(GntButton *button, gpointer user_data) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
661 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
662 | PouncesManager *dialog = user_data; |
| 15884 | 663 | PurplePounce *pounce; |
| 664 | PurpleAccount *account; | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
665 | const char *pouncer, *pouncee; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
666 | char *buf; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
667 | |
| 15884 | 668 | pounce = (PurplePounce *)gnt_tree_get_selection_data(GNT_TREE(dialog->tree)); |
|
19554
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
669 | if (pounce == NULL) |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
670 | return; |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
671 | |
| 15884 | 672 | account = purple_pounce_get_pouncer(pounce); |
| 673 | pouncer = purple_account_get_username(account); | |
| 674 | pouncee = purple_pounce_get_pouncee(pounce); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
675 | buf = g_strdup_printf(_("Are you sure you want to delete the pounce on %s for %s?"), pouncee, pouncer); |
|
21175
c6d76b49c206
disapproval of revision '8ba833993a115415727bb1b70362e0bd1603c169'
Richard Laager <rlaager@pidgin.im>
parents:
21174
diff
changeset
|
676 | purple_request_action(pounce, NULL, buf, NULL, 0, |
|
16490
68c22924d66b
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
Evan Schoenberg <evands@pidgin.im>
parents:
16478
diff
changeset
|
677 | account, pouncee, NULL, |
|
21175
c6d76b49c206
disapproval of revision '8ba833993a115415727bb1b70362e0bd1603c169'
Richard Laager <rlaager@pidgin.im>
parents:
21174
diff
changeset
|
678 | pounce, 2, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
679 | _("Delete"), pounces_manager_delete_confirm_cb, |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
680 | _("Cancel"), NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
681 | g_free(buf); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
682 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
683 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
684 | static void |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
685 | pounces_manager_close_cb(GntButton *button, gpointer user_data) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
686 | { |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
687 | finch_pounces_manager_hide(); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
688 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
689 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
690 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
691 | void |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
692 | finch_pounces_manager_show(void) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
693 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
694 | PouncesManager *dialog; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
695 | GntWidget *bbox; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
696 | GntWidget *button; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
697 | GntWidget *tree; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
698 | GntWidget *win; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
699 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
700 | if (pounces_manager != NULL) { |
|
18400
549820f4725c
If the action-windows are already there, then bring them to front when
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18209
diff
changeset
|
701 | gnt_window_present(pounces_manager->window); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
702 | return; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
703 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
704 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
705 | pounces_manager = dialog = g_new0(PouncesManager, 1); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
706 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
707 | dialog->window = win = gnt_vbox_new(FALSE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
708 | gnt_box_set_toplevel(GNT_BOX(win), TRUE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
709 | gnt_box_set_title(GNT_BOX(win), _("Buddy Pounces")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
710 | gnt_box_set_pad(GNT_BOX(win), 0); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
711 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
712 | g_signal_connect(G_OBJECT(win), "destroy", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
713 | G_CALLBACK(pounces_manager_destroy_cb), dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
714 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
715 | /* List of saved buddy pounces */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
716 | dialog->tree = tree = GNT_WIDGET(gnt_tree_new_with_columns(2)); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
717 | gnt_tree_set_column_titles(GNT_TREE(tree), "Account", "Pouncee", NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
718 | gnt_tree_set_show_title(GNT_TREE(tree), TRUE); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
719 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
720 | gnt_box_add_widget(GNT_BOX(win), tree); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
721 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
722 | /* Button box. */ |
|
19554
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
723 | bbox = gnt_hbox_new(FALSE); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
724 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
725 | /* Add button */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
726 | button = gnt_button_new(_("Add")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
727 | gnt_box_add_widget(GNT_BOX(bbox), button); |
|
18763
7731e1028071
Add utility function to trigger some button when some key is pressed with
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18400
diff
changeset
|
728 | gnt_util_set_trigger_widget(tree, GNT_KEY_INS, button); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
729 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
730 | g_signal_connect(G_OBJECT(button), "activate", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
731 | G_CALLBACK(pounces_manager_add_cb), dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
732 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
733 | /* Modify button */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
734 | button = gnt_button_new(_("Modify")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
735 | dialog->modify_button = button; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
736 | gnt_box_add_widget(GNT_BOX(bbox), button); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
737 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
738 | g_signal_connect(G_OBJECT(button), "activate", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
739 | G_CALLBACK(pounces_manager_modify_cb), dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
740 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
741 | /* Delete button */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
742 | button = gnt_button_new(_("Delete")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
743 | dialog->delete_button = button; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
744 | gnt_box_add_widget(GNT_BOX(bbox), button); |
|
18763
7731e1028071
Add utility function to trigger some button when some key is pressed with
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18400
diff
changeset
|
745 | gnt_util_set_trigger_widget(tree, GNT_KEY_DEL, button); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
746 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
747 | g_signal_connect(G_OBJECT(button), "activate", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
748 | G_CALLBACK(pounces_manager_delete_cb), dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
749 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
750 | /* Close button */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
751 | button = gnt_button_new(_("Close")); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
752 | gnt_box_add_widget(GNT_BOX(bbox), button); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
753 | gnt_widget_show(button); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
754 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
755 | g_signal_connect(G_OBJECT(button), "activate", |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
756 | G_CALLBACK(pounces_manager_close_cb), dialog); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
757 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
758 | gnt_box_add_widget(GNT_BOX(win), bbox); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
759 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
760 | gnt_widget_show(win); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
761 | populate_pounces_list(pounces_manager); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
762 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
763 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
764 | void |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
765 | finch_pounces_manager_hide(void) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
766 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
767 | if (pounces_manager == NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
768 | return; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
769 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
770 | if (pounces_manager->window != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
771 | gnt_widget_destroy(pounces_manager->window); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
772 | |
| 15884 | 773 | purple_signals_disconnect_by_handle(pounces_manager); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
774 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
775 | g_free(pounces_manager); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
776 | pounces_manager = NULL; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
777 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
778 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
779 | static void |
| 15884 | 780 | pounce_cb(PurplePounce *pounce, PurplePounceEvent events, void *data) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
781 | { |
| 15884 | 782 | PurpleConversation *conv; |
| 783 | PurpleAccount *account; | |
| 784 | PurpleBuddy *buddy; | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
785 | const char *pouncee; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
786 | const char *alias; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
787 | |
| 15884 | 788 | pouncee = purple_pounce_get_pouncee(pounce); |
| 789 | account = purple_pounce_get_pouncer(pounce); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
790 | |
| 15884 | 791 | buddy = purple_find_buddy(account, pouncee); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
792 | if (buddy != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
793 | { |
| 15884 | 794 | alias = purple_buddy_get_alias(buddy); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
795 | if (alias == NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
796 | alias = pouncee; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
797 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
798 | else |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
799 | alias = pouncee; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
800 | |
| 15884 | 801 | if (purple_pounce_action_is_enabled(pounce, "open-window")) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
802 | { |
| 15884 | 803 | conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, pouncee, account); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
804 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
805 | if (conv == NULL) |
| 15884 | 806 | conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
807 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
808 | |
| 15884 | 809 | if (purple_pounce_action_is_enabled(pounce, "popup-notify")) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
810 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
811 | char *tmp; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
812 | const char *name_shown; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
813 | const char *reason; |
| 15884 | 814 | reason = purple_pounce_action_get_attribute(pounce, "popup-notify", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
815 | "reason"); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
816 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
817 | /* |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
818 | * Here we place the protocol name in the pounce dialog to lessen |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
819 | * confusion about what protocol a pounce is for. |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
820 | */ |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
821 | tmp = g_strdup_printf( |
| 15884 | 822 | (events & PURPLE_POUNCE_TYPING) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
823 | _("%s has started typing to you (%s)") : |
| 15884 | 824 | (events & PURPLE_POUNCE_TYPED) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
825 | _("%s has paused while typing to you (%s)") : |
| 15884 | 826 | (events & PURPLE_POUNCE_SIGNON) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
827 | _("%s has signed on (%s)") : |
| 15884 | 828 | (events & PURPLE_POUNCE_IDLE_RETURN) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
829 | _("%s has returned from being idle (%s)") : |
| 15884 | 830 | (events & PURPLE_POUNCE_AWAY_RETURN) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
831 | _("%s has returned from being away (%s)") : |
| 15884 | 832 | (events & PURPLE_POUNCE_TYPING_STOPPED) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
833 | _("%s has stopped typing to you (%s)") : |
| 15884 | 834 | (events & PURPLE_POUNCE_SIGNOFF) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
835 | _("%s has signed off (%s)") : |
| 15884 | 836 | (events & PURPLE_POUNCE_IDLE) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
837 | _("%s has become idle (%s)") : |
| 15884 | 838 | (events & PURPLE_POUNCE_AWAY) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
839 | _("%s has gone away. (%s)") : |
| 15884 | 840 | (events & PURPLE_POUNCE_MESSAGE_RECEIVED) ? |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
841 | _("%s has sent you a message. (%s)") : |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
842 | _("Unknown pounce event. Please report this!"), |
| 15884 | 843 | alias, purple_account_get_protocol_name(account)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
844 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
845 | /* |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
846 | * Ok here is where I change the second argument, title, from |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
847 | * NULL to the account alias if we have it or the account |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
848 | * name if that's all we have |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
849 | */ |
| 15884 | 850 | if ((name_shown = purple_account_get_alias(account)) == NULL) |
| 851 | name_shown = purple_account_get_username(account); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
852 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
853 | if (reason == NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
854 | { |
| 15884 | 855 | purple_notify_info(NULL, name_shown, tmp, purple_date_format_full(NULL)); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
856 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
857 | else |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
858 | { |
| 15884 | 859 | char *tmp2 = g_strdup_printf("%s\n\n%s", reason, purple_date_format_full(NULL)); |
| 860 | purple_notify_info(NULL, name_shown, tmp, tmp2); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
861 | g_free(tmp2); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
862 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
863 | g_free(tmp); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
864 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
865 | |
| 15884 | 866 | if (purple_pounce_action_is_enabled(pounce, "send-message")) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
867 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
868 | const char *message; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
869 | |
| 15884 | 870 | message = purple_pounce_action_get_attribute(pounce, "send-message", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
871 | "message"); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
872 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
873 | if (message != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
874 | { |
| 15884 | 875 | conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, pouncee, account); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
876 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
877 | if (conv == NULL) |
| 15884 | 878 | conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
879 | |
| 15884 | 880 | purple_conversation_write(conv, NULL, message, |
| 881 | PURPLE_MESSAGE_SEND, time(NULL)); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
882 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
883 | serv_send_im(account->gc, (char *)pouncee, (char *)message, 0); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
884 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
885 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
886 | |
| 15884 | 887 | if (purple_pounce_action_is_enabled(pounce, "execute-command")) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
888 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
889 | const char *command; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
890 | |
| 15884 | 891 | command = purple_pounce_action_get_attribute(pounce, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
892 | "execute-command", "command"); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
893 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
894 | if (command != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
895 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
896 | char *localecmd = g_locale_from_utf8(command, -1, NULL, |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
897 | NULL, NULL); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
898 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
899 | if (localecmd != NULL) |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
900 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
901 | int pid = fork(); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
902 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
903 | if (pid == 0) { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
904 | char *args[4]; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
905 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
906 | args[0] = "sh"; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
907 | args[1] = "-c"; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
908 | args[2] = (char *)localecmd; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
909 | args[3] = NULL; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
910 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
911 | execvp(args[0], args); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
912 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
913 | _exit(0); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
914 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
915 | g_free(localecmd); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
916 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
917 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
918 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
919 | |
| 15884 | 920 | if (purple_pounce_action_is_enabled(pounce, "play-beep")) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
921 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
922 | beep(); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
923 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
924 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
925 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
926 | static void |
| 15884 | 927 | free_pounce(PurplePounce *pounce) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
928 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
929 | update_pounces(); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
930 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
931 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
932 | static void |
| 15884 | 933 | new_pounce(PurplePounce *pounce) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
934 | { |
| 15884 | 935 | purple_pounce_action_register(pounce, "open-window"); |
| 936 | purple_pounce_action_register(pounce, "popup-notify"); | |
| 937 | purple_pounce_action_register(pounce, "send-message"); | |
| 938 | purple_pounce_action_register(pounce, "execute-command"); | |
| 939 | purple_pounce_action_register(pounce, "play-beep"); | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
940 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
941 | update_pounces(); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
942 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
943 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
944 | void * |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
945 | finch_pounces_get_handle() |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
946 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
947 | static int handle; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
948 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
949 | return &handle; |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
950 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
951 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
952 | void |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
953 | finch_pounces_init(void) |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
954 | { |
| 15884 | 955 | purple_pounces_register_handler(FINCH_UI, pounce_cb, new_pounce, |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
956 | free_pounce); |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
957 | |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
958 | purple_prefs_add_none("/finch/pounces"); |
|
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
959 | purple_prefs_add_none("/finch/pounces/default_actions"); |
|
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
960 | purple_prefs_add_bool("/finch/pounces/default_actions/open-window", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
961 | FALSE); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
962 | purple_prefs_add_bool("/finch/pounces/default_actions/popup-notify", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
963 | TRUE); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
964 | purple_prefs_add_bool("/finch/pounces/default_actions/send-message", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
965 | FALSE); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
966 | purple_prefs_add_bool("/finch/pounces/default_actions/execute-command", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
967 | FALSE); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
968 | purple_prefs_add_bool("/finch/pounces/default_actions/play-beep", |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
969 | FALSE); |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16366
diff
changeset
|
970 | purple_prefs_add_none("/finch/pounces/dialog"); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
971 | |
| 15884 | 972 | purple_signal_connect(purple_connections_get_handle(), "signed-on", |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
973 | finch_pounces_get_handle(), |
| 15884 | 974 | PURPLE_CALLBACK(signed_on_off_cb), NULL); |
| 975 | purple_signal_connect(purple_connections_get_handle(), "signed-off", | |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
976 | finch_pounces_get_handle(), |
| 15884 | 977 | PURPLE_CALLBACK(signed_on_off_cb), NULL); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
978 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
979 | |
|
20191
40912174d904
applied changes from 2dc8fc60a9db3bce83fb319e9406ec3c01575911
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
980 | static void |
|
40912174d904
applied changes from 2dc8fc60a9db3bce83fb319e9406ec3c01575911
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
981 | dummy_pounce_cb(PurplePounce *pounce, PurplePounceEvent events, void *data) |
|
40912174d904
applied changes from 2dc8fc60a9db3bce83fb319e9406ec3c01575911
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
982 | { |
|
40912174d904
applied changes from 2dc8fc60a9db3bce83fb319e9406ec3c01575911
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
983 | } |
|
40912174d904
applied changes from 2dc8fc60a9db3bce83fb319e9406ec3c01575911
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
984 | |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
985 | /* XXX: There's no such thing in pidgin. Perhaps there should be? */ |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
986 | void finch_pounces_uninit() |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
987 | { |
|
20191
40912174d904
applied changes from 2dc8fc60a9db3bce83fb319e9406ec3c01575911
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20147
diff
changeset
|
988 | purple_pounces_register_handler(FINCH_UI, dummy_pounce_cb, NULL, NULL); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
989 | |
| 15884 | 990 | purple_signals_disconnect_by_handle(finch_pounces_get_handle()); |
|
15564
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
991 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
992 |