pidgin/gtkdocklet.c

branch
cpw.qulogic.gtk3-required
changeset 33169
1f676cd20646
parent 33132
24afd2b22579
parent 33117
d89119696a3f
child 33170
ce4447562d64
equal deleted inserted replaced
33168:f51e53d27b99 33169:1f676cd20646
57 static guint embed_timeout = 0; 57 static guint embed_timeout = 0;
58 static PurpleStatusPrimitive status = PURPLE_STATUS_OFFLINE; 58 static PurpleStatusPrimitive status = PURPLE_STATUS_OFFLINE;
59 static gboolean pending = FALSE; 59 static gboolean pending = FALSE;
60 static gboolean connecting = FALSE; 60 static gboolean connecting = FALSE;
61 static gboolean enable_join_chat = FALSE; 61 static gboolean enable_join_chat = FALSE;
62 static guint docklet_blinking_timer = 0;
63 static gboolean visible = FALSE; 62 static gboolean visible = FALSE;
64 static gboolean visibility_manager = FALSE; 63 static gboolean visibility_manager = FALSE;
65 64
66 /* protos */ 65 /* protos */
67 static void docklet_gtk_status_create(gboolean); 66 static void docklet_gtk_status_create(gboolean);
102 icon_name = PIDGIN_STOCK_TRAY_CONNECT; 101 icon_name = PIDGIN_STOCK_TRAY_CONNECT;
103 102
104 if (icon_name) { 103 if (icon_name) {
105 gtk_status_icon_set_from_icon_name(docklet, icon_name); 104 gtk_status_icon_set_from_icon_name(docklet, icon_name);
106 } 105 }
107 }
108
109 static gboolean
110 docklet_blink_icon(gpointer data)
111 {
112 static gboolean blinked = FALSE;
113 gboolean ret = FALSE; /* by default, don't keep blinking */
114
115 blinked = !blinked;
116
117 if(pending && !connecting) {
118 if (!blinked) {
119 docklet_gtk_status_update_icon(status, connecting, pending);
120 }
121 ret = TRUE; /* keep blinking */
122 } else {
123 docklet_blinking_timer = 0;
124 blinked = FALSE;
125 }
126
127 return ret;
128 } 106 }
129 107
130 static GList * 108 static GList *
131 get_pending_list(guint max) 109 get_pending_list(guint max)
132 { 110 {
817 if (visible) { 795 if (visible) {
818 if (visibility_manager) { 796 if (visibility_manager) {
819 pidgin_blist_visibility_manager_remove(); 797 pidgin_blist_visibility_manager_remove();
820 visibility_manager = FALSE; 798 visibility_manager = FALSE;
821 } 799 }
822 if (docklet_blinking_timer) {
823 g_source_remove(docklet_blinking_timer);
824 docklet_blinking_timer = 0;
825 }
826 visible = FALSE; 800 visible = FALSE;
827 status = PURPLE_STATUS_OFFLINE; 801 status = PURPLE_STATUS_OFFLINE;
828 } 802 }
829 } 803 }
830 804

mercurial