summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/chanlist.c2
-rw-r--r--src/fe-gtk/maingui.c2
-rw-r--r--src/fe-gtk/menu.c15
-rw-r--r--src/fe-gtk/menu.h2
4 files changed, 14 insertions, 7 deletions
diff --git a/src/fe-gtk/chanlist.c b/src/fe-gtk/chanlist.c
index 00c55b5f..0f0307b7 100644
--- a/src/fe-gtk/chanlist.c
+++ b/src/fe-gtk/chanlist.c
@@ -629,7 +629,7 @@ chanlist_button_cb (GtkTreeView *tree, GdkEventButton *event, server *serv)
 								chanlist_copytopic, serv);
 
 	chan = chanlist_get_selected (serv, FALSE);
-	menu_addfavoritemenu (serv, menu, chan);
+	menu_addfavoritemenu (serv, menu, chan, FALSE);
 	g_free (chan);
 
 	gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 0, event->time);
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 473b6c11..100642e1 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -1617,7 +1617,7 @@ mg_create_tabmenu (session *sess, GdkEventButton *event, chan *ch)
 		menu_quick_item (0, 0, menu, XCMENU_SHADED, 0, 0);
 
 		if (sess->type == SESS_CHANNEL)
-			menu_addfavoritemenu (sess->server, menu, sess->channel);
+			menu_addfavoritemenu (sess->server, menu, sess->channel, TRUE);
 		else if (sess->type == SESS_SERVER)
 			menu_addconnectmenu (sess->server, menu);
 	}
diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c
index cd94aa60..1948348a 100644
--- a/src/fe-gtk/menu.c
+++ b/src/fe-gtk/menu.c
@@ -1016,7 +1016,7 @@ menu_chanmenu (struct session *sess, GdkEventButton * event, char *chan)
 												 str_copy);
 	}
 
-	menu_addfavoritemenu (sess->server, menu, str_copy);
+	menu_addfavoritemenu (sess->server, menu, str_copy, FALSE);
 
 	menu_add_plugin_items (menu, "\x5$CHAN", str_copy);
 	menu_popup (menu, event, NULL);
@@ -1035,8 +1035,10 @@ menu_addfav_cb (GtkWidget *item, server *serv)
 }
 
 void
-menu_addfavoritemenu (server *serv, GtkWidget *menu, char *channel)
+menu_addfavoritemenu (server *serv, GtkWidget *menu, char *channel, gboolean istree)
 {
+	char *str;
+	
 	if (!serv->network)
 		return;
 
@@ -1046,14 +1048,19 @@ menu_addfavoritemenu (server *serv, GtkWidget *menu, char *channel)
 			free (str_copy);
 		str_copy = strdup (channel);
 	}
+	
+	if (istree)
+		str = _("_Autojoin");
+	else
+		str = _("Autojoin Channel");
 
 	if (joinlist_is_in_list (serv, channel))
 	{
-		menu_toggle_item (_("_Autojoin Channel"), menu, menu_delfav_cb, serv, TRUE);
+		menu_toggle_item (str, menu, menu_delfav_cb, serv, TRUE);
 	}
 	else
 	{
-		menu_toggle_item (_("_Autojoin Channel"), menu, menu_addfav_cb, serv, FALSE);
+		menu_toggle_item (str, menu, menu_addfav_cb, serv, FALSE);
 	}
 }
 
diff --git a/src/fe-gtk/menu.h b/src/fe-gtk/menu.h
index 9cc92e9e..3dd96261 100644
--- a/src/fe-gtk/menu.h
+++ b/src/fe-gtk/menu.h
@@ -23,7 +23,7 @@
 GtkWidget *menu_create_main (void *accel_group, int bar, int away, int toplevel, GtkWidget **menu_widgets);
 void menu_urlmenu (GdkEventButton * event, char *url);
 void menu_chanmenu (session *sess, GdkEventButton * event, char *chan);
-void menu_addfavoritemenu (server *serv, GtkWidget *menu, char *channel);
+void menu_addfavoritemenu (server *serv, GtkWidget *menu, char *channel, gboolean istree);
 void menu_addconnectmenu (server *serv, GtkWidget *menu);
 void menu_nickmenu (session *sess, GdkEventButton * event, char *nick, int num_sel);
 void menu_middlemenu (session *sess, GdkEventButton *event);