From bf27d4305288872507e1c6283df91783785c1b1e Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 22 Oct 2012 13:49:28 +0200 Subject: Variable cleanup for gui_* --- src/common/cfgfiles.c | 215 +++++++++++++++++++++++++------------------------- src/common/dcc.c | 10 +-- src/common/ignore.c | 6 +- src/common/inbound.c | 8 +- src/common/servlist.c | 2 +- src/common/userlist.c | 4 +- src/common/xchat.c | 20 ++--- src/common/xchat.h | 129 +++++++++++++++--------------- 8 files changed, 197 insertions(+), 197 deletions(-) (limited to 'src/common') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 5c8a144d..d8f610a7 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -435,74 +435,75 @@ const struct prefs vars[] = {"flood_msg_num", P_OFFINT (hex_flood_msg_time), TYPE_INT}, {"flood_msg_time", P_OFFINT (hex_flood_msg_time), TYPE_INT}, - {"gui_auto_open_chat", P_OFFINT (autoopendccchatwindow), TYPE_BOOL}, - {"gui_auto_open_dialog", P_OFFINT (autodialog), TYPE_BOOL}, - {"gui_auto_open_recv", P_OFFINT (autoopendccrecvwindow), TYPE_BOOL}, - {"gui_auto_open_send", P_OFFINT (autoopendccsendwindow), TYPE_BOOL}, - {"gui_chanlist_maxusers", P_OFFINT (gui_chanlist_maxusers), TYPE_INT}, - {"gui_chanlist_minusers", P_OFFINT (gui_chanlist_minusers), TYPE_INT}, - {"gui_compact", P_OFFINT (gui_compact), TYPE_BOOL}, - {"gui_dialog_height", P_OFFINT (dialog_height), TYPE_INT}, - {"gui_dialog_left", P_OFFINT (dialog_left), TYPE_INT}, - {"gui_dialog_top", P_OFFINT (dialog_top), TYPE_INT}, - {"gui_dialog_width", P_OFFINT (dialog_width), TYPE_INT}, - {"gui_hide_menu", P_OFFINT (hidemenu), TYPE_BOOL}, - {"gui_input_nick", P_OFFINT (gui_input_nick), TYPE_BOOL}, - {"gui_input_spell", P_OFFINT (gui_input_spell), TYPE_BOOL}, - {"gui_input_style", P_OFFINT (style_inputbox), TYPE_BOOL}, - {"gui_join_dialog", P_OFFINT (gui_join_dialog), TYPE_BOOL}, - {"gui_lagometer", P_OFFINT (lagometer), TYPE_INT}, - {"gui_lang", P_OFFINT (gui_lang), TYPE_INT}, - {"gui_mode_buttons", P_OFFINT (chanmodebuttons), TYPE_BOOL}, - {"gui_one_instance", P_OFFINT (gui_one_instance), TYPE_BOOL}, - {"gui_pane_left_size", P_OFFINT (gui_pane_left_size), TYPE_INT}, - {"gui_pane_right_size", P_OFFINT (gui_pane_right_size), TYPE_INT}, - {"gui_pane_right_size_min", P_OFFINT (gui_pane_right_size_min), TYPE_INT}, - {"gui_quit_dialog", P_OFFINT (gui_quit_dialog), TYPE_BOOL}, - {"gui_slist_fav", P_OFFINT (slist_fav), TYPE_INT}, - {"gui_slist_select", P_OFFINT (slist_select), TYPE_INT}, - {"gui_slist_skip", P_OFFINT (slist_skip), TYPE_BOOL}, - {"gui_tab_chans", P_OFFINT (tabchannels), TYPE_BOOL}, - {"gui_tab_dialogs", P_OFFINT (privmsgtab), TYPE_BOOL}, - {"gui_tab_dots", P_OFFINT (gui_tab_dots), TYPE_BOOL}, - {"gui_tab_icons", P_OFFINT (tab_icons), TYPE_BOOL}, - {"gui_tab_layout", P_OFFINT (tab_layout), TYPE_INT}, - {"gui_tab_newtofront", P_OFFINT (newtabstofront), TYPE_INT}, - {"gui_tab_notices", P_OFFINT (notices_tabs), TYPE_BOOL}, - {"gui_tab_pos", P_OFFINT (tab_pos), TYPE_INT}, - {"gui_tab_server", P_OFFINT (use_server_tab), TYPE_BOOL}, - {"gui_tab_small", P_OFFINT (tab_small), TYPE_INT}, - {"gui_tab_sort", P_OFFINT (tab_sort), TYPE_BOOL}, - {"gui_tab_trunc", P_OFFINT (truncchans), TYPE_INT}, - {"gui_tab_utils", P_OFFINT (windows_as_tabs), TYPE_BOOL}, - {"gui_throttlemeter", P_OFFINT (throttlemeter), TYPE_INT}, - {"gui_topicbar", P_OFFINT (topicbar), TYPE_BOOL}, - {"gui_tray", P_OFFINT (gui_tray), TYPE_BOOL}, - {"gui_tray_flags", P_OFFINT (gui_tray_flags), TYPE_INT}, - {"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}, - {"gui_ulist_sort", P_OFFINT (userlist_sort), TYPE_INT}, - {"gui_ulist_style", P_OFFINT (style_namelistgad), TYPE_BOOL}, - {"gui_url_mod", P_OFFINT (gui_url_mod), TYPE_INT}, - {"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_swap", P_OFFINT (gui_win_swap), TYPE_BOOL}, - {"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}, + {"gui_autoopen_chat", P_OFFINT (hex_gui_autoopen_chat), TYPE_BOOL}, + {"gui_autoopen_dialog", P_OFFINT (hex_gui_autoopen_dialog), TYPE_BOOL}, + {"gui_autoopen_recv", P_OFFINT (hex_gui_autoopen_recv), TYPE_BOOL}, + {"gui_autoopen_send", P_OFFINT (hex_gui_autoopen_send), TYPE_BOOL}, + {"gui_chanlist_maxusers", P_OFFINT (hex_gui_chanlist_maxusers), TYPE_INT}, + {"gui_chanlist_minusers", P_OFFINT (hex_gui_chanlist_minusers), TYPE_INT}, + {"gui_compact", P_OFFINT (hex_gui_compact), TYPE_BOOL}, + {"gui_dialog_height", P_OFFINT (hex_gui_dialog_height), TYPE_INT}, + {"gui_dialog_left", P_OFFINT (hex_gui_dialog_left), TYPE_INT}, + {"gui_dialog_top", P_OFFINT (hex_gui_dialog_top), TYPE_INT}, + {"gui_prefs.hex_gui_dialog_width", P_OFFINT (hex_gui_dialog_width), TYPE_INT}, + {"gui_hide_menu", P_OFFINT (hex_gui_hide_menu), TYPE_BOOL}, + {"gui_input_nick", P_OFFINT (hex_gui_input_nick), TYPE_BOOL}, + {"gui_input_spell", P_OFFINT (hex_gui_input_spell), TYPE_BOOL}, + {"gui_input_style", P_OFFINT (hex_gui_input_style), TYPE_BOOL}, + {"gui_join_dialog", P_OFFINT (hex_gui_join_dialog), TYPE_BOOL}, + {"gui_lagometer", P_OFFINT (hex_gui_lagometer), TYPE_INT}, + {"gui_lang", P_OFFINT (hex_gui_lang), TYPE_INT}, + {"gui_mode_buttons", P_OFFINT (hex_gui_mode_buttons), TYPE_BOOL}, + {"gui_pane_left_size", P_OFFINT (hex_gui_pane_left_size), TYPE_INT}, + {"gui_pane_right_size", P_OFFINT (hex_gui_pane_right_size), TYPE_INT}, + {"gui_pane_right_size_min", P_OFFINT (hex_gui_pane_right_size_min), TYPE_INT}, + {"gui_quit_dialog", P_OFFINT (hex_gui_quit_dialog), TYPE_BOOL}, + {"gui_single", P_OFFINT (hex_gui_single), TYPE_BOOL}, + {"gui_slist_fav", P_OFFINT (hex_gui_slist_fav), TYPE_BOOL}, + {"gui_slist_select", P_OFFINT (hex_gui_slist_select), TYPE_INT}, + {"gui_slist_skip", P_OFFINT (hex_gui_slist_skip), TYPE_BOOL}, + {"gui_tab_chans", P_OFFINT (hex_gui_tab_chans), TYPE_BOOL}, + {"gui_tab_dialogs", P_OFFINT (hex_gui_tab_dialogs), TYPE_BOOL}, + {"gui_tab_dots", P_OFFINT (hex_gui_tab_dots), TYPE_BOOL}, + {"gui_tab_icons", P_OFFINT (hex_gui_tab_icons), TYPE_BOOL}, + {"gui_tab_layout", P_OFFINT (hex_gui_tab_layout), TYPE_INT}, + {"gui_tab_newtofront", P_OFFINT (hex_gui_tab_newtofront), TYPE_INT}, + {"gui_tab_notices", P_OFFINT (hex_gui_tab_notices), TYPE_BOOL}, + {"gui_tab_pos", P_OFFINT (hex_gui_tab_pos), TYPE_INT}, + {"gui_tab_server", P_OFFINT (hex_gui_tab_server), TYPE_BOOL}, + {"gui_tab_small", P_OFFINT (hex_gui_tab_small), TYPE_INT}, + {"gui_tab_sort", P_OFFINT (hex_gui_tab_sort), TYPE_BOOL}, + {"gui_tab_trunc", P_OFFINT (hex_gui_tab_trunc), TYPE_INT}, + {"gui_tab_utils", P_OFFINT (hex_gui_tab_utils), TYPE_BOOL}, + {"gui_throttlemeter", P_OFFINT (hex_gui_throttlemeter), TYPE_INT}, + {"gui_topicbar", P_OFFINT (hex_gui_topicbar), TYPE_BOOL}, + {"gui_tray", P_OFFINT (hex_gui_tray), TYPE_BOOL}, + {"gui_tray_flags", P_OFFINT (hex_gui_tray_flags), TYPE_INT}, + {"gui_ulist_buttons", P_OFFINT (hex_gui_ulist_buttons), TYPE_BOOL}, + {"gui_ulist_doubleclick", P_OFFSET (hex_gui_ulist_doubleclick), TYPE_STR}, + {"gui_ulist_hide", P_OFFINT (hex_gui_ulist_hide), TYPE_BOOL}, + {"gui_ulist_icons", P_OFFINT (hex_gui_ulist_icons), TYPE_BOOL}, + {"gui_ulist_pos", P_OFFINT (hex_gui_ulist_pos), TYPE_INT}, + {"gui_ulist_resizable", P_OFFINT (hex_gui_ulist_resizable), TYPE_BOOL}, + {"gui_ulist_show_hosts", P_OFFINT(hex_gui_ulist_show_hosts), TYPE_BOOL}, + {"gui_ulist_sort", P_OFFINT (hex_gui_ulist_sort), TYPE_INT}, + {"gui_ulist_style", P_OFFINT (hex_gui_ulist_style), TYPE_BOOL}, + {"gui_url_mod", P_OFFINT (hex_gui_url_mod), TYPE_INT}, + {"gui_usermenu", P_OFFINT (hex_gui_usermenu), TYPE_BOOL}, + {"gui_win_height", P_OFFINT (hex_gui_win_height), TYPE_INT}, + {"gui_win_left", P_OFFINT (hex_gui_win_left), TYPE_INT}, + {"gui_win_modes", P_OFFINT (hex_gui_win_modes), TYPE_BOOL}, + {"gui_win_save", P_OFFINT (hex_gui_win_save), TYPE_BOOL}, + {"gui_win_state", P_OFFINT (hex_gui_win_state), TYPE_INT}, + {"gui_win_swap", P_OFFINT (hex_gui_win_swap), TYPE_BOOL}, + {"gui_win_top", P_OFFINT (hex_gui_win_top), TYPE_INT}, + {"gui_win_ucount", P_OFFINT (hex_gui_win_ucount), TYPE_BOOL}, + {"gui_win_width", P_OFFINT (hex_gui_win_width), TYPE_INT}, #ifdef WIN32 {"identd", P_OFFINT (identd), TYPE_BOOL}, #endif + {"input_balloon_chans", P_OFFINT (input_balloon_chans), TYPE_BOOL}, {"input_balloon_hilight", P_OFFINT (input_balloon_hilight), TYPE_BOOL}, {"input_balloon_priv", P_OFFINT (input_balloon_priv), TYPE_BOOL}, @@ -658,13 +659,13 @@ load_config (void) prefs.local_ip = 0xffffffff; prefs.irc_join_delay = 3; prefs.show_marker = 1; - prefs.newtabstofront = 2; + prefs.hex_gui_tab_newtofront = 2; prefs.hex_completion_amount = 5; prefs.hex_away_timeout = 60; prefs.hex_away_size_max = 300; prefs.hex_away_track = 1; prefs.timestamp_logs = 1; - prefs.truncchans = 20; + prefs.hex_gui_tab_trunc = 20; prefs.hex_dcc_auto_resume = 1; prefs.hex_away_show_once = 1; prefs.indent_nicks = 1; @@ -674,34 +675,34 @@ load_config (void) prefs.hex_dcc_fast_send = 1; #endif prefs.wordwrap = 1; - prefs.autodialog = 1; - prefs.gui_input_spell = 1; - prefs.gui_lang = 15; + prefs.hex_gui_autoopen_dialog = 1; + prefs.hex_gui_input_spell = 1; + prefs.hex_gui_lang = 15; prefs.autoreconnect = 1; prefs.recon_delay = 10; prefs.autocopy_text = 1; prefs.text_replay = 1; prefs.text_stripcolor_replay = 1; prefs.text_stripcolor_topic = 1; - prefs.tabchannels = 1; - prefs.tab_layout = 2; /* 0=Tabs 1=Reserved 2=Tree */ - prefs.tab_icons = 1; - prefs.tab_sort = 1; - prefs.paned_userlist = 1; - prefs.newtabstofront = 2; - prefs.use_server_tab = 1; - prefs.privmsgtab = 1; + prefs.hex_gui_tab_chans = 1; + prefs.hex_gui_tab_layout = 2; /* 0=Tabs 1=Reserved 2=Tree */ + prefs.hex_gui_tab_icons = 1; + prefs.hex_gui_tab_sort = 1; + prefs.hex_gui_ulist_resizable = 1; + prefs.hex_gui_tab_newtofront = 2; + prefs.hex_gui_tab_server = 1; + prefs.hex_gui_tab_dialogs = 1; /* prefs.colorednicks = 1; */ - prefs.style_inputbox = 1; - prefs.style_namelistgad = 1; + prefs.hex_gui_input_style = 1; + prefs.hex_gui_ulist_style = 1; prefs.hex_dcc_permissions = 0600; prefs.max_lines = 500; - prefs.mainwindow_width = 640; - prefs.mainwindow_height = 400; - prefs.dialog_width = 500; - prefs.dialog_height = 256; - prefs.gui_join_dialog = 1; - prefs.gui_quit_dialog = 1; + prefs.hex_gui_win_width = 640; + prefs.hex_gui_win_height = 400; + prefs.hex_gui_dialog_width = 500; + prefs.hex_gui_dialog_height = 256; + prefs.hex_gui_join_dialog = 1; + prefs.hex_gui_quit_dialog = 1; prefs.hex_dcc_timeout = 180; prefs.hex_dcc_stall_timeout = 60; prefs.notify_timeout = 15; @@ -717,25 +718,25 @@ load_config (void) prefs.hex_flood_msg_time = 5; prefs.hex_flood_ctcp_time = 30; prefs.hex_flood_ctcp_num = 5; - prefs.topicbar = 1; - prefs.lagometer = 1; - prefs.throttlemeter = 1; - prefs.autoopendccrecvwindow = 1; - prefs.autoopendccsendwindow = 1; - prefs.autoopendccchatwindow = 1; + prefs.hex_gui_topicbar = 1; + prefs.hex_gui_lagometer = 1; + prefs.hex_gui_throttlemeter = 1; + prefs.hex_gui_autoopen_recv = 1; + prefs.hex_gui_autoopen_send = 1; + prefs.hex_gui_autoopen_chat = 1; /* prevent kicks and bans caused by overwhelming who'ing after reconnects */ /* prefs.userhost = 1; */ - prefs.gui_chanlist_maxusers = 9999; - prefs.gui_chanlist_minusers = 5; - prefs.gui_tab_dots = 1; - prefs.gui_tray = 1; - 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.hex_gui_chanlist_maxusers = 9999; + prefs.hex_gui_chanlist_minusers = 5; + prefs.hex_gui_tab_dots = 1; + prefs.hex_gui_tray = 1; + prefs.hex_gui_pane_left_size = 128; /* with treeview icons we need a bit bigger space */ + prefs.hex_gui_pane_right_size = 100; + prefs.hex_gui_pane_right_size_min = 80; + prefs.hex_gui_tab_pos = 1; + prefs.hex_gui_ulist_icons = 1; + prefs.hex_gui_ulist_pos = 3; + prefs.hex_gui_win_save = 1; prefs.bantype = 2; prefs.input_balloon_time = 20; prefs.input_flash_priv = prefs.input_flash_hilight = 1; @@ -776,7 +777,7 @@ load_config (void) snprintf (prefs.sounddir, sizeof (prefs.sounddir), "%s/sounds", get_xdir_utf8 ()); snprintf (prefs.hex_dcc_dir, sizeof (prefs.hex_dcc_dir), "%s/downloads", get_xdir_utf8 ()); #endif - strcpy (prefs.doubleclickuser, "QUOTE WHOIS %s %s"); + strcpy (prefs.hex_gui_ulist_doubleclick, "QUOTE WHOIS %s %s"); strcpy (prefs.hex_away_reason, _("I'm busy")); strcpy (prefs.quitreason, _("Leaving")); strcpy (prefs.partreason, prefs.quitreason); @@ -835,10 +836,10 @@ load_config (void) mkdir_utf8 (prefs.hex_dcc_dir); mkdir_utf8 (prefs.hex_dcc_completed_dir); } - if (prefs.mainwindow_height < 138) - prefs.mainwindow_height = 138; - if (prefs.mainwindow_width < 106) - prefs.mainwindow_width = 106; + if (prefs.hex_gui_win_height < 138) + prefs.hex_gui_win_height = 138; + if (prefs.hex_gui_win_width < 106) + prefs.hex_gui_win_width = 106; sp = strchr (prefs.username, ' '); if (sp) diff --git a/src/common/dcc.c b/src/common/dcc.c index 27483165..86a75754 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -796,7 +796,7 @@ dcc_read (GIOChannel *source, GIOCondition condition, struct DCC *dcc) static void dcc_open_query (server *serv, char *nick) { - if (prefs.autodialog) + if (prefs.hex_gui_autoopen_dialog) open_query (serv, nick, FALSE); } @@ -1855,7 +1855,7 @@ dcc_send (struct session *sess, char *to, char *file, int maxcps, int passive) file++; } dcc->nick = strdup (to); - if (prefs.autoopendccsendwindow) + if (prefs.hex_gui_autoopen_send) { if (fe_dcc_open_send_win (TRUE)) /* already open? add */ fe_dcc_add (dcc); @@ -2197,7 +2197,7 @@ dcc_chat (struct session *sess, char *nick, int passive) dcc->nick = strdup (nick); if (passive || dcc_listen_init (dcc, sess)) { - if (prefs.autoopendccchatwindow) + if (prefs.hex_gui_autoopen_chat) { if (fe_dcc_open_chat_win (TRUE)) /* already open? add only */ fe_dcc_add (dcc); @@ -2300,7 +2300,7 @@ dcc_add_chat (session *sess, char *nick, int port, guint32 addr, int pasvid) EMIT_SIGNAL (XP_TE_DCCCHATOFFER, sess->server->front_session, nick, NULL, NULL, NULL, 0); - if (prefs.autoopendccchatwindow) + if (prefs.hex_gui_autoopen_chat) { if (fe_dcc_open_chat_win (TRUE)) /* already open? add only */ fe_dcc_add (dcc); @@ -2383,7 +2383,7 @@ dcc_add_file (session *sess, char *file, DCC_SIZE size, int port, char *nick, gu { dcc_get (dcc); } - if (prefs.autoopendccrecvwindow) + if (prefs.hex_gui_autoopen_recv) { if (fe_dcc_open_recv_win (TRUE)) /* was already open? just add*/ fe_dcc_add (dcc); diff --git a/src/common/ignore.c b/src/common/ignore.c index 93ca5a76..aea482a2 100644 --- a/src/common/ignore.c +++ b/src/common/ignore.c @@ -335,7 +335,7 @@ ignore_save () static gboolean flood_autodialog_timeout (gpointer data) { - prefs.autodialog = 1; + prefs.hex_gui_autoopen_dialog = 1; return FALSE; } @@ -412,10 +412,10 @@ flood_check (char *nick, char *ip, server *serv, session *sess, int what) /*0=ct /*ignore_add (char *mask, int priv, int noti, int chan, int ctcp, int invi, int unignore, int no_save) */ - if (prefs.autodialog) + if (prefs.hex_gui_autoopen_dialog) { /*FIXME: only ignore ctcp or all?, its ignoring ctcps for now */ - prefs.autodialog = 0; + prefs.hex_gui_autoopen_dialog = 0; /* turn it back on in 30 secs */ fe_timeout_add (30000, flood_autodialog_timeout, NULL); } diff --git a/src/common/inbound.c b/src/common/inbound.c index 67bc2ea9..6727a2e8 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -160,9 +160,9 @@ inbound_privmsg (server *serv, char *from, char *ip, char *text, int id) sess = find_dialog (serv, from); - if (sess || prefs.autodialog) + if (sess || prefs.hex_gui_autoopen_dialog) { - /*0=ctcp 1=priv will set autodialog=0 here is flud detected */ + /*0=ctcp 1=priv will set hex_gui_autoopen_dialog=0 here is flud detected */ if (!sess) { if (flood_check (from, ip, serv, current_sess, 1)) @@ -333,7 +333,7 @@ inbound_action (session *sess, char *chan, char *from, char *ip, char *text, int /* find a dialog tab for it */ sess = find_dialog (serv, from); /* if non found, open a new one */ - if (!sess && prefs.autodialog) + if (!sess && prefs.hex_gui_autoopen_dialog) { /* but only if it wouldn't flood */ if (flood_check (from, ip, serv, current_sess, 1)) @@ -863,7 +863,7 @@ inbound_notice (server *serv, char *to, char *nick, char *msg, char *ip, int id) if (!sess) { ptr = 0; - if (prefs.notices_tabs) + if (prefs.hex_gui_tab_notices) { int stype = server_notice ? SESS_SNOTICES : SESS_NOTICES; sess = find_session_from_type (stype, serv); diff --git a/src/common/servlist.c b/src/common/servlist.c index 2c6ee181..5ca80ed0 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -986,7 +986,7 @@ servlist_load_defaults (void) } /* 0x8e1b96f7 = ChatJunkies, 0xa82686ae = FreeNode */ if (g_str_hash (def[i].network) == 0xa82686ae) - prefs.slist_select = j; + prefs.hex_gui_slist_select = j; j++; } else { diff --git a/src/common/userlist.c b/src/common/userlist.c index a18485b1..2dedb997 100644 --- a/src/common/userlist.c +++ b/src/common/userlist.c @@ -61,7 +61,7 @@ nick_cmp_alpha (struct User *user1, struct User *user2, server *serv) static int nick_cmp (struct User *user1, struct User *user2, server *serv) { - switch (prefs.userlist_sort) + switch (prefs.hex_gui_ulist_sort) { case 0: return nick_cmp_az_ops (serv, user1, user2); @@ -131,7 +131,7 @@ userlist_add_hostname (struct session *sess, char *nick, char *hostname, if (away != 0xff) { - if (prefs.showhostname_in_userlist || user->away != away) + if (prefs.hex_gui_ulist_show_hosts || user->away != away) { user->away = away; fe_userlist_rehash (sess, user); diff --git a/src/common/xchat.c b/src/common/xchat.c index 9babd6c4..343f84ff 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -152,7 +152,7 @@ lagcheck_update (void) server *serv; GSList *list = serv_list; - if (!prefs.lagometer) + if (!prefs.hex_gui_lagometer) return; while (list) @@ -280,7 +280,7 @@ xchat_misc_checks (void) /* this gets called every 1/2 second */ if (count >= 60) /* every 30 seconds */ { - if (prefs.lagometer) + if (prefs.hex_gui_lagometer) lag_check (); count = 0; } @@ -389,7 +389,7 @@ new_ircwindow (server *serv, char *name, int type, int focus) { case SESS_SERVER: serv = server_new (); - if (prefs.use_server_tab) + if (prefs.hex_gui_tab_server) sess = session_new (serv, name, SESS_SERVER, focus); else sess = session_new (serv, name, SESS_CHANNEL, focus); @@ -818,7 +818,7 @@ xchat_init (void) servlist_init (); /* load server list */ /* if we got a URL, don't open the server list GUI */ - if (!prefs.slist_skip && !arg_url) + if (!prefs.hex_gui_slist_skip && !arg_url) fe_serverlist_open (NULL); /* turned OFF via -a arg */ @@ -828,7 +828,7 @@ xchat_init (void) if (!servlist_have_auto ()) /* if no new windows open .. */ { /* and no serverlist gui ... */ - if (prefs.slist_skip || arg_url) + if (prefs.hex_gui_slist_skip || arg_url) /* we'll have to open one. */ new_ircwindow (NULL, NULL, SESS_SERVER, 0); } else @@ -837,7 +837,7 @@ xchat_init (void) } } else { - if (prefs.slist_skip || arg_url) + if (prefs.hex_gui_slist_skip || arg_url) new_ircwindow (NULL, NULL, SESS_SERVER, 0); } } @@ -953,7 +953,7 @@ main (int argc, char *argv[]) int ret; #ifdef WIN32 - char hexchat_lang[13]; /* LC_ALL= plus 5 chars of gui_lang and trailing \0 */ + char hexchat_lang[13]; /* LC_ALL= plus 5 chars of hex_gui_lang and trailing \0 */ HANDLE mutex; #endif @@ -966,7 +966,7 @@ main (int argc, char *argv[]) strcpy (hexchat_lang, "LC_ALL="); /* this must be ordered EXACTLY as langsmenu[] */ - switch (prefs.gui_lang) + switch (prefs.hex_gui_lang) { case 0: strcat (hexchat_lang, "af"); @@ -1128,7 +1128,7 @@ main (int argc, char *argv[]) putenv (hexchat_lang); - if (prefs.gui_one_instance && !portable_mode ()) + if (prefs.hex_gui_single && !portable_mode ()) { DWORD error; @@ -1193,7 +1193,7 @@ main (int argc, char *argv[]) #ifdef WIN32 WSACleanup (); - if (prefs.gui_one_instance && !portable_mode ()) + if (prefs.hex_gui_single && !portable_mode ()) { ReleaseMutex (mutex); CloseHandle (mutex); diff --git a/src/common/xchat.h b/src/common/xchat.h index f4f5e075..c7aee0f7 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -112,6 +112,7 @@ struct hexchatprefs char hex_dcc_dir[PATHLEN + 1]; char hex_dcc_ip[DOMAINLEN + 1]; char hex_dnsprogram[72]; + char hex_gui_ulist_doubleclick[256]; int hex_away_size_max; int hex_away_timeout; @@ -132,6 +133,33 @@ struct hexchatprefs int hex_flood_ctcp_time; /*seconds of floods */ int hex_flood_msg_num; /*same deal */ int hex_flood_msg_time; + int hex_gui_chanlist_maxusers; + int hex_gui_chanlist_minusers; + int hex_gui_dialog_height; + int hex_gui_dialog_left; + int hex_gui_dialog_top; + int hex_gui_dialog_width; + int hex_gui_lagometer; + int hex_gui_lang; + int hex_gui_pane_left_size; + int hex_gui_pane_right_size; + int hex_gui_pane_right_size_min; + int hex_gui_slist_select; + int hex_gui_tab_layout; + int hex_gui_tab_newtofront; + int hex_gui_tab_pos; + int hex_gui_tab_small; + int hex_gui_tab_trunc; + int hex_gui_throttlemeter; + int hex_gui_tray_flags; + int hex_gui_ulist_pos; + int hex_gui_ulist_sort; + int hex_gui_url_mod; + int hex_gui_win_height; + int hex_gui_win_left; + int hex_gui_win_state; + int hex_gui_win_top; + int hex_gui_win_width; unsigned int hex_away_auto_unmark; unsigned int hex_away_omit_alerts; @@ -146,6 +174,42 @@ struct hexchatprefs unsigned int hex_dcc_remove; unsigned int hex_dcc_save_nick; unsigned int hex_dcc_send_fillspaces; + unsigned int hex_gui_autoopen_chat; + unsigned int hex_gui_autoopen_dialog; + unsigned int hex_gui_autoopen_recv; + unsigned int hex_gui_autoopen_send; + unsigned int hex_gui_compact; + unsigned int hex_gui_hide_menu; + unsigned int hex_gui_input_nick; + unsigned int hex_gui_input_spell; + unsigned int hex_gui_input_style; + unsigned int hex_gui_join_dialog; + unsigned int hex_gui_mode_buttons; + unsigned int hex_gui_quit_dialog; + unsigned int hex_gui_single; + unsigned int hex_gui_slist_fav; + unsigned int hex_gui_slist_skip; + unsigned int hex_gui_tab_chans; + unsigned int hex_gui_tab_dialogs; + unsigned int hex_gui_tab_dots; + unsigned int hex_gui_tab_icons; + unsigned int hex_gui_tab_notices; + unsigned int hex_gui_tab_server; + unsigned int hex_gui_tab_sort; + unsigned int hex_gui_tab_utils; + unsigned int hex_gui_topicbar; + unsigned int hex_gui_tray; + unsigned int hex_gui_ulist_buttons; + unsigned int hex_gui_ulist_hide; + unsigned int hex_gui_ulist_icons; + unsigned int hex_gui_ulist_resizable; + unsigned int hex_gui_ulist_show_hosts; + unsigned int hex_gui_ulist_style; + unsigned int hex_gui_usermenu; + unsigned int hex_gui_win_modes; + unsigned int hex_gui_win_save; + unsigned int hex_gui_win_swap; + unsigned int hex_gui_win_ucount; /* these are the legacy variables */ @@ -159,7 +223,6 @@ struct hexchatprefs char font_normal[4 * FONTNAMELEN + 1]; char font_main[FONTNAMELEN + 1]; char font_alternative[3 * FONTNAMELEN + 1]; - char doubleclickuser[256]; char spell_langs[64]; char sounddir[PATHLEN + 1]; char soundcmd[PATHLEN + 1]; @@ -187,43 +250,16 @@ struct hexchatprefs int tint_green; int tint_blue; - int gui_pane_left_size; - int gui_pane_right_size; - int gui_pane_right_size_min; - - int gui_chanlist_maxusers; - int gui_chanlist_minusers; - int gui_ulist_pos; - int tab_pos; - - int tab_layout; int max_auto_indent; int max_lines; int notify_timeout; - int mainwindow_left; - int mainwindow_top; - int mainwindow_width; - int mainwindow_height; - int gui_win_state; - int gui_url_mod; - int gui_lang; - int dialog_left; - int dialog_top; - int dialog_width; - int dialog_height; int recon_delay; int bantype; - int userlist_sort; guint32 local_ip; guint32 dcc_ip; - unsigned int tab_small; - unsigned int tab_icons; - unsigned int tab_sort; - unsigned int mainwindow_save; unsigned int perc_color; unsigned int perc_ascii; - unsigned int autodialog; unsigned int autoreconnect; unsigned int autoreconnectonfail; unsigned int invisible; @@ -235,22 +271,11 @@ struct hexchatprefs unsigned int autocopy_stamp; unsigned int autocopy_color; unsigned int colorednicks; - unsigned int chanmodebuttons; - unsigned int userlistbuttons; - unsigned int showhostname_in_userlist; - unsigned int tabchannels; - unsigned int paned_userlist; - unsigned int autoopendccsendwindow; - unsigned int autoopendccrecvwindow; - unsigned int autoopendccchatwindow; unsigned int transparent; unsigned int text_stripcolor_msg; unsigned int text_stripcolor_replay; unsigned int text_stripcolor_topic; unsigned int timestamp; - unsigned int slist_fav; - unsigned int slist_skip; - unsigned int slist_select; unsigned int filterbeep; unsigned int input_balloon_chans; @@ -270,8 +295,6 @@ struct hexchatprefs unsigned int input_tray_hilight; unsigned int input_tray_priv; - unsigned int truncchans; - unsigned int privmsgtab; unsigned int irc_join_delay; unsigned int logging; unsigned int timestamp_logs; @@ -280,14 +303,6 @@ struct hexchatprefs unsigned int raw_modes; unsigned int userhost; unsigned int irc_whois_front; - unsigned int use_server_tab; - unsigned int notices_tabs; - unsigned int style_namelistgad; - unsigned int style_inputbox; - unsigned int gui_join_dialog; - unsigned int gui_quit_dialog; - unsigned int gui_usermenu; - unsigned int windows_as_tabs; unsigned int indent_nicks; unsigned int text_replay; unsigned int show_marker; @@ -295,30 +310,14 @@ struct hexchatprefs unsigned int thin_separator; unsigned int auto_indent; unsigned int wordwrap; - unsigned int gui_compact; - unsigned int gui_input_nick; - unsigned int gui_input_spell; - unsigned int gui_tab_dots; - unsigned int gui_tray; - unsigned int gui_tray_flags; - unsigned int gui_ulist_icons; - unsigned int gui_win_modes; - unsigned int gui_win_swap; - unsigned int gui_win_ucount; unsigned int throttle; - unsigned int topicbar; - unsigned int hideuserlist; - unsigned int hidemenu; unsigned int perlwarnings; - unsigned int lagometer; - unsigned int throttlemeter; unsigned int pingtimeout; unsigned int whois_on_notifyonline; unsigned int wait_on_exit; unsigned int confmode; unsigned int utf8_locale; unsigned int identd; - unsigned int gui_one_instance; unsigned int url_grabber; unsigned int url_grabber_limit; -- cgit 1.4.1