pidgin/plugins/perl/common/GtkStatusBox.xs

Sat, 28 Apr 2007 02:33:40 +0000

author
Luke Schierer <lschiere@pidgin.im>
date
Sat, 28 Apr 2007 02:33:40 +0000
changeset 16621
616dc666cfb8
parent 16551
75ed9ff2a922
child 18068
b6554e3c8224
child 35808
09fa340acc2f
permissions
-rw-r--r--

Quoth Charkins:
This patch has two changes:

"This patch has two changes:

First is to slightly change the re-creation behavior of the docklet. Sadrul pointed out on gaim-devel that the x11 docklet re-creates itself when it is destroyed and thought this might be causing problems with fluxbox. This patch now distinguishes between initial creation and re-creation. When re-creating, the docklet no longer registers itself as a visibility manager until it successfully embeds.

Second is to change the timeout behavior for embedding. Because the notification area API is asynchronous, gaim assumes the docklet gets embeded for a certain timeout period, allowing the buddy list to start hidden before the docklet has been embeded in the notification area. If the timeout occurs, it is removed as a visibility manager and the buddy list will become visible. This timeout has been set at 5 seconds. There have been a few reports that indicate this timeout period is not long enough when starting gaim from a saved session upon login. I have been hesitant to increase the timeout, as it has the potential of delaying the startup of gaim for the timeout period if the buddy list was hidden when gaim last closed and there is not currently a notification area available. This patch makes the x11 docklet track whether it was successfully embedded and uses a longer timeout (15 seconds in this patch) only if it successfully embedded on the previous execution. Otherwise, it uses the shorter 5 second timeout. "

14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
1 #include "gtkmodule.h"
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
2
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
3 /* This can't work at the moment since I don't have a typemap for Gtk::Widget.
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
4 * I thought about using the one from libgtk2-perl but wasn't sure how to go
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
5 * about doing that.
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
6 Gtk::Widget
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
7 pidgin_status_box_new()
14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
8
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
9 Gtk::Widget
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
10 pidgin_status_box_new_with_account(account)
15899
75f0041f72b8 Pidgin perl fixes for s/gaim/purple/.
Daniel Atallah <datallah@pidgin.im>
parents: 15590
diff changeset
11 Purple::Account account
14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
12
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
13 void
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
14 pidgin_status_box_add(status_box, type, pixbuf, text, sec_text, data)
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
15 Pidgin::StatusBox status_box
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
16 Pidgin::StatusBox::ItemType type
14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
17 GdkPixbuf pixbuf
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
18 const char * text
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
19 const char * sec_text
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
20 gpointer data
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
21 */
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
22
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
23 MODULE = Pidgin::StatusBox PACKAGE = Pidgin::StatusBox PREFIX = pidgin_status_box_
14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
24 PROTOTYPES: ENABLE
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
25
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
26 void
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
27 pidgin_status_box_add_separator(status_box)
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
28 Pidgin::StatusBox status_box
14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
29
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
30 void
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
31 pidgin_status_box_set_connecting(status_box, connecting)
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
32 Pidgin::StatusBox status_box
14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
33 gboolean connecting
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
34
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
35 void
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
36 pidgin_status_box_pulse_connecting(status_box)
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
37 Pidgin::StatusBox status_box
14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
38
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
39 void
16551
75ed9ff2a922 rlaager should install libperl-dev ;)
Sean Egan <seanegan@pidgin.im>
parents: 15899
diff changeset
40 pidgin_status_box_set_buddy_icon(status_box, img)
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
41 Pidgin::StatusBox status_box
16551
75ed9ff2a922 rlaager should install libperl-dev ;)
Sean Egan <seanegan@pidgin.im>
parents: 15899
diff changeset
42 Purple::StoredImage img
14478
a6b831ab1d13 [gaim-migrate @ 17124]
Etan Reisner <deryni@pidgin.im>
parents:
diff changeset
43
15165
0ff631dfbbca [gaim-migrate @ 17889]
Daniel Atallah <datallah@pidgin.im>
parents: 14630
diff changeset
44 gchar_own *
15590
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
45 pidgin_status_box_get_message(status_box)
c07dd12bf3f4 Partial fix for pidgin perl support. Fixing fully is going to require a decision on splitting from some of the core perl support - more than I want to deal with right now.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
46 Pidgin::StatusBox status_box

mercurial