/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2009 the Claws Mail Team
+ * Copyright (C) 2003-2011 the Claws Mail Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "alertpanel.h"
#include "account.h"
#include "gtk/manage_window.h"
+#ifdef USE_NEW_ADDRBOOK
+ #include "addressbook-dbus.h"
+#endif
#include "trayicon_prefs.h"
*close_allowed = FALSE;
focused_widget = gtk_window_get_focus(GTK_WINDOW(mainwin->window));
- if (gtkut_widget_get_visible(GTK_WIDGET(mainwin->window)))
+ if (gtk_widget_get_visible(GTK_WIDGET(mainwin->window)))
main_window_hide(mainwin);
}
}
MainWindow *mainwin = mainwindow_get_mainwindow();
if (trayicon_prefs.hide_when_iconified
- && gtkut_widget_get_visible(GTK_WIDGET(mainwin->window))
+ && gtk_widget_get_visible(GTK_WIDGET(mainwin->window))
&& !gtk_window_get_skip_taskbar_hint(GTK_WINDOW(mainwin->window))) {
focused_widget = gtk_window_get_focus(GTK_WINDOW(mainwin->window));
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(mainwin->window), TRUE);
switch (event->button) {
case 1:
- if (gtkut_widget_get_visible(GTK_WIDGET(mainwin->window))) {
- if ((gdk_window_get_state(GTK_WIDGET(mainwin->window)->window)&GDK_WINDOW_STATE_ICONIFIED)
+ if (gtk_widget_get_visible(GTK_WIDGET(mainwin->window))) {
+ if ((gdk_window_get_state(gtk_widget_get_window(
+ GTK_WIDGET(mainwin->window)))&GDK_WINDOW_STATE_ICONIFIED)
|| mainwindow_is_obscured()) {
gtk_window_deiconify(GTK_WINDOW(mainwin->window));
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(mainwin->window), FALSE);
{
GtkActionGroup *action_group;
trayicon = gtk_status_icon_new();
-#if GTK_CHECK_VERSION(2,14,0)
gtk_status_icon_set_title(GTK_STATUS_ICON(trayicon), _("Claws Mail"));
-#endif
g_signal_connect(G_OBJECT(trayicon), "button-press-event",
G_CALLBACK(click_cb), NULL);
if (trayicon_prefs.hide_at_startup && claws_is_starting()) {
MainWindow *mainwin = mainwindow_get_mainwindow();
- if (gtkut_widget_get_visible(GTK_WIDGET(mainwin->window)))
+ if (gtk_widget_get_visible(GTK_WIDGET(mainwin->window)))
main_window_hide(mainwin);
main_set_show_at_startup(FALSE);
}
static void trayicon_addressbook_cb( GtkAction *action, gpointer data )
{
+#ifndef USE_NEW_ADDRBOOK
addressbook_open(NULL);
+#else
+ GError* error = NULL;
+ addressbook_dbus_open(FALSE, &error);
+ if (error) {
+ g_warning("%s", error->message);
+ g_error_free(error);
+ }
+#endif
}
static void trayicon_toggle_offline_cb( GtkAction *action, gpointer data )