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", ¬ify_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", ¬ify_config.indicator_enabled, P_BOOL, |
324 |
{ "indicator_enabled", "FALSE", ¬ify_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 |
#endif /* NOTIFICATION_AYATANA_INDICATOR */ |
400 |
|
382 |
#ifdef NOTIFICATION_INDICATOR |
401 |
#ifdef NOTIFICATION_INDICATOR |
383 |
static void notify_create_indicator_page(PrefsPage*, GtkWindow*, gpointer); |
402 |
static void notify_create_indicator_page(PrefsPage*, GtkWindow*, gpointer); |
384 |
static void notify_destroy_indicator_page(PrefsPage*); |
403 |
static void notify_destroy_indicator_page(PrefsPage*); |
Lines 519-524
void notify_gtk_init(void)
Link Here
|
519 |
} |
538 |
} |
520 |
#endif /* NOTIFICATION_TRAYICON */ |
539 |
#endif /* NOTIFICATION_TRAYICON */ |
521 |
|
540 |
|
|
|
541 |
#ifdef NOTIFICATION_AYATANA_INDICATOR |
542 |
{ |
543 |
static gchar *ayatana_indicator_path[4]; |
544 |
|
545 |
ayatana_indicator_path[0] = _("Plugins"); |
546 |
ayatana_indicator_path[1] = _("Notification"); |
547 |
ayatana_indicator_path[2] = _("Atayana App Indicator"); |
548 |
ayatana_indicator_path[3] = NULL; |
549 |
|
550 |
ayatana_indicator_page.page.path = ayatana_indicator_path; |
551 |
ayatana_indicator_page.page.create_widget = notify_create_ayatana_indicator_page; |
552 |
ayatana_indicator_page.page.destroy_widget = notify_destroy_ayatana_indicator_page; |
553 |
ayatana_indicator_page.page.save_page = notify_save_ayatana_indicator; |
554 |
ayatana_indicator_page.page.weight = 70.0; |
555 |
prefs_gtk_register_page((PrefsPage*) &ayatana_indicator_page); |
556 |
} |
557 |
#endif /* NOTIFICATION_AYATANA_INDICATOR */ |
558 |
|
522 |
#ifdef NOTIFICATION_INDICATOR |
559 |
#ifdef NOTIFICATION_INDICATOR |
523 |
{ |
560 |
{ |
524 |
static gchar *indicator_path[4]; |
561 |
static gchar *indicator_path[4]; |
Lines 558-563
void notify_gtk_done(void)
Link Here
|
558 |
#ifdef NOTIFICATION_TRAYICON |
595 |
#ifdef NOTIFICATION_TRAYICON |
559 |
prefs_gtk_unregister_page((PrefsPage*) &trayicon_page); |
596 |
prefs_gtk_unregister_page((PrefsPage*) &trayicon_page); |
560 |
#endif |
597 |
#endif |
|
|
598 |
#ifdef NOTIFICATION_AYATANA_INDICATOR |
599 |
prefs_gtk_unregister_page((PrefsPage*) &ayatana_indicator_page); |
600 |
#endif |
561 |
#ifdef NOTIFICATION_INDICATOR |
601 |
#ifdef NOTIFICATION_INDICATOR |
562 |
prefs_gtk_unregister_page((PrefsPage*) &indicator_page); |
602 |
prefs_gtk_unregister_page((PrefsPage*) &indicator_page); |
563 |
#endif |
603 |
#endif |
Lines 1772-1777
static void notify_trayicon_popup_enable_set_sensitivity(GtkToggleButton *bu,
Link Here
|
1772 |
|
1812 |
|
1773 |
#endif /* NOTIFICATION_TRAYICON */ |
1813 |
#endif /* NOTIFICATION_TRAYICON */ |
1774 |
|
1814 |
|
|
|
1815 |
#ifdef NOTIFICATION_AYATANA_INDICATOR |
1816 |
|
1817 |
static void notify_create_ayatana_indicator_page(PrefsPage *page, GtkWindow *window, |
1818 |
gpointer data) |
1819 |
{ |
1820 |
GtkWidget *pvbox; |
1821 |
GtkWidget *vbox; |
1822 |
GtkWidget *checkbox; |
1823 |
|
1824 |
pvbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 20); |
1825 |
gtk_container_set_border_width(GTK_CONTAINER(pvbox), 10); |
1826 |
|
1827 |
/* Enable indicator */ |
1828 |
checkbox = gtk_check_button_new_with_label(_("Enable Ayatana App Indicator")); |
1829 |
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox), |
1830 |
notify_config.ayatana_indicator_enabled); |
1831 |
gtk_box_pack_start(GTK_BOX(pvbox), checkbox, FALSE, FALSE, 0); |
1832 |
ayatana_indicator_page.ayatana_indicator_enabled = checkbox; |
1833 |
|
1834 |
/* Container vbox for greying out everything */ |
1835 |
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10); |
1836 |
gtk_box_pack_start(GTK_BOX(pvbox), vbox, FALSE, FALSE, 0); |
1837 |
|
1838 |
gtk_widget_show_all(pvbox); |
1839 |
ayatana_indicator_page.page.widget = pvbox; |
1840 |
} |
1841 |
|
1842 |
static void notify_destroy_ayatana_indicator_page(PrefsPage *page) |
1843 |
{ |
1844 |
} |
1845 |
|
1846 |
static void notify_save_ayatana_indicator(PrefsPage *page) |
1847 |
{ |
1848 |
notification_ayatana_indicator_disable(); |
1849 |
|
1850 |
notify_config.ayatana_indicator_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ayatana_indicator_page.ayatana_indicator_enabled)); |
1851 |
|
1852 |
if(notify_config.ayatana_indicator_enabled) { |
1853 |
notification_ayatana_indicator_enable(); |
1854 |
notification_update_ayatana_indicator(); |
1855 |
} |
1856 |
} |
1857 |
#endif /* NOTIFICATION_AYATANA_INDICATOR */ |
1858 |
|
1775 |
#ifdef NOTIFICATION_INDICATOR |
1859 |
#ifdef NOTIFICATION_INDICATOR |
1776 |
|
1860 |
|
1777 |
static void notify_create_indicator_page(PrefsPage *page, GtkWindow *window, |
1861 |
static void notify_create_indicator_page(PrefsPage *page, GtkWindow *window, |