View | Details | Raw Unified | Return to bug 4832
Collapse All | Expand All

(-)a/AUTHORS (+1 lines)
Lines 353-355 contributors (in addition to the above; based on Changelog) Link Here
353
	Paul Wolneykien
353
	Paul Wolneykien
354
	Quentin Rameau
354
	Quentin Rameau
355
	MatN
355
	MatN
356
	Jan Willamowius
(-)a/configure.ac (-1 / +14 lines)
Lines 1213-1219 dnl Fancy: Webkit, curl, optionally libsoup-gnome Link Here
1213
dnl Litehtml		a C++ compiler, glib, cairo, fontconfig, gumbo, curl
1213
dnl Litehtml		a C++ compiler, glib, cairo, fontconfig, gumbo, curl
1214
dnl Libravatar:		libcurl
1214
dnl Libravatar:		libcurl
1215
dnl Notification:	optionally libnotify  unity/messaging-menu
1215
dnl Notification:	optionally libnotify  unity/messaging-menu
1216
dnl 				   libcanberra_gtk3 hotkey
1216
dnl 				   libcanberra_gtk3 hotkey libayatana-appindicator3
1217
dnl Pdf-Viewer:		libpoppler
1217
dnl Pdf-Viewer:		libpoppler
1218
dnl Perl:		sed perl
1218
dnl Perl:		sed perl
1219
dnl PGP/Core:		libgpgme
1219
dnl PGP/Core:		libgpgme
Lines 1420-1425 fi Link Here
1420
AC_SUBST(unity_CFLAGS)
1420
AC_SUBST(unity_CFLAGS)
1421
AC_SUBST(unity_LIBS)
1421
AC_SUBST(unity_LIBS)
1422
1422
1423
dnl ayatana app indicator *******************************************************
1424
PKG_CHECK_MODULES(ayatanaappindicator, ayatana-appindicator3-0.1, HAVE_AYATANAAPPINDICATOR=yes, HAVE_AYATANAAPPINDICATOR=no)
1425
if test x"$HAVE_AYATANAAPPINDICATOR" = xyes; then
1426
	AC_DEFINE(NOTIFICATION_AYATANA_INDICATOR, 1, [Activate support for Atayana app indicator])
1427
fi
1428
AC_SUBST(ayatanaappindicator_CFLAGS)
1429
AC_SUBST(ayatanaappindicator_LIBS)
1430
1423
dnl hotkeys ********************************************************************
1431
dnl hotkeys ********************************************************************
1424
PKG_CHECK_MODULES(CM_NP_HOTKEY, [gio-2.0 >= 2.15.6 gio-unix-2.0 >= 2.15.6], HAVE_HOTKEYS=yes, HAVE_HOTKEYS=no)
1432
PKG_CHECK_MODULES(CM_NP_HOTKEY, [gio-2.0 >= 2.15.6 gio-unix-2.0 >= 2.15.6], HAVE_HOTKEYS=yes, HAVE_HOTKEYS=no)
1425
if test x"$HAVE_HOTKEYS" = xyes; then
1433
if test x"$HAVE_HOTKEYS" = xyes; then
Lines 1739-1744 if test x"$enable_notification_plugin" != xno; then Link Here
1739
	else
1747
	else
1740
		notification_missing_dependencies="$notification_missing_dependencies unity/messaging-menu"
1748
		notification_missing_dependencies="$notification_missing_dependencies unity/messaging-menu"
1741
	fi
1749
	fi
1750
	if test x"$HAVE_AYATANAAPPINDICATOR" = xyes; then
1751
		notification_features="$notification_features libayatana-appindicator3"
1752
	else
1753
		notification_missing_dependencies="$notification_missing_dependencies libayatana-appindicator3"
1754
	fi
1742
	if test x"$HAVE_LIBNOTIFY" = xyes; then
1755
	if test x"$HAVE_LIBNOTIFY" = xyes; then
1743
		notification_features="$notification_features libnotify"
1756
		notification_features="$notification_features libnotify"
1744
	else
1757
	else
(-)a/po/POTFILES.in (+1 lines)
Lines 126-131 src/plugins/managesieve/sieve_manager.c Link Here
126
src/plugins/managesieve/sieve_plugin.c
126
src/plugins/managesieve/sieve_plugin.c
127
src/plugins/managesieve/sieve_prefs.c
127
src/plugins/managesieve/sieve_prefs.c
128
src/plugins/newmail/newmail.c
128
src/plugins/newmail/newmail.c
129
src/plugins/notification/notification_ayatana_indicator.c
129
src/plugins/notification/notification_banner.c
130
src/plugins/notification/notification_banner.c
130
src/plugins/notification/notification_foldercheck.c
131
src/plugins/notification/notification_foldercheck.c
131
src/plugins/notification/notification_lcdproc.c
132
src/plugins/notification/notification_lcdproc.c
(-)a/src/gtk/authors.h (+1 lines)
Lines 336-341 static char *CONTRIBS_LIST[] = { Link Here
336
"Rafal Weglarz",
336
"Rafal Weglarz",
337
"Florian Weimer",
337
"Florian Weimer",
338
"Martin Wicke",
338
"Martin Wicke",
339
"Jan Willamowius",
339
"Paul Wolneykien",
340
"Paul Wolneykien",
340
"Bob Woodside",
341
"Bob Woodside",
341
"YAMAGUCHI",
342
"YAMAGUCHI",
(-)a/src/plugins/notification/Makefile.am (-1 / +5 lines)
Lines 1-4 Link Here
1
# Copyright 1999-2022 the Claws Mail team.
1
# Copyright 1999-2024 the Claws Mail team.
2
# This file is part of Claws Mail package, and distributed under the
2
# This file is part of Claws Mail package, and distributed under the
3
# terms of the General Public License version 3 (or later).
3
# terms of the General Public License version 3 (or later).
4
# See COPYING file for license details.
4
# See COPYING file for license details.
Lines 40-45 notification_la_LIBADD = $(plugin_libadd) \ Link Here
40
	$(libnotify_LIBS) \
40
	$(libnotify_LIBS) \
41
	$(unity_LIBS) \
41
	$(unity_LIBS) \
42
	$(libcanberra_gtk3_LIBS) \
42
	$(libcanberra_gtk3_LIBS) \
43
	$(ayatanaappindicator_LIBS) \
43
	$(hotkey_lib_path)
44
	$(hotkey_lib_path)
44
45
45
notification_la_CPPFLAGS = \
46
notification_la_CPPFLAGS = \
Lines 48-59 notification_la_CPPFLAGS = \ Link Here
48
	$(GLIB_CFLAGS) \
49
	$(GLIB_CFLAGS) \
49
	$(GTK_CFLAGS) \
50
	$(GTK_CFLAGS) \
50
	$(ENCHANT_CFLAGS) \
51
	$(ENCHANT_CFLAGS) \
52
	$(ayatanaappindicator_CFLAGS) \
51
	$(libnotify_CFLAGS) \
53
	$(libnotify_CFLAGS) \
52
	$(unity_CFLAGS) \
54
	$(unity_CFLAGS) \
53
	$(libcanberra_gtk3_CFLAGS) \
55
	$(libcanberra_gtk3_CFLAGS) \
54
	-Wall
56
	-Wall
55
57
56
notification_la_SOURCES = \
58
notification_la_SOURCES = \
59
	notification_ayatana_indicator.c \
60
	notification_ayatana_indicator.h \
57
	notification_banner.c \
61
	notification_banner.c \
58
	notification_banner.h \
62
	notification_banner.h \
59
	notification_command.c \
63
	notification_command.c \
(-)a/src/plugins/notification/notification_core.c (+6 lines)
Lines 38-43 Link Here
38
#ifdef HAVE_LIBCANBERRA_GTK
38
#ifdef HAVE_LIBCANBERRA_GTK
39
# include <canberra-gtk.h>
39
# include <canberra-gtk.h>
40
#endif
40
#endif
41
#ifdef NOTIFICATION_AYATANA_INDICATOR
42
# include "notification_ayatana_indicator.h"
43
#endif
41
44
42
typedef struct {
45
typedef struct {
43
  GSList *collected_msgs;
46
  GSList *collected_msgs;
Lines 125-130 void notification_update_msg_counts(FolderItem *removed_item) Link Here
125
#ifdef NOTIFICATION_TRAYICON
128
#ifdef NOTIFICATION_TRAYICON
126
  notification_update_trayicon();
129
  notification_update_trayicon();
127
#endif
130
#endif
131
#ifdef NOTIFICATION_AYATANA_INDICATOR
132
  notification_update_ayatana_indicator();
133
#endif
128
#ifdef NOTIFICATION_INDICATOR
134
#ifdef NOTIFICATION_INDICATOR
129
  notification_update_indicator();
135
  notification_update_indicator();
130
#endif
136
#endif
(-)a/src/plugins/notification/notification_plugin.c (-1 / +8 lines)
Lines 37-42 Link Here
37
#include "notification_plugin.h"
37
#include "notification_plugin.h"
38
#include "notification_core.h"
38
#include "notification_core.h"
39
#include "notification_prefs.h"
39
#include "notification_prefs.h"
40
#include "notification_ayatana_indicator.h"
40
#include "notification_banner.h"
41
#include "notification_banner.h"
41
#include "notification_lcdproc.h"
42
#include "notification_lcdproc.h"
42
#include "notification_trayicon.h"
43
#include "notification_trayicon.h"
Lines 162-168 static gboolean my_folder_item_update_hook(gpointer source, gpointer data) Link Here
162
  if (folder_has_parent_of_type(update_data->item, F_DRAFT))
163
  if (folder_has_parent_of_type(update_data->item, F_DRAFT))
163
      return FALSE;
164
      return FALSE;
164
165
165
#if defined(NOTIFICATION_LCDPROC) || defined(NOTIFICATION_TRAYICON) || defined(NOTIFICATION_INDICATOR)
166
#if defined(NOTIFICATION_LCDPROC) || defined(NOTIFICATION_TRAYICON) || defined(NOTIFICATION_AYATANA_INDICATOR) || defined(NOTIFICATION_INDICATOR)
166
    notification_update_msg_counts(NULL);
167
    notification_update_msg_counts(NULL);
167
#else
168
#else
168
    if(notify_config.urgency_hint_new || notify_config.urgency_hint_unread)
169
    if(notify_config.urgency_hint_new || notify_config.urgency_hint_unread)
Lines 326-331 gint plugin_init(gchar **error) Link Here
326
327
327
  notify_gtk_init();
328
  notify_gtk_init();
328
329
330
#ifdef NOTIFICATION_AYATANA_INDICATOR
331
  notification_ayatana_indicator_setup();
332
#endif
329
#ifdef NOTIFICATION_INDICATOR
333
#ifdef NOTIFICATION_INDICATOR
330
  notification_indicator_setup();
334
  notification_indicator_setup();
331
#endif
335
#endif
Lines 379-384 gboolean plugin_done(void) Link Here
379
  notification_foldercheck_write_array();
383
  notification_foldercheck_write_array();
380
  notification_free_folder_specific_array();
384
  notification_free_folder_specific_array();
381
385
386
#ifdef NOTIFICATION_AYATANA_INDICATOR
387
  notification_ayatana_indicator_destroy();
388
#endif
382
#ifdef NOTIFICATION_BANNER
389
#ifdef NOTIFICATION_BANNER
383
  notification_collected_msgs_free(banner_collected_msgs);
390
  notification_collected_msgs_free(banner_collected_msgs);
384
  banner_collected_msgs = NULL;
391
  banner_collected_msgs = NULL;
(-)a/src/plugins/notification/notification_prefs.c (+97 lines)
Lines 43-48 Link Here
43
#include "notification_command.h"
43
#include "notification_command.h"
44
#include "notification_lcdproc.h"
44
#include "notification_lcdproc.h"
45
#include "notification_trayicon.h"
45
#include "notification_trayicon.h"
46
#include "notification_ayatana_indicator.h"
46
#include "notification_indicator.h"
47
#include "notification_indicator.h"
47
48
48
#ifdef GDK_WINDOWING_X11
49
#ifdef GDK_WINDOWING_X11
Lines 165-170 typedef struct { Link Here
165
NotifyTrayiconPage trayicon_page;
166
NotifyTrayiconPage trayicon_page;
166
#endif
167
#endif
167
168
169
#ifdef NOTIFICATION_AYATANA_INDICATOR
170
typedef struct {
171
	PrefsPage page;
172
	GtkWidget *ayatana_indicator_enabled;
173
}NotifyAtayanaIndicatorPage;
174
NotifyAtayanaIndicatorPage ayatana_indicator_page;
175
#endif
176
168
#ifdef NOTIFICATION_INDICATOR
177
#ifdef NOTIFICATION_INDICATOR
169
typedef struct {
178
typedef struct {
170
	PrefsPage page;
179
	PrefsPage page;
Lines 307-312 PrefParam Link Here
307
#endif /* HAVE_LIBNOTIFY */
316
#endif /* HAVE_LIBNOTIFY */
308
#endif
317
#endif
309
318
319
#ifdef NOTIFICATION_AYATANA_INDICATOR
320
				{	"ayatana_indicator_enabled", "FALSE", &notify_config.ayatana_indicator_enabled, P_BOOL,
321
					NULL, NULL, NULL},
322
#endif /* NOTIFICATION_AYATANA_INDICATOR */
310
#ifdef NOTIFICATION_INDICATOR
323
#ifdef NOTIFICATION_INDICATOR
311
				{	"indicator_enabled", "FALSE", &notify_config.indicator_enabled, P_BOOL,
324
				{	"indicator_enabled", "FALSE", &notify_config.indicator_enabled, P_BOOL,
312
					NULL, NULL, NULL},
325
					NULL, NULL, NULL},
Lines 379-384 static void notify_trayicon_popup_enable_set_sensitivity(GtkToggleButton*, Link Here
379
#endif
392
#endif
380
#endif
393
#endif
381
394
395
#ifdef NOTIFICATION_AYATANA_INDICATOR
396
static void notify_create_ayatana_indicator_page(PrefsPage*, GtkWindow*, gpointer);
397
static void notify_destroy_ayatana_indicator_page(PrefsPage*);
398
static void notify_save_ayatana_indicator(PrefsPage*);
399
static void notify_ayatana_indicator_enable_set_sensitivity(GtkToggleButton*, gpointer);
400
#endif /* NOTIFICATION_AYATANA_INDICATOR */
401
382
#ifdef NOTIFICATION_INDICATOR
402
#ifdef NOTIFICATION_INDICATOR
383
static void notify_create_indicator_page(PrefsPage*, GtkWindow*, gpointer);
403
static void notify_create_indicator_page(PrefsPage*, GtkWindow*, gpointer);
384
static void notify_destroy_indicator_page(PrefsPage*);
404
static void notify_destroy_indicator_page(PrefsPage*);
Lines 519-524 void notify_gtk_init(void) Link Here
519
	}
539
	}
520
#endif /* NOTIFICATION_TRAYICON */
540
#endif /* NOTIFICATION_TRAYICON */
521
541
542
#ifdef NOTIFICATION_AYATANA_INDICATOR
543
	{
544
		static gchar *ayatana_indicator_path[4];
545
546
		ayatana_indicator_path[0] = _("Plugins");
547
		ayatana_indicator_path[1] = _("Notification");
548
		ayatana_indicator_path[2] = _("Atayana App Indicator");
549
		ayatana_indicator_path[3] = NULL;
550
551
		ayatana_indicator_page.page.path = ayatana_indicator_path;
552
		ayatana_indicator_page.page.create_widget = notify_create_ayatana_indicator_page;
553
		ayatana_indicator_page.page.destroy_widget = notify_destroy_ayatana_indicator_page;
554
		ayatana_indicator_page.page.save_page = notify_save_ayatana_indicator;
555
		ayatana_indicator_page.page.weight = 70.0;
556
		prefs_gtk_register_page((PrefsPage*) &ayatana_indicator_page);
557
	}
558
#endif /* NOTIFICATION_AYATANA_INDICATOR */
559
522
#ifdef NOTIFICATION_INDICATOR
560
#ifdef NOTIFICATION_INDICATOR
523
	{
561
	{
524
		static gchar *indicator_path[4];
562
		static gchar *indicator_path[4];
Lines 558-563 void notify_gtk_done(void) Link Here
558
#ifdef NOTIFICATION_TRAYICON
596
#ifdef NOTIFICATION_TRAYICON
559
	prefs_gtk_unregister_page((PrefsPage*) &trayicon_page);
597
	prefs_gtk_unregister_page((PrefsPage*) &trayicon_page);
560
#endif
598
#endif
599
#ifdef NOTIFICATION_AYATANA_INDICATOR
600
	prefs_gtk_unregister_page((PrefsPage*) &ayatana_indicator_page);
601
#endif
561
#ifdef NOTIFICATION_INDICATOR
602
#ifdef NOTIFICATION_INDICATOR
562
	prefs_gtk_unregister_page((PrefsPage*) &indicator_page);
603
	prefs_gtk_unregister_page((PrefsPage*) &indicator_page);
563
#endif
604
#endif
Lines 1772-1777 static void notify_trayicon_popup_enable_set_sensitivity(GtkToggleButton *bu, Link Here
1772
1813
1773
#endif /* NOTIFICATION_TRAYICON */
1814
#endif /* NOTIFICATION_TRAYICON */
1774
1815
1816
#ifdef NOTIFICATION_AYATANA_INDICATOR
1817
1818
static void notify_create_ayatana_indicator_page(PrefsPage *page, GtkWindow *window,
1819
		gpointer data)
1820
{
1821
	GtkWidget *pvbox;
1822
	GtkWidget *vbox;
1823
	GtkWidget *checkbox;
1824
	GtkWidget *ind_reg;
1825
1826
	pvbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 20);
1827
	gtk_container_set_border_width(GTK_CONTAINER(pvbox), 10);
1828
1829
	/* Enable indicator */
1830
	checkbox = gtk_check_button_new_with_label(_("Enable Ayatana App Indicator"));
1831
	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox),
1832
			notify_config.ayatana_indicator_enabled);
1833
	gtk_box_pack_start(GTK_BOX(pvbox), checkbox, FALSE, FALSE, 0);
1834
	g_signal_connect(G_OBJECT(checkbox), "toggled",
1835
			G_CALLBACK(notify_ayatana_indicator_enable_set_sensitivity), NULL);
1836
	ayatana_indicator_page.ayatana_indicator_enabled = checkbox;
1837
1838
	/* Container vbox for greying out everything */
1839
	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10);
1840
	gtk_box_pack_start(GTK_BOX(pvbox), vbox, FALSE, FALSE, 0);
1841
1842
	notify_ayatana_indicator_enable_set_sensitivity(GTK_TOGGLE_BUTTON(ayatana_indicator_page.ayatana_indicator_enabled), NULL);
1843
	gtk_widget_show_all(pvbox);
1844
	ayatana_indicator_page.page.widget = pvbox;
1845
}
1846
1847
static void notify_destroy_ayatana_indicator_page(PrefsPage *page)
1848
{
1849
}
1850
1851
static void notify_save_ayatana_indicator(PrefsPage *page)
1852
{
1853
	notification_ayatana_indicator_destroy();
1854
1855
	notify_config.ayatana_indicator_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ayatana_indicator_page.ayatana_indicator_enabled));
1856
1857
	if(notify_config.ayatana_indicator_enabled) {
1858
	  notification_ayatana_indicator_setup();
1859
	  notification_update_ayatana_indicator();
1860
	}
1861
}
1862
1863
static void notify_ayatana_indicator_enable_set_sensitivity(GtkToggleButton *button,
1864
		gpointer data)
1865
{
1866
	gboolean active;
1867
	active = gtk_toggle_button_get_active
1868
	(GTK_TOGGLE_BUTTON(ayatana_indicator_page.ayatana_indicator_enabled));
1869
}
1870
#endif /* NOTIFICATION_AYATANA_INDICATOR */
1871
1775
#ifdef NOTIFICATION_INDICATOR
1872
#ifdef NOTIFICATION_INDICATOR
1776
1873
1777
static void notify_create_indicator_page(PrefsPage *page, GtkWindow *window,
1874
static void notify_create_indicator_page(PrefsPage *page, GtkWindow *window,
(-)a/src/plugins/notification/notification_prefs.h (+3 lines)
Lines 100-105 typedef struct { Link Here
100
  gint             trayicon_popup_timeout;
100
  gint             trayicon_popup_timeout;
101
#endif /* HAVE_LIBNOTIFY */
101
#endif /* HAVE_LIBNOTIFY */
102
#endif /* Trayicon */
102
#endif /* Trayicon */
103
#ifdef NOTIFICATION_AYATANA_INDICATOR
104
  gboolean ayatana_indicator_enabled;
105
#endif /* NOTIFICATION_AYATANA_INDICATOR */
103
#ifdef NOTIFICATION_INDICATOR
106
#ifdef NOTIFICATION_INDICATOR
104
  gboolean indicator_enabled;
107
  gboolean indicator_enabled;
105
  gboolean indicator_hide_minimized;
108
  gboolean indicator_hide_minimized;

Return to bug 4832