Skip to content

Commit

Permalink
trayitem: show tooltip when available
Browse files Browse the repository at this point in the history
  • Loading branch information
LBCrion committed Sep 2, 2024
1 parent f50fbcd commit 1d84133
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/sni.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __SNI_H__
#define __SNI_H__

#define SNI_MAX_STRING 14
#define SNI_MAX_STRING 16
#define SNI_MAX_PROP 19

enum {
Expand Down
8 changes: 8 additions & 0 deletions src/trayitem.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ void tray_item_update ( GtkWidget *self )
return;
priv->invalid = FALSE;

if(priv->sni->string[SNI_PROP_TOOLTIP])
{
gtk_widget_set_has_tooltip(priv->button, TRUE);
gtk_widget_set_tooltip_markup(priv->button, priv->sni->string[SNI_PROP_TOOLTIP]);
}
else
gtk_widget_set_has_tooltip(priv->button, FALSE);

if(priv->sni->string[SNI_PROP_STATUS])
{
switch(priv->sni->string[SNI_PROP_STATUS][0])
Expand Down

0 comments on commit 1d84133

Please sign in to comment.