diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-09-28 04:39:38 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-09-28 04:39:38 +0000 |
commit | 41c9a97e743d179f2990d47cf19a6a3a6e88a841 (patch) | |
tree | 7ca357e3c3493d86fe80feccb3d166e1c4a6f485 /src/trayicon.c | |
parent | 9201eff5cf8f1df79d52842b653e0f465bdb850a (diff) |
cleanup trayicon on exit.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1198 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/trayicon.c')
-rw-r--r-- | src/trayicon.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/trayicon.c b/src/trayicon.c index 35a20083..fb33f0a1 100644 --- a/src/trayicon.c +++ b/src/trayicon.c @@ -172,16 +172,18 @@ TrayIcon *trayicon_create(MainWindow *mainwin) void trayicon_show(TrayIcon *tray_icon) { - gtk_status_icon_set_visible(trayicon.status_icon, TRUE); + gtk_status_icon_set_visible(tray_icon->status_icon, TRUE); }; +void trayicon_hide(TrayIcon *tray_icon) +{ + gtk_status_icon_set_visible(tray_icon->status_icon, FALSE); +} + void trayicon_destroy(TrayIcon *tray_icon) { -#if 0 g_object_unref(tray_icon->status_icon); tray_icon->status_icon = NULL; -#endif - gtk_status_icon_set_visible(tray_icon->status_icon, FALSE); } void trayicon_set_tooltip(const gchar *text) @@ -247,8 +249,17 @@ void trayicon_show(TrayIcon *tray_icon) gtk_widget_show(tray_icon->widget); }; +void trayicon_hide(TrayIcon *tray_icon) +{ + gtk_widget_destroy(tray_icon->widget); + tray_icon->widget = NULL; +} + void trayicon_destroy(TrayIcon *tray_icon) { + g_signal_handlers_disconnect_by_func(G_OBJECT(trayicon->widget), + G_CALLBACK(trayicon_destroy_cb), + mainwin); gtk_widget_destroy(tray_icon->widget); tray_icon->widget = NULL; } @@ -369,6 +380,10 @@ void trayicon_show(TrayIcon *tray_icon) { } +void trayicon_hide(TrayIcon *tray_icon) +{ +} + void trayicon_destroy(TrayIcon *tray_icon) { } |