1 Commits

Author SHA1 Message Date
baaea45d43 Keep tray Away/Back actions enabled 2026-03-25 17:54:45 -06:00
7 changed files with 147 additions and 50 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 250 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 250 KiB

View File

@@ -396,10 +396,14 @@ cmd_away (struct session *sess, char *tbuf, char *word[], char *word_eol[])
static int static int
cmd_back (struct session *sess, char *tbuf, char *word[], char *word_eol[]) cmd_back (struct session *sess, char *tbuf, char *word[], char *word_eol[])
{ {
if (sess->server->is_away) if (sess->server->connected)
{ {
sess->server->p_set_back (sess->server); sess->server->p_set_back (sess->server);
} }
else if (sess->server->reconnect_away)
{
sess->server->reconnect_away = FALSE;
}
else else
{ {
PrintText (sess, _("Already marked back.\n")); PrintText (sess, _("Already marked back.\n"));

View File

@@ -964,7 +964,7 @@ tray_find_away_status (void)
{ {
serv = list->data; serv = list->data;
if (serv->is_away || serv->reconnect_away) if (serv->is_away || serv->reconnect_away || serv->last_away_reason)
away++; away++;
else else
back++; back++;
@@ -1090,7 +1090,6 @@ tray_menu_populate (GtkWidget *menu)
{ {
GtkWidget *submenu; GtkWidget *submenu;
GtkWidget *item; GtkWidget *item;
int away_status;
/* ph may have an invalid context now */ /* ph may have an invalid context now */
zoitechat_set_context (ph, zoitechat_find_context (ph, NULL, NULL)); zoitechat_set_context (ph, zoitechat_find_context (ph, NULL, NULL));
@@ -1113,13 +1112,8 @@ tray_menu_populate (GtkWidget *menu)
submenu = menu; submenu = menu;
#endif #endif
away_status = tray_find_away_status ();
item = tray_make_item (submenu, _("_Away"), tray_foreach_server, "away"); item = tray_make_item (submenu, _("_Away"), tray_foreach_server, "away");
if (away_status == 1)
gtk_widget_set_sensitive (item, FALSE);
item = tray_make_item (submenu, _("_Back"), tray_foreach_server, "back"); item = tray_make_item (submenu, _("_Back"), tray_foreach_server, "back");
if (away_status == 2)
gtk_widget_set_sensitive (item, FALSE);
menu_add_plugin_items (menu, "\x5$TRAY", NULL); menu_add_plugin_items (menu, "\x5$TRAY", NULL);