Sun, 13 Jul 2003 18:33:25 +0000
[gaim-migrate @ 6571]
Make attempting to sign on to an account twice not crash Gaim, and make
the prompt for password request window only open once at max. I might
change this in a few minutes, but this works, and I wanted to commit it
before I break something.
Move the gaim_request_input() call for "Please enter your password" to
connection.c instead of gtkconn.c. There is no need for this to be in
gtkconn.c, and doing it in core means less work for UIs.
Make closing a notify window call the cancel action.
Set the titles for request windows, when given.
Remove a bit of odd, un-needed code from main.c (hitting "enter" in the
password field was calling doenter which called dologin. Now it just
calls dologin).
| 4514 | 1 | /** |
|
5537
812794b97b08
[gaim-migrate @ 5937]
Mark Doliner <markdoliner@pidgin.im>
parents:
5034
diff
changeset
|
2 | * @file gtkft.h GTK+ file transfer UI |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4698
diff
changeset
|
3 | * @ingroup gtkui |
| 4514 | 4 | * |
| 5 | * gaim | |
| 6 | * | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5537
diff
changeset
|
7 | * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> |
| 4514 | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify | |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This program is distributed in the hope that it will be useful, | |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | * GNU General Public License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU General Public License | |
| 20 | * along with this program; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | */ | |
| 23 | #ifndef _GAIM_GTK_FT_H_ | |
| 24 | #define _GAIM_GTK_FT_H_ | |
| 25 | ||
|
4553
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
26 | #include "ft.h" |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
27 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
28 | /** |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
29 | * A file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
30 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
31 | * The structure is opaque, as nobody should be touching anything inside of |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
32 | * it. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
33 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
34 | struct gaim_gtkxfer_dialog; |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
35 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
36 | /**************************************************************************/ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
37 | /** @name GTK+ File Transfer Dialog API */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
38 | /**************************************************************************/ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
39 | /*@{*/ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
40 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
41 | /** |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
42 | * Creates a new file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
43 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
44 | * @return The new dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
45 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
46 | struct gaim_gtkxfer_dialog *gaim_gtkxfer_dialog_new(void); |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
47 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
48 | /** |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
49 | * Destroys a file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
50 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
51 | * @param dialog The file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
52 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
53 | void gaim_gtkxfer_dialog_destroy(struct gaim_gtkxfer_dialog *dialog); |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
54 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
55 | /** |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
56 | * Displays the file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
57 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
58 | * @param dialog The file transfer dialog to show. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
59 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
60 | void gaim_gtkxfer_dialog_show(struct gaim_gtkxfer_dialog *dialog); |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
61 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
62 | /** |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
63 | * Hides the file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
64 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
65 | * @param dialog The file transfer dialog to hide. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
66 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
67 | void gaim_gtkxfer_dialog_hide(struct gaim_gtkxfer_dialog *dialog); |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
68 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
69 | /** |
| 4698 | 70 | * Shows the file transfer dialog, creating a new one if necessary |
| 71 | */ | |
| 72 | void gaim_show_xfer_dialog(); | |
| 73 | ||
| 74 | /** | |
|
4553
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
75 | * Adds a file transfer to the dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
76 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
77 | * @param dialog The file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
78 | * @param xfer The file transfer. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
79 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
80 | void gaim_gtkxfer_dialog_add_xfer(struct gaim_gtkxfer_dialog *dialog, |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
81 | struct gaim_xfer *xfer); |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
82 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
83 | /** |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
84 | * Removes a file transfer from the dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
85 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
86 | * @param dialog The file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
87 | * @param xfer The file transfer. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
88 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
89 | void gaim_gtkxfer_dialog_remove_xfer(struct gaim_gtkxfer_dialog *dialog, |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
90 | struct gaim_xfer *xfer); |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
91 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
92 | /** |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
93 | * Indicate in a file transfer dialog that a transfer was canceled. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
94 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
95 | * @param dialog The file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
96 | * @param xfer The file transfer that was canceled. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
97 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
98 | void gaim_gtkxfer_dialog_cancel_xfer(struct gaim_gtkxfer_dialog *dialog, |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
99 | struct gaim_xfer *xfer); |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
100 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
101 | /** |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
102 | * Updates the information for a transfer in the dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
103 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
104 | * @param dialog The file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
105 | * @param xfer The file transfer. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
106 | */ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
107 | void gaim_gtkxfer_dialog_update_xfer(struct gaim_gtkxfer_dialog *dialog, |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
108 | struct gaim_xfer *xfer); |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
109 | |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
110 | /*@}*/ |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
111 | |
| 4514 | 112 | /**************************************************************************/ |
| 113 | /** @name GTK+ File Transfer API */ | |
| 114 | /**************************************************************************/ | |
| 115 | /*@{*/ | |
| 116 | ||
| 117 | /** | |
|
5974
00c68435d9f3
[gaim-migrate @ 6421]
Mark Doliner <markdoliner@pidgin.im>
parents:
5872
diff
changeset
|
118 | * Initializes the GTK+ file transfer system. |
|
00c68435d9f3
[gaim-migrate @ 6421]
Mark Doliner <markdoliner@pidgin.im>
parents:
5872
diff
changeset
|
119 | */ |
|
00c68435d9f3
[gaim-migrate @ 6421]
Mark Doliner <markdoliner@pidgin.im>
parents:
5872
diff
changeset
|
120 | void gaim_gtk_xfer_init(void); |
|
00c68435d9f3
[gaim-migrate @ 6421]
Mark Doliner <markdoliner@pidgin.im>
parents:
5872
diff
changeset
|
121 | |
|
00c68435d9f3
[gaim-migrate @ 6421]
Mark Doliner <markdoliner@pidgin.im>
parents:
5872
diff
changeset
|
122 | /** |
|
4553
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
123 | * Sets gaim's main file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
124 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
125 | * @param dialog The main dialog. |
| 4514 | 126 | */ |
|
4553
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
127 | void gaim_set_gtkxfer_dialog(struct gaim_gtkxfer_dialog *dialog); |
| 4514 | 128 | |
| 129 | /** | |
|
4553
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
130 | * Returns gaim's main file transfer dialog. |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
131 | * |
|
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
132 | * @return The main dialog. |
| 4514 | 133 | */ |
|
4553
3c1735b36327
[gaim-migrate @ 4833]
Christian Hammond <chipx86@chipx86.com>
parents:
4514
diff
changeset
|
134 | struct gaim_gtkxfer_dialog *gaim_get_gtkxfer_dialog(void); |
| 4514 | 135 | |
| 136 | /** | |
| 137 | * Returns the UI operations structure for the GTK+ file transfer UI. | |
| 138 | * | |
| 139 | * @return The GTK+ file transfer UI operations structure. | |
| 140 | */ | |
| 141 | struct gaim_xfer_ui_ops *gaim_get_gtk_xfer_ui_ops(void); | |
| 142 | ||
| 143 | /*@}*/ | |
| 144 | ||
| 145 | #endif /* _GAIM_GTK_FT_H_ */ |