Sat, 15 Aug 2020 23:33:09 -0500
Fix Finch for the libgnt single header file
Fix finch for the gnt.h single include header
Testing Done:
Compiled on linux and ran finch-docs.
Reviewed at https://reviews.imfreedom.org/r/70/
|
39887
9c8f874c74a0
Clean up all of the license headers
Gary Kramlich <grim@reaperworld.com>
parents:
39665
diff
changeset
|
1 | /* |
|
9c8f874c74a0
Clean up all of the license headers
Gary Kramlich <grim@reaperworld.com>
parents:
39665
diff
changeset
|
2 | * 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
|
3 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15906
diff
changeset
|
4 | * 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
|
5 | * 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
|
6 | * 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
|
7 | * |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
8 | * 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
|
9 | * 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
|
10 | * 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
|
11 | * (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
|
12 | * |
|
61befe113a13
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 | * 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
|
14 | * 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
|
15 | * 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
|
16 | * 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
|
17 | * |
|
61befe113a13
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 | * 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
|
19 | * 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
|
20 | * 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
|
21 | */ |
|
39887
9c8f874c74a0
Clean up all of the license headers
Gary Kramlich <grim@reaperworld.com>
parents:
39665
diff
changeset
|
22 | |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40359
diff
changeset
|
23 | #include <glib/gi18n-lib.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40359
diff
changeset
|
24 | |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40359
diff
changeset
|
25 | #include <purple.h> |
|
29106
51c7b2177e42
Fix all the remaining files for which internal.h doesn't end up being the first include.
Paul Aurich <darkrain42@pidgin.im>
parents:
27829
diff
changeset
|
26 | |
|
39362
3e92f470c176
Add explicit ncurses dependency to finch.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38240
diff
changeset
|
27 | #include NCURSES_HEADER |
|
3e92f470c176
Add explicit ncurses dependency to finch.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38240
diff
changeset
|
28 | |
|
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
|
29 | #include <gnt.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
|
30 | |
| 15884 | 31 | #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
|
32 | |
|
61befe113a13
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 "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
|
34 | |
|
61befe113a13
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 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
36 | 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
|
37 | { |
|
61befe113a13
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 | /* Pounce data */ |
| 15884 | 39 | PurplePounce *pounce; |
| 40 | 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
|
41 | |
|
61befe113a13
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 | /* 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
|
43 | 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
|
44 | |
|
61befe113a13
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 | /* 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
|
46 | 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
|
47 | 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
|
48 | |
|
61befe113a13
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 | /* 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
|
50 | 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
|
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 | /* 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
|
53 | 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
|
54 | 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
|
55 | 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
|
56 | 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
|
57 | 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
|
58 | 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
|
59 | 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
|
60 | 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
|
61 | 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
|
62 | 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
|
63 | |
|
61befe113a13
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 | /* 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
|
65 | 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
|
66 | 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
|
67 | 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
|
68 | 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
|
69 | 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
|
70 | 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
|
71 | 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
|
72 | |
|
61befe113a13
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 *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
|
74 | |
|
61befe113a13
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 | /* 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
|
76 | 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
|
77 | |
| 15884 | 78 | } 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
|
79 | |
|
61befe113a13
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 | 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
|
81 | { |
|
61befe113a13
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 *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
|
83 | 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
|
84 | 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
|
85 | 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
|
86 | } 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
|
87 | |
|
61befe113a13
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 | 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
|
89 | |
|
61befe113a13
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 | * 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
|
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 | static gint |
| 15884 | 94 | 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
|
95 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
96 | 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
|
97 | 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
|
98 | |
|
61befe113a13
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 | 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
|
100 | } |
|
61befe113a13
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 | |
|
61befe113a13
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 | static void |
| 15884 | 103 | 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
|
104 | { |
|
61befe113a13
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 | 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
|
106 | } |
|
61befe113a13
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 | static void |
| 15884 | 109 | 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
|
110 | { |
| 15884 | 111 | 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
|
112 | 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
|
113 | 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
|
114 | |
| 15884 | 115 | account = purple_pounce_get_pouncer(pounce); |
| 116 | pouncer = purple_account_get_username(account); | |
| 117 | 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
|
118 | 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
|
119 | 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
|
120 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
121 | |
|
61befe113a13
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 | 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
|
123 | 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
|
124 | { |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
125 | 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
|
126 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
127 | 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
|
128 | |
|
18209
5f63822878eb
Fix #1574. (Pidgin and Finch show each other's pounces, interact in
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18190
diff
changeset
|
129 | 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
|
130 | 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
|
131 | { |
|
61befe113a13
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 | 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
|
133 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
134 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
135 | |
|
61befe113a13
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 | 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
|
137 | 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
|
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 | /* 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
|
140 | 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
|
141 | { |
|
61befe113a13
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 | 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
|
143 | } |
|
61befe113a13
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 | |
|
61befe113a13
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 | static void |
| 15884 | 147 | 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
|
148 | { |
|
61befe113a13
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 | 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
|
150 | } |
|
61befe113a13
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 | static void |
|
21269
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
153 | 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
|
154 | { |
|
39665
2172e3b8eeef
Rename some buddy list accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39362
diff
changeset
|
155 | PurpleBlistNode *node = purple_blist_get_default_root(); |
|
21269
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
156 | for (; node; node = purple_blist_node_next(node, offline)) { |
|
34696
6e0d13978666
Global replace to use GObject-style macros. See details.
Ankit Vani <a@nevitus.org>
parents:
34658
diff
changeset
|
157 | if (!PURPLE_IS_BUDDY(node)) |
|
21269
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
158 | continue; |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
159 | 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
|
160 | } |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
161 | } |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
162 | |
|
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
163 | static void |
| 15884 | 164 | 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
|
165 | { |
|
61befe113a13
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 | 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
|
167 | const char *message, *command, *reason; |
| 15884 | 168 | PurplePounceEvent events = PURPLE_POUNCE_NONE; |
| 169 | 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
|
170 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
171 | 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
|
172 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
173 | 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
|
174 | { |
| 15884 | 175 | purple_notify_error(NULL, NULL, |
|
34449
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
176 | _("Please enter a buddy to pounce."), 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
|
177 | 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
|
178 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
179 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
180 | /* 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
|
181 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->on_away))) |
| 15884 | 182 | 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
|
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 | /* 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
|
185 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->signon))) |
| 15884 | 186 | 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
|
187 | |
|
61befe113a13
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 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->signoff))) |
| 15884 | 189 | 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
|
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 (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->away))) |
| 15884 | 192 | 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
|
193 | |
|
61befe113a13
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 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->away_return))) |
| 15884 | 195 | 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
|
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 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->idle))) |
| 15884 | 198 | 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
|
199 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
200 | if (gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->idle_return))) |
| 15884 | 201 | 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
|
202 | |
|
61befe113a13
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->typing))) |
| 15884 | 204 | 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
|
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->typed))) |
| 15884 | 207 | 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
|
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->stop_typing))) |
| 15884 | 210 | 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
|
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->message_recv))) |
| 15884 | 213 | 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
|
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 | /* 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
|
216 | 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
|
217 | 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
|
218 | 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
|
219 | |
|
61befe113a13
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 | 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
|
221 | 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
|
222 | 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
|
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 (dialog->pounce == NULL) { |
| 15884 | 225 | 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
|
226 | 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
|
227 | } else { |
| 15884 | 228 | purple_pounce_set_events(dialog->pounce, events); |
| 229 | purple_pounce_set_options(dialog->pounce, options); | |
| 230 | purple_pounce_set_pouncer(dialog->pounce, dialog->account); | |
| 231 | 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
|
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 | |
|
61befe113a13
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 | /* Actions */ |
| 15884 | 235 | 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
|
236 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->open_win))); |
| 15884 | 237 | 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
|
238 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->popup))); |
| 15884 | 239 | 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
|
240 | gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->send_msg))); |
| 15884 | 241 | 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
|
242 | gnt_check_box_get_checked(GNT_CHECK_BOX(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
|
243 | |
| 15884 | 244 | 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
|
245 | "message", message); |
| 15884 | 246 | 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
|
247 | "command", command); |
| 15884 | 248 | 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
|
249 | "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
|
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 | /* 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
|
252 | 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
|
253 | 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
|
254 | 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
|
255 | 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
|
256 | 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
|
257 | 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
|
258 | 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
|
259 | gnt_check_box_get_checked(GNT_CHECK_BOX(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
|
260 | |
| 15884 | 261 | 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
|
262 | 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
|
263 | |
| 15884 | 264 | purple_pounce_set_pouncer(dialog->pounce, |
| 265 | (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
|
266 | |
|
61befe113a13
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 | 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
|
268 | |
|
61befe113a13
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 | 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
|
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 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
272 | |
|
61befe113a13
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 | void |
| 15884 | 274 | finch_pounce_editor_show(PurpleAccount *account, const char *name, |
| 275 | 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
|
276 | { |
| 15884 | 277 | 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
|
278 | 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
|
279 | GntWidget *bbox; |
|
16366
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
280 | 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
|
281 | 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
|
282 | GntWidget *combo; |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
283 | 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
|
284 | |
|
61befe113a13
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 | 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
|
286 | (account != NULL) || |
| 15884 | 287 | (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
|
288 | |
| 15884 | 289 | 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
|
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 | 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
|
292 | dialog->pounce = cur_pounce; |
| 15884 | 293 | 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
|
294 | } 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
|
295 | 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
|
296 | 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
|
297 | } else { |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
298 | GList *connections = purple_connections_get_all(); |
| 15884 | 299 | 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
|
300 | |
|
61befe113a13
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 | if (connections != NULL) { |
| 15884 | 302 | gc = (PurpleConnection *)connections->data; |
| 303 | 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
|
304 | } else |
| 15884 | 305 | 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
|
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 | 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
|
308 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
309 | |
|
61befe113a13
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 | /* 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
|
311 | 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
|
312 | 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
|
313 | 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
|
314 | 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
|
315 | 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
|
316 | (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
|
317 | ? _("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
|
318 | |
|
61befe113a13
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 | 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
|
320 | 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
|
321 | |
|
37865
b8f8bf6d813f
Fix pounce grammar in Finch
Richard Laager <rlaager@pidgin.im>
parents:
33809
diff
changeset
|
322 | gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Pounce on Whom"), GNT_TEXT_FLAG_BOLD)); |
|
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
|
323 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
324 | /* 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
|
325 | 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
|
326 | dialog->account_menu = combo = gnt_combo_box_new(); |
| 15884 | 327 | 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
|
328 | 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
|
329 | { |
| 15884 | 330 | 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
|
331 | 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
|
332 | |
|
61befe113a13
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 | 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
|
334 | text = g_strdup_printf("%s (%s)", |
| 15884 | 335 | purple_account_get_username(account), |
| 336 | 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
|
337 | 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
|
338 | 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
|
339 | } |
|
61befe113a13
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 | 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
|
341 | 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
|
342 | |
|
61befe113a13
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 | 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
|
344 | |
|
61befe113a13
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 | /* 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
|
346 | 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
|
347 | 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
|
348 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
349 | 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
|
350 | 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
|
351 | |
|
21269
fd7d5565390b
Enable auto-complete in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21233
diff
changeset
|
352 | 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
|
353 | |
|
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
|
354 | 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
|
355 | |
|
61befe113a13
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 | 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
|
357 | gnt_entry_set_text(GNT_ENTRY(dialog->buddy_entry), |
| 15884 | 358 | 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
|
359 | } 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
|
360 | 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
|
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 | |
|
16366
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
363 | /* 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
|
364 | 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
|
365 | 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
|
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 | 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
|
368 | 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
|
369 | 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
|
370 | 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
|
371 | 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
|
372 | 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
|
373 | 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
|
374 | 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
|
375 | 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
|
376 | 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
|
377 | |
|
16366
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
378 | 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
|
379 | 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
|
380 | |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
381 | 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
|
382 | 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
|
383 | 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
|
384 | |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
385 | 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
|
386 | 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
|
387 | 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
|
388 | 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
|
389 | 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
|
390 | |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
391 | 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
|
392 | 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
|
393 | 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
|
394 | |
|
162a64468b86
Line up the event-checkboxes in the pounce dialog.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16255
diff
changeset
|
395 | 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
|
396 | 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
|
397 | 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
|
398 | 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
|
399 | 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
|
400 | |
|
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_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
|
402 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
403 | /* 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
|
404 | 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
|
405 | 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
|
406 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
407 | 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
|
408 | 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
|
409 | 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
|
410 | 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
|
411 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
412 | 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
|
413 | 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
|
414 | 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
|
415 | 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
|
416 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
417 | 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
|
418 | 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
|
419 | 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
|
420 | 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
|
421 | 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
|
422 | 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
|
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 | 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
|
425 | 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
|
426 | 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
|
427 | 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
|
428 | 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
|
429 | 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
|
430 | 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
|
431 | 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
|
432 | |
|
61befe113a13
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 | 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
|
434 | gnt_box_add_widget(GNT_BOX(window), gnt_label_new_with_format(_("Options"), GNT_TEXT_FLAG_BOLD)); |
| 22377 | 435 | dialog->on_away = gnt_check_box_new(_("Pounce only when my status is not Available")); |
|
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
|
436 | 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
|
437 | 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
|
438 | 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
|
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 | |
|
61befe113a13
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(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
|
442 | /* 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
|
443 | 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
|
444 | |
|
61befe113a13
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 | /* 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
|
446 | 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
|
447 | 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
|
448 | 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
|
449 | 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
|
450 | |
|
61befe113a13
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 | /* 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
|
452 | 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
|
453 | 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
|
454 | 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
|
455 | 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
|
456 | |
|
61befe113a13
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), 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
|
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 | |
|
61befe113a13
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 | /* 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
|
461 | 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
|
462 | { |
| 15884 | 463 | PurplePounceEvent events = purple_pounce_get_events(cur_pounce); |
| 464 | 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
|
465 | 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
|
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 | /* 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
|
468 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->on_away), |
| 15884 | 469 | (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
|
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 | /* 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
|
472 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->signon), |
| 15884 | 473 | (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
|
474 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->signoff), |
| 15884 | 475 | (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
|
476 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->away), |
| 15884 | 477 | (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
|
478 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->away_return), |
| 15884 | 479 | (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
|
480 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->idle), |
| 15884 | 481 | (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
|
482 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->idle_return), |
| 15884 | 483 | (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
|
484 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->typing), |
| 15884 | 485 | (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
|
486 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->typed), |
| 15884 | 487 | (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
|
488 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->stop_typing), |
| 15884 | 489 | (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
|
490 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->message_recv), |
| 15884 | 491 | (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
|
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 | /* 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
|
494 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->open_win), |
| 15884 | 495 | 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
|
496 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->popup), |
| 15884 | 497 | 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
|
498 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->send_msg), |
| 15884 | 499 | 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
|
500 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->exec_cmd), |
| 15884 | 501 | 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
|
502 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
503 | gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->save_pounce), |
| 15884 | 504 | 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
|
505 | |
| 15884 | 506 | 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
|
507 | "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
|
508 | "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
|
509 | { |
|
61befe113a13
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_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
|
511 | } |
|
61befe113a13
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 | |
| 15884 | 513 | 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
|
514 | "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
|
515 | "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
|
516 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
517 | 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
|
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 | |
| 15884 | 520 | 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
|
521 | "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
|
522 | "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
|
523 | { |
|
61befe113a13
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_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
|
525 | } |
|
61befe113a13
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 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
527 | 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
|
528 | { |
| 15884 | 529 | 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
|
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 | if (name != NULL) |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34699
diff
changeset
|
532 | buddy = purple_blist_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
|
533 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
534 | /* 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
|
535 | 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
|
536 | 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
|
537 | 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
|
538 | } else { |
| 15884 | 539 | 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
|
540 | 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
|
541 | 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
|
542 | } 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
|
543 | gboolean default_set = FALSE; |
| 15884 | 544 | 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
|
545 | |
| 15884 | 546 | 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
|
547 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
548 | 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
|
549 | 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
|
550 | |
|
61befe113a13
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 | 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
|
552 | } |
|
61befe113a13
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 | |
| 15884 | 554 | 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
|
555 | { |
|
61befe113a13
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 | 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
|
557 | 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
|
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 | 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
|
560 | } |
|
61befe113a13
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 | 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
|
563 | { |
|
61befe113a13
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 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
567 | } |
|
61befe113a13
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 | } |
|
61befe113a13
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 | |
|
61befe113a13
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 | 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
|
571 | 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
|
572 | 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
|
573 | 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
|
574 | 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
|
575 | 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
|
576 | 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
|
577 | 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
|
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 | |
|
61befe113a13
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 | 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
|
581 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
582 | |
|
61befe113a13
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 | |
|
61befe113a13
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 | 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
|
586 | 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
|
587 | { |
|
61befe113a13
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 | 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
|
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 | dialog->window = NULL; |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
591 | 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
|
592 | |
|
61befe113a13
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 | 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
|
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 | 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
|
598 | 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
|
599 | { |
|
19554
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
600 | 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
|
601 | 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
|
602 | _("You do not have any accounts."), |
|
34449
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
603 | _("You must create an account first before you can create a pounce."), NULL); |
|
19554
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
604 | return; |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
605 | } |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
606 | 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
|
607 | } |
|
61befe113a13
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 | 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
|
611 | 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
|
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 | PouncesManager *dialog = user_data; |
| 15884 | 614 | 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
|
615 | 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
|
616 | 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
|
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 | |
|
61befe113a13
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 | static void |
| 15884 | 620 | 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
|
621 | { |
|
61befe113a13
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 | 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
|
623 | |
| 15884 | 624 | purple_request_close_with_handle(pounce); |
| 625 | 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
|
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 | |
|
61befe113a13
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 | |
|
61befe113a13
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 | 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
|
630 | 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
|
631 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
632 | PouncesManager *dialog = user_data; |
| 15884 | 633 | PurplePounce *pounce; |
| 634 | 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
|
635 | 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
|
636 | 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
|
637 | |
| 15884 | 638 | 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
|
639 | 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
|
640 | return; |
|
90d1bbdcf0ed
Make some of the dialogs look and behave more like each other.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18763
diff
changeset
|
641 | |
| 15884 | 642 | account = purple_pounce_get_pouncer(pounce); |
| 643 | pouncer = purple_account_get_username(account); | |
| 644 | 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
|
645 | buf = g_strdup_printf(_("Are you sure you want to delete the pounce on %s for %s?"), pouncee, pouncer); |
|
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
|
646 | purple_request_action(pounce, NULL, buf, NULL, 0, |
|
34331
c8486462bb63
Request API refactoring: switch purple_request_action to PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33809
diff
changeset
|
647 | purple_request_cpar_from_account(account), 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
|
648 | _("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
|
649 | _("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
|
650 | 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
|
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 | |
|
61befe113a13
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 | 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
|
654 | 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
|
655 | { |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
656 | 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
|
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 | |
|
61befe113a13
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 | void |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
661 | 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
|
662 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
663 | 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
|
664 | 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
|
665 | 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
|
666 | 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
|
667 | 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
|
668 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
669 | 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
|
670 | 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
|
671 | 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
|
672 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
673 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
674 | 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
|
675 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
676 | 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
|
677 | 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
|
678 | 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
|
679 | 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
|
680 | |
|
61befe113a13
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_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
|
682 | 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
|
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 | /* 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
|
685 | 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
|
686 | 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
|
687 | 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
|
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 | 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
|
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 | /* 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
|
692 | 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
|
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 | /* 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
|
695 | 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
|
696 | 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
|
697 | 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
|
698 | |
|
61befe113a13
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 | 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
|
700 | 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
|
701 | |
|
61befe113a13
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 | /* 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
|
703 | 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
|
704 | 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
|
705 | 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
|
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 | 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
|
708 | 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
|
709 | |
|
61befe113a13
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 | /* 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
|
711 | 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
|
712 | 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
|
713 | 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
|
714 | 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
|
715 | |
|
61befe113a13
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 | 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
|
717 | 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
|
718 | |
|
61befe113a13
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 | /* 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
|
720 | 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
|
721 | 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
|
722 | 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
|
723 | |
|
61befe113a13
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 | 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
|
725 | 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
|
726 | |
|
61befe113a13
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(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
|
728 | |
|
61befe113a13
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 | 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
|
730 | 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
|
731 | } |
|
61befe113a13
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 | void |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
734 | 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
|
735 | { |
|
61befe113a13
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 | 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
|
737 | 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
|
738 | |
|
61befe113a13
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 | 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
|
740 | 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
|
741 | |
| 15884 | 742 | 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
|
743 | |
|
61befe113a13
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 | 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
|
745 | 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
|
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 | |
|
61befe113a13
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 | static void |
| 15884 | 749 | 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
|
750 | { |
|
34658
a09f679ac557
Fix an incompatible pointer conversion warning
Ankit Vani <a@nevitus.org>
parents:
34627
diff
changeset
|
751 | PurpleIMConversation *im; |
| 15884 | 752 | PurpleAccount *account; |
| 753 | 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
|
754 | 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
|
755 | 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
|
756 | |
| 15884 | 757 | pouncee = purple_pounce_get_pouncee(pounce); |
| 758 | 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
|
759 | |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34699
diff
changeset
|
760 | buddy = purple_blist_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
|
761 | 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
|
762 | { |
| 15884 | 763 | 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
|
764 | 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
|
765 | 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
|
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 | 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
|
768 | 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
|
769 | |
| 15884 | 770 | 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
|
771 | { |
|
34625
03d62b1660fc
Refactor code to remove conversation type from some instances of purple_conversations_find_with_account()
Ankit Vani <a@nevitus.org>
parents:
34622
diff
changeset
|
772 | if (!purple_conversations_find_im_with_account(pouncee, account)) |
|
34627
08733a7475df
Replaced purple_conversation_new() with purple_[im,chat]_conversation_new()
Ankit Vani <a@nevitus.org>
parents:
34625
diff
changeset
|
773 | purple_im_conversation_new(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
|
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 | |
| 15884 | 776 | 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
|
777 | { |
|
22335
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
778 | char *tmp = 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
|
779 | 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
|
780 | const char *reason; |
|
22335
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
781 | struct { |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
782 | PurplePounceEvent event; |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
783 | const char *format; |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
784 | } messages[] = { |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
785 | {PURPLE_POUNCE_TYPING, _("%s has started typing to you (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
786 | {PURPLE_POUNCE_TYPED, _("%s has paused while typing to you (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
787 | {PURPLE_POUNCE_SIGNON, _("%s has signed on (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
788 | {PURPLE_POUNCE_IDLE_RETURN, _("%s has returned from being idle (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
789 | {PURPLE_POUNCE_AWAY_RETURN, _("%s has returned from being away (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
790 | {PURPLE_POUNCE_TYPING_STOPPED, _("%s has stopped typing to you (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
791 | {PURPLE_POUNCE_SIGNOFF, _("%s has signed off (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
792 | {PURPLE_POUNCE_IDLE, _("%s has become idle (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
793 | {PURPLE_POUNCE_AWAY, _("%s has gone away. (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
794 | {PURPLE_POUNCE_MESSAGE_RECEIVED, _("%s has sent you a message. (%s)")}, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
795 | {0, NULL} |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
796 | }; |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
797 | int i; |
| 15884 | 798 | reason = purple_pounce_action_get_attribute(pounce, "popup-notify", |
|
22335
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
799 | "reason"); |
|
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
|
800 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
801 | /* |
|
61befe113a13
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 | * 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
|
803 | * 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
|
804 | */ |
|
22335
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
805 | for (i = 0; messages[i].format != NULL; i++) { |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
806 | if (messages[i].event & events) { |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
807 | tmp = g_strdup_printf(messages[i].format, alias, |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
808 | purple_account_get_protocol_name(account)); |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
809 | break; |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
810 | } |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
811 | } |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
812 | if (tmp == NULL) |
|
f6715418a9a8
Update finch to not touch the internals of PurpleAccount. This also includes a change I made to reduce the Cyclomatic Complexity of one of the functions.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21630
diff
changeset
|
813 | tmp = g_strdup(_("Unknown pounce event. Please report this!")); |
|
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
|
814 | |
|
61befe113a13
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 | /* |
|
61befe113a13
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 | * 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
|
817 | * 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
|
818 | * 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
|
819 | */ |
|
34589
428e92c79631
Renamed purple_account_[get,set]_alias to purple_account[get,set]_private_alias.
Ankit Vani <a@nevitus.org>
parents:
33809
diff
changeset
|
820 | if ((name_shown = purple_account_get_private_alias(account)) == NULL) |
| 15884 | 821 | 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
|
822 | |
|
61befe113a13
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 | 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
|
824 | { |
|
34449
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
825 | purple_notify_info(NULL, name_shown, tmp, purple_date_format_full(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
|
826 | } |
|
61befe113a13
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 | 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
|
828 | { |
| 15884 | 829 | char *tmp2 = g_strdup_printf("%s\n\n%s", reason, purple_date_format_full(NULL)); |
|
34449
bbcb198650b7
Notify API: extend purple_notify_message with PurpleRequestCommonParameters
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34331
diff
changeset
|
830 | purple_notify_info(NULL, name_shown, tmp, tmp2, 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
|
831 | 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
|
832 | } |
|
61befe113a13
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 | 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
|
834 | } |
|
61befe113a13
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 | |
| 15884 | 836 | 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
|
837 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
838 | 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
|
839 | |
| 15884 | 840 | 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
|
841 | "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
|
842 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
843 | 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
|
844 | { |
|
36076
a0e5b68ff4ef
Switch purple_serv_send_im to PurpleMessage
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35919
diff
changeset
|
845 | PurpleMessage *pmsg; |
|
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
|
846 | |
|
34658
a09f679ac557
Fix an incompatible pointer conversion warning
Ankit Vani <a@nevitus.org>
parents:
34627
diff
changeset
|
847 | im = purple_conversations_find_im_with_account(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
|
848 | |
|
34658
a09f679ac557
Fix an incompatible pointer conversion warning
Ankit Vani <a@nevitus.org>
parents:
34627
diff
changeset
|
849 | if (im == NULL) |
|
a09f679ac557
Fix an incompatible pointer conversion warning
Ankit Vani <a@nevitus.org>
parents:
34627
diff
changeset
|
850 | im = purple_im_conversation_new(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
|
851 | |
|
36098
4951752ad038
Split PurpleMessage into incoming, outgoing and system
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
36089
diff
changeset
|
852 | pmsg = purple_message_new_outgoing(pouncee, message, 0); |
|
36076
a0e5b68ff4ef
Switch purple_serv_send_im to PurpleMessage
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35919
diff
changeset
|
853 | purple_serv_send_im(purple_account_get_connection(account), pmsg); |
|
36089
c035b9a63457
Use purple_conversation_write_system_message where appropriate
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
36076
diff
changeset
|
854 | purple_conversation_write_message(PURPLE_CONVERSATION(im), pmsg); |
|
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
|
855 | } |
|
61befe113a13
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 | |
| 15884 | 858 | 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
|
859 | { |
|
35877
6c3ab2fd4412
cross-win32: fix finch build
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35499
diff
changeset
|
860 | #ifdef _WIN32 |
|
6c3ab2fd4412
cross-win32: fix finch build
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35499
diff
changeset
|
861 | purple_debug_error("gntpounce", "execute-command is not supported on this OS"); |
|
6c3ab2fd4412
cross-win32: fix finch build
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35499
diff
changeset
|
862 | #else |
|
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
|
863 | 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
|
864 | |
| 15884 | 865 | 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
|
866 | "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
|
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 | 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
|
869 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
870 | 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
|
871 | 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
|
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 (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
|
874 | { |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
875 | 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
|
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 (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
|
878 | 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
|
879 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
880 | 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
|
881 | 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
|
882 | 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
|
883 | 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
|
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 | 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
|
886 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
887 | _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
|
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 | 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
|
890 | } |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
891 | } |
|
35877
6c3ab2fd4412
cross-win32: fix finch build
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35499
diff
changeset
|
892 | #endif |
|
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
|
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 | |
| 15884 | 895 | 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
|
896 | { |
|
61befe113a13
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 | 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
|
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 | } |
|
61befe113a13
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 | static void |
| 15884 | 902 | 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
|
903 | { |
|
61befe113a13
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 | 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
|
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 | |
|
61befe113a13
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 | static void |
| 15884 | 908 | 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
|
909 | { |
| 15884 | 910 | purple_pounce_action_register(pounce, "open-window"); |
| 911 | purple_pounce_action_register(pounce, "popup-notify"); | |
| 912 | purple_pounce_action_register(pounce, "send-message"); | |
| 913 | purple_pounce_action_register(pounce, "execute-command"); | |
| 914 | 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
|
915 | |
|
61befe113a13
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 | 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
|
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 | void * |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
920 | 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
|
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 | 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
|
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 | 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
|
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 | |
|
61befe113a13
Wonderful patch from Richard 'wabz' Nelson to fix the bug of lacking a pounce ui.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff
changeset
|
927 | void |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
928 | 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
|
929 | { |
| 15884 | 930 | 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
|
931 | 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
|
932 | |
|
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
|
933 | 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
|
934 | 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
|
935 | 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
|
936 | 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
|
937 | 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
|
938 | 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
|
939 | 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
|
940 | 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
|
941 | 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
|
942 | 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
|
943 | 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
|
944 | 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
|
945 | 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
|
946 | |
| 15884 | 947 | 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
|
948 | finch_pounces_get_handle(), |
| 15884 | 949 | PURPLE_CALLBACK(signed_on_off_cb), NULL); |
| 950 | 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
|
951 | finch_pounces_get_handle(), |
| 15884 | 952 | 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
|
953 | } |
|
61befe113a13
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 | |
|
35919
17fed1e7d305
Finch: fix glib warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
955 | /* XXX: There's no such thing in pidgin. Perhaps there should be? |
|
17fed1e7d305
Finch: fix glib warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
956 | * For sure, we don't need purple_pounces_unregister_handler - |
|
17fed1e7d305
Finch: fix glib warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
957 | * it's wiped in purple_pounces_uninit. |
|
17fed1e7d305
Finch: fix glib warnings
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35877
diff
changeset
|
958 | */ |
|
15878
f52832b611fe
renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents:
15564
diff
changeset
|
959 | 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
|
960 | { |
| 15884 | 961 | 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
|
962 | } |