diff --git a/src/sui/sui_app.c b/src/sui/sui_app.c index 522f6c81..133b0a02 100644 --- a/src/sui/sui_app.c +++ b/src/sui/sui_app.c @@ -356,7 +356,10 @@ void sui_application_send_notification(SuiApplication *self, } void sui_application_highlight_tray_icon(SuiApplication *self, bool highlight){ -#ifndef ENABLE_APP_INDICATOR +#ifdef ENABLE_APP_INDICATOR + app_indicator_set_status(self->tray_icon, + highlight ? APP_INDICATOR_STATUS_ATTENTION : APP_INDICATOR_STATUS_ACTIVE); +#else gtk_status_icon_set_from_icon_name(self->tray_icon, highlight ? "srain-red": PACKAGE); #endif @@ -478,11 +481,14 @@ static void on_startup(SuiApplication *self){ self->tray_icon = app_indicator_new(PACKAGE_APPID, PACKAGE_APPID, APP_INDICATOR_CATEGORY_APPLICATION_STATUS); app_indicator_set_status(self->tray_icon, APP_INDICATOR_STATUS_ACTIVE); - app_indicator_set_attention_icon(self->tray_icon, "srain-red"); + app_indicator_set_attention_icon_full(self->tray_icon, "srain-red", "srain-red"); app_indicator_set_menu(self->tray_icon, self->menu); + app_indicator_set_title(self->tray_icon, PACKAGE); #else self->tray_icon = gtk_status_icon_new_from_icon_name(PACKAGE_APPID); g_signal_connect(self->tray_icon, "activate", G_CALLBACK(tray_icon_on_click), self); + g_signal_connect(self->tray_icon, "popup-menu", G_CALLBACK(tray_icon_on_popup_menu), self); + gtk_status_icon_set_tooltip_text(self->tray_icon, PACKAGE); #endif // Attach to any widget to connect to action