mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 00:26:21 +00:00
Merge remote-tracking branch 'asdil12/tray_config'
This commit is contained in:
@@ -77,6 +77,9 @@
|
||||
#include "ui/ui.h"
|
||||
#include "window_list.h"
|
||||
#include "event/client_events.h"
|
||||
#ifdef HAVE_GTK
|
||||
#include "tray.h"
|
||||
#endif
|
||||
|
||||
static void _update_presence(const resource_presence_t presence,
|
||||
const char *const show, gchar **args);
|
||||
@@ -5525,6 +5528,27 @@ cmd_flash(ProfWin *window, const char *const command, gchar **args)
|
||||
return _cmd_set_boolean_preference(args[0], command, "Screen flash", PREF_FLASH);
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_tray(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
#ifdef HAVE_GTK
|
||||
gboolean old = prefs_get_boolean(PREF_TRAY);
|
||||
gboolean ret = _cmd_set_boolean_preference(args[0], command, "Tray icon", PREF_TRAY);
|
||||
gboolean new = prefs_get_boolean(PREF_TRAY);
|
||||
if (old != new) {
|
||||
if (new) {
|
||||
create_tray();
|
||||
} else {
|
||||
destroy_tray();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
#else
|
||||
cons_show("This version of Profanity has not been built with GTK Tray Icon support enabled");
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_intype(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user