diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-10-22 06:02:15 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-10-22 06:02:15 +0200 |
commit | 0e88d01caf89a0d5e6e69cae9eb1d095006f6508 (patch) | |
tree | a12ea3c5dd4e9b78c0c48f9b568c3922bbb2ea7e | |
parent | e361efcf941dc36ffd92a43a1ff605412bed49ab (diff) |
Get rid of gui_tweaks 64
-rw-r--r-- | src/common/cfgfiles.c | 3 | ||||
-rw-r--r-- | src/common/xchat.h | 1 | ||||
-rw-r--r-- | src/fe-gtk/setup.c | 3 | ||||
-rw-r--r-- | src/fe-gtk/userlistgui.c | 6 |
4 files changed, 11 insertions, 2 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index c44080d7..5d1b0b09 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -485,6 +485,7 @@ const struct prefs vars[] = { {"gui_ulist_buttons", P_OFFINT (userlistbuttons), TYPE_BOOL}, {"gui_ulist_doubleclick", P_OFFSET (doubleclickuser), TYPE_STR}, {"gui_ulist_hide", P_OFFINT (hideuserlist), TYPE_BOOL}, + {"gui_ulist_icons", P_OFFINT (gui_ulist_icons), TYPE_BOOL}, {"gui_ulist_pos", P_OFFINT (gui_ulist_pos), TYPE_INT}, {"gui_ulist_resizable", P_OFFINT (paned_userlist), TYPE_BOOL}, {"gui_ulist_show_hosts", P_OFFINT(showhostname_in_userlist), TYPE_BOOL}, @@ -736,6 +737,8 @@ load_config (void) prefs.gui_pane_left_size = 128; /* with treeview icons we need a bit bigger space */ prefs.gui_pane_right_size = 100; prefs.gui_pane_right_size_min = 80; + prefs.tab_pos = 1; + prefs.gui_ulist_icons = 1; prefs.gui_ulist_pos = 3; prefs.mainwindow_save = 1; prefs.bantype = 2; diff --git a/src/common/xchat.h b/src/common/xchat.h index cdb8a563..0329cb47 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -296,6 +296,7 @@ struct xchatprefs unsigned int gui_tray; unsigned int gui_tray_flags; unsigned int gui_tweaks; + unsigned int gui_ulist_icons; unsigned int throttle; unsigned int topicbar; unsigned int hideuserlist; diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 2cfd640e..6be57649 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -277,6 +277,7 @@ static const setting userlist_settings[] = {ST_HEADER, N_("User List"),0,0,0}, {ST_TOGGLE, N_("Show hostnames in user list"), P_OFFINTNL(showhostname_in_userlist), 0, 0, 0}, {ST_TOGGLE, N_("Use the Text box font and colors"), P_OFFINTNL(style_namelistgad),0,0,0}, + {ST_TOGGLE, N_("Show icons instead of text symbols"), P_OFFINTNL(gui_ulist_icons), 0, 0, 0}, /* {ST_TOGGLE, N_("Resizable user list"), P_OFFINTNL(paned_userlist),0,0,0},*/ {ST_MENU, N_("User list sorted by:"), P_OFFINTNL(userlist_sort), 0, ulmenutext, 0}, {ST_MENU, N_("Show user list at:"), P_OFFINTNL(gui_ulist_pos), 0, ulpos, 1}, @@ -2208,6 +2209,8 @@ setup_apply (struct xchatprefs *pr) noapply = TRUE; if (DIFF (tab_sort)) noapply = TRUE; + if (DIFF (gui_ulist_icons)) + noapply = TRUE; if (DIFF (use_server_tab)) noapply = TRUE; if (DIFF (style_namelistgad)) diff --git a/src/fe-gtk/userlistgui.c b/src/fe-gtk/userlistgui.c index 63e71c5a..f79aca51 100644 --- a/src/fe-gtk/userlistgui.c +++ b/src/fe-gtk/userlistgui.c @@ -357,7 +357,7 @@ fe_userlist_insert (session *sess, struct User *newuser, int row, int sel) do_away = FALSE; nick = newuser->nick; - if (prefs.gui_tweaks & 64) + if (!prefs.gui_ulist_icons) { nick = malloc (strlen (newuser->nick) + 2); nick[0] = newuser->prefix[0]; @@ -378,8 +378,10 @@ fe_userlist_insert (session *sess, struct User *newuser, int row, int sel) : (NULL), -1); - if (prefs.gui_tweaks & 64) + if (!prefs.gui_ulist_icons) + { free (nick); + } /* is it me? */ if (newuser->me && sess->gui->nick_box) |