| 2045 docklet_count++; |
2045 docklet_count++; |
| 2046 debug_printf("docklet_count: %d\n",docklet_count); |
2046 debug_printf("docklet_count: %d\n",docklet_count); |
| 2047 } |
2047 } |
| 2048 |
2048 |
| 2049 void docklet_remove() { |
2049 void docklet_remove() { |
| 2050 if (docklet_count) { |
2050 docklet_count--; |
| 2051 docklet_count--; |
|
| 2052 } |
|
| 2053 debug_printf("docklet_count: %d\n",docklet_count); |
2051 debug_printf("docklet_count: %d\n",docklet_count); |
| 2054 if (!docklet_count) { |
2052 if (!docklet_count) { |
| 2055 if (connections) { |
2053 if (connections) { |
| 2056 unhide_buddy_list(); |
2054 unhide_buddy_list(); |
| 2057 } else { |
2055 } else { |
| 2062 |
2060 |
| 2063 void docklet_toggle() { |
2061 void docklet_toggle() { |
| 2064 /* Useful for the docklet plugin and also for the win32 tray icon*/ |
2062 /* Useful for the docklet plugin and also for the win32 tray icon*/ |
| 2065 /* This is called when one of those is clicked--it will show/hide the |
2063 /* This is called when one of those is clicked--it will show/hide the |
| 2066 buddy list/login window--depending on which is active */ |
2064 buddy list/login window--depending on which is active */ |
| 2067 if (connections) { |
2065 if (connections && blist) { |
| 2068 if (GTK_WIDGET_VISIBLE(blist)) { |
2066 if (GTK_WIDGET_VISIBLE(blist)) { |
| 2069 if (GAIM_WINDOW_ICONIFIED(blist)) { |
2067 if (GAIM_WINDOW_ICONIFIED(blist)) { |
| 2070 unhide_buddy_list(); |
2068 unhide_buddy_list(); |
| 2071 } else { |
2069 } else { |
| 2072 hide_buddy_list(); |
2070 hide_buddy_list(); |
| 2073 } |
2071 } |
| 2074 } else { |
2072 } else { |
| 2075 unhide_buddy_list(); |
2073 unhide_buddy_list(); |
| 2076 } |
2074 } |
| |
2075 } else if (connections) { |
| |
2076 /* we're logging in or something... do nothing */ |
| |
2077 debug_printf("docklet_toggle called with connections but no blist!\n"); |
| 2077 } else { |
2078 } else { |
| 2078 if (GTK_WIDGET_VISIBLE(mainwindow)) { |
2079 if (GTK_WIDGET_VISIBLE(mainwindow)) { |
| 2079 if (GAIM_WINDOW_ICONIFIED(mainwindow)) { |
2080 if (GAIM_WINDOW_ICONIFIED(mainwindow)) { |
| 2080 gtk_window_present(GTK_WINDOW(mainwindow)); |
2081 gtk_window_present(GTK_WINDOW(mainwindow)); |
| 2081 } else { |
2082 } else { |