Add a channel context menu item to focus channels
This commit is contained in:
parent
c522ccce7f
commit
c361bdca6a
@ -1001,6 +1001,18 @@ menu_chan_part (GtkWidget * menu, char *chan)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
menu_chan_focus (GtkWidget * menu, char *chan)
|
||||||
|
{
|
||||||
|
char tbuf[256];
|
||||||
|
|
||||||
|
if (current_sess)
|
||||||
|
{
|
||||||
|
g_snprintf (tbuf, sizeof tbuf, "doat %s gui focus", chan);
|
||||||
|
handle_command (current_sess, tbuf, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
menu_chan_join (GtkWidget * menu, char *chan)
|
menu_chan_join (GtkWidget * menu, char *chan)
|
||||||
{
|
{
|
||||||
@ -1035,6 +1047,8 @@ menu_chanmenu (struct session *sess, GdkEventButton * event, char *chan)
|
|||||||
str_copy);
|
str_copy);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
menu_quick_item_with_callback (menu_chan_focus, _("Focus Channel"), menu,
|
||||||
|
str_copy);
|
||||||
menu_quick_item_with_callback (menu_chan_part, _("Part Channel"), menu,
|
menu_quick_item_with_callback (menu_chan_part, _("Part Channel"), menu,
|
||||||
str_copy);
|
str_copy);
|
||||||
menu_quick_item_with_callback (menu_chan_cycle, _("Cycle Channel"), menu,
|
menu_quick_item_with_callback (menu_chan_cycle, _("Cycle Channel"), menu,
|
||||||
|
Loading…
Reference in New Issue
Block a user