Skip to content

Commit

Permalink
[enh] Add support for libayatana-appindicator library to telega-server (
Browse files Browse the repository at this point in the history
  • Loading branch information
jumper047 committed Apr 20, 2023
1 parent b7438f8 commit 879a8c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions server/Makefile
Expand Up @@ -18,6 +18,12 @@ CFLAGS+=-DWITH_APPINDICATOR
CFLAGS+=`pkg-config --cflags appindicator3-0.1`
LDFLAGS+=`pkg-config --libs appindicator3-0.1`
SOURCES+=telega-appindicator.c
else ifeq ($(shell pkg-config --exists ayatana-appindicator3-0.1 && echo yes), yes)
CFLAGS+=-DWITH_APPINDICATOR
CFLAGS+=-DWITH_AYATANA_APPINDICATOR
CFLAGS+=`pkg-config --cflags ayatana-appindicator3-0.1`
LDFLAGS+=`pkg-config --libs ayatana-appindicator3-0.1`
SOURCES+=telega-appindicator.c
endif

ifdef WITH_VOIP
Expand Down
4 changes: 4 additions & 0 deletions server/telega-appindicator.c
Expand Up @@ -34,7 +34,11 @@
#include <stdbool.h>
#include <assert.h>

#ifdef WITH_AYATANA_APPINDICATOR
#include <libayatana-appindicator/app-indicator.h>
#else
#include <libappindicator/app-indicator.h>
#endif

extern void telega_output_json(const char* otype, const char* json);

Expand Down
3 changes: 2 additions & 1 deletion telega-modes.el
Expand Up @@ -252,7 +252,8 @@ If MESSAGES-P is non-nil then use number of messages with mentions."
;; Global minor mode to display =telega= status in system tray. This
;; mode requires appindicator support in the =telega-server=. To add
;; appindicator support to =telega-server=, please install
;; =libappindicator3-dev= system package and rebuild =telega-server=
;; =libappindicator3-dev= or =libayatana-appindicator3-dev=
;; system package and rebuild =telega-server=
;; with {{{kbd(M-x telega-server-build RET}}}.
;;
;; Screenshot of system tray with enabled =telega= appindicator:
Expand Down

0 comments on commit 879a8c7

Please sign in to comment.