summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/common/cfgfiles.c2
-rw-r--r--src/common/xchat.h2
-rw-r--r--src/fe-gtk/maingui.c22
-rw-r--r--src/fe-gtk/setup.c5
-rw-r--r--src/fe-gtk/userlistgui.c2
5 files changed, 25 insertions, 8 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index f9b2f65c..487eadb7 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -496,9 +496,11 @@ const struct prefs vars[] = {
 	{"gui_usermenu", P_OFFINT (gui_usermenu), TYPE_BOOL},
 	{"gui_win_height", P_OFFINT (mainwindow_height), TYPE_INT},
 	{"gui_win_left", P_OFFINT (mainwindow_left), TYPE_INT},
+	{"gui_win_modes", P_OFFINT (gui_win_modes), TYPE_BOOL},
 	{"gui_win_save", P_OFFINT (mainwindow_save), TYPE_BOOL},
 	{"gui_win_state", P_OFFINT (gui_win_state), TYPE_INT},
 	{"gui_win_top", P_OFFINT (mainwindow_top), TYPE_INT},
+	{"gui_win_ucount", P_OFFINT (gui_win_ucount), TYPE_BOOL},
 	{"gui_win_width", P_OFFINT (mainwindow_width), TYPE_INT},
 
 #ifdef WIN32
diff --git a/src/common/xchat.h b/src/common/xchat.h
index 668d1f98..f3ab0857 100644
--- a/src/common/xchat.h
+++ b/src/common/xchat.h
@@ -298,6 +298,8 @@ struct xchatprefs
 	unsigned int gui_tray_flags;
 	unsigned int gui_tweaks;
 	unsigned int gui_ulist_icons;
+	unsigned int gui_win_modes;
+	unsigned int gui_win_ucount;
 	unsigned int throttle;
 	unsigned int topicbar;
 	unsigned int hideuserlist;
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 68795b9b..f35e86ed 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -416,6 +416,7 @@ mg_inputbox_cb (GtkWidget *igad, session_gui *gui)
 	free (cmd);
 }
 
+#if 0
 static gboolean
 has_key (char *modes)
 {
@@ -432,6 +433,7 @@ has_key (char *modes)
 	}
 	return FALSE;
 }
+#endif
 
 void
 fe_set_title (session *sess)
@@ -459,18 +461,24 @@ fe_set_title (session *sess)
 		break;
 	case SESS_CHANNEL:
 		/* don't display keys in the titlebar */
-		if ((!(prefs.gui_tweaks & 16)) && has_key (sess->current_modes))
+		if (prefs.gui_win_modes)
+		{
 			snprintf (tbuf, sizeof (tbuf),
-						 DISPLAY_NAME": %s @ %s / %s",
+						 DISPLAY_NAME": %s @ %s / %s (%s)",
 						 sess->server->nick, server_get_network (sess->server, TRUE),
-						 sess->channel);
+						 sess->channel, sess->current_modes ? sess->current_modes : "");
+		}
 		else
+		{
 			snprintf (tbuf, sizeof (tbuf),
-						 DISPLAY_NAME": %s @ %s / %s (%s)",
+						 DISPLAY_NAME": %s @ %s / %s",
 						 sess->server->nick, server_get_network (sess->server, TRUE),
-						 sess->channel, sess->current_modes ? sess->current_modes : "");
-		if (prefs.gui_tweaks & 1)
+						 sess->channel);
+		}
+		if (prefs.gui_win_ucount)
+		{
 			snprintf (tbuf + strlen (tbuf), 9, " (%d)", sess->total);
+		}
 		break;
 	case SESS_NOTICES:
 	case SESS_SNOTICES:
@@ -2514,7 +2522,7 @@ mg_create_userlist (session_gui *gui, GtkWidget *box)
 	gtk_container_add (GTK_CONTAINER (box), vbox);
 
 	frame = gtk_frame_new (NULL);
-	if (!(prefs.gui_tweaks & 1))
+	if (!(prefs.gui_win_ucount))
 		gtk_box_pack_start (GTK_BOX (vbox), frame, 0, 0, GUI_SPACING);
 
 	gui->namelistinfo = gtk_label_new (NULL);
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c
index 6be57649..7a89f5be 100644
--- a/src/fe-gtk/setup.c
+++ b/src/fe-gtk/setup.c
@@ -166,6 +166,11 @@ static const setting appearance_settings[] =
 #else
 	{ST_EFONT,  N_("Font:"), P_OFFSETNL(font_normal), 0, 0, sizeof prefs.font_normal},
 #endif
+
+	{ST_HEADER,	N_("Title Bar"),0,0,0},
+	{ST_TOGGLE, N_("Show channel modes"), P_OFFINTNL(gui_win_modes),0,0,0},
+	{ST_TOGGLR, N_("Show number of users"), P_OFFINTNL(gui_win_ucount),0,0,0},
+
 	{ST_HEADER,	N_("Text Box"),0,0,0},
 	{ST_EFILE,  N_("Background image:"), P_OFFSETNL(background), 0, 0, sizeof prefs.background},
 	{ST_NUMBER,	N_("Scrollback lines:"), P_OFFINTNL(max_lines),0,0,100000},
diff --git a/src/fe-gtk/userlistgui.c b/src/fe-gtk/userlistgui.c
index cb21703f..443e0588 100644
--- a/src/fe-gtk/userlistgui.c
+++ b/src/fe-gtk/userlistgui.c
@@ -126,7 +126,7 @@ fe_userlist_numbers (session *sess)
 			gtk_label_set_text (GTK_LABEL (sess->gui->namelistinfo), NULL);
 		}
 
-		if (sess->type == SESS_CHANNEL && prefs.gui_tweaks & 1)
+		if (sess->type == SESS_CHANNEL && prefs.gui_win_ucount)
 			fe_set_title (sess);
 	}
 }