Get rid of some hardcoding
This commit is contained in:
parent
d20daad417
commit
902063d932
|
@ -273,7 +273,7 @@ cmd_addserver (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||||
if (!network)
|
if (!network)
|
||||||
{
|
{
|
||||||
network = servlist_net_add (word[2], "", TRUE);
|
network = servlist_net_add (word[2], "", TRUE);
|
||||||
network->encoding = strdup ("IRC (Latin/Unicode Hybrid)");
|
network->encoding = strdup (IRC_DEFAULT_CHARSET);
|
||||||
}
|
}
|
||||||
/* if we had the network already, check if the given server already exists */
|
/* if we had the network already, check if the given server already exists */
|
||||||
else if (servlist_server_find (network, word_eol[3], NULL))
|
else if (servlist_server_find (network, word_eol[3], NULL))
|
||||||
|
|
|
@ -970,7 +970,7 @@ servlist_load_defaults (void)
|
||||||
if (def[i].network)
|
if (def[i].network)
|
||||||
{
|
{
|
||||||
net = servlist_net_add (def[i].network, def[i].host, FALSE);
|
net = servlist_net_add (def[i].network, def[i].host, FALSE);
|
||||||
net->encoding = strdup ("IRC (Latin/Unicode Hybrid)");
|
net->encoding = strdup (IRC_DEFAULT_CHARSET);
|
||||||
if (def[i].channel)
|
if (def[i].channel)
|
||||||
net->autojoin = strdup (def[i].channel);
|
net->autojoin = strdup (def[i].channel);
|
||||||
if (def[i].charset)
|
if (def[i].charset)
|
||||||
|
|
|
@ -35,6 +35,9 @@ extern GSList *network_list;
|
||||||
#define FLAG_FAVORITE 64
|
#define FLAG_FAVORITE 64
|
||||||
#define FLAG_COUNT 7
|
#define FLAG_COUNT 7
|
||||||
|
|
||||||
|
/* DEFAULT_CHARSET is already defined in wingdi.h */
|
||||||
|
#define IRC_DEFAULT_CHARSET "IRC (Latin/Unicode Hybrid)"
|
||||||
|
|
||||||
void servlist_init (void);
|
void servlist_init (void);
|
||||||
int servlist_save (void);
|
int servlist_save (void);
|
||||||
int servlist_cycle (server *serv);
|
int servlist_cycle (server *serv);
|
||||||
|
|
|
@ -92,7 +92,7 @@ static GtkWidget *servlist_open_edit (GtkWidget *parent, ircnet *net);
|
||||||
static const char *pages[]=
|
static const char *pages[]=
|
||||||
{
|
{
|
||||||
"UTF-8 (Unicode)",
|
"UTF-8 (Unicode)",
|
||||||
"IRC (Latin/Unicode Hybrid)",
|
IRC_DEFAULT_CHARSET,
|
||||||
"ISO-8859-15 (Western Europe)",
|
"ISO-8859-15 (Western Europe)",
|
||||||
"ISO-8859-2 (Central Europe)",
|
"ISO-8859-2 (Central Europe)",
|
||||||
"ISO-8859-7 (Greek)",
|
"ISO-8859-7 (Greek)",
|
||||||
|
@ -279,7 +279,7 @@ servlist_addnet_cb (GtkWidget *item, GtkTreeView *treeview)
|
||||||
ircnet *net;
|
ircnet *net;
|
||||||
|
|
||||||
net = servlist_net_add (_("New Network"), "", TRUE);
|
net = servlist_net_add (_("New Network"), "", TRUE);
|
||||||
net->encoding = strdup ("IRC (Latin/Unicode Hybrid)");
|
net->encoding = strdup (IRC_DEFAULT_CHARSET);
|
||||||
servlist_server_add (net, "newserver/6667");
|
servlist_server_add (net, "newserver/6667");
|
||||||
|
|
||||||
store = (GtkListStore *)gtk_tree_view_get_model (treeview);
|
store = (GtkListStore *)gtk_tree_view_get_model (treeview);
|
||||||
|
|
Loading…
Reference in New Issue