mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-09-17 21:29:58 +00:00
test first start experience
This commit is contained in:
@@ -429,6 +429,8 @@ const struct prefs vars[] =
|
|||||||
{"gui_lang", P_OFFINT (hex_gui_lang), TYPE_INT},
|
{"gui_lang", P_OFFINT (hex_gui_lang), TYPE_INT},
|
||||||
{"gui_mode_buttons", P_OFFINT (hex_gui_mode_buttons), TYPE_BOOL},
|
{"gui_mode_buttons", P_OFFINT (hex_gui_mode_buttons), TYPE_BOOL},
|
||||||
{"gui_mode_buttons_inline", P_OFFINT (hex_gui_mode_buttons_inline), TYPE_BOOL},
|
{"gui_mode_buttons_inline", P_OFFINT (hex_gui_mode_buttons_inline), TYPE_BOOL},
|
||||||
|
{"gui_onboarding_disable", P_OFFINT (hex_gui_onboarding_disable), TYPE_BOOL},
|
||||||
|
{"gui_onboarding_pending", P_OFFINT (hex_gui_onboarding_pending), TYPE_BOOL},
|
||||||
{"gui_pane_divider_position", P_OFFINT (hex_gui_pane_divider_position), TYPE_INT},
|
{"gui_pane_divider_position", P_OFFINT (hex_gui_pane_divider_position), TYPE_INT},
|
||||||
{"gui_pane_left_size", P_OFFINT (hex_gui_pane_left_size), TYPE_INT},
|
{"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", P_OFFINT (hex_gui_pane_right_size), TYPE_INT},
|
||||||
|
|||||||
@@ -191,6 +191,8 @@ struct defaultserver
|
|||||||
gboolean ssl;
|
gboolean ssl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static gboolean servlist_needs_onboarding_flag;
|
||||||
|
|
||||||
static const struct defaultserver def[] =
|
static const struct defaultserver def[] =
|
||||||
{
|
{
|
||||||
{"2600net", 0},
|
{"2600net", 0},
|
||||||
@@ -1181,7 +1183,10 @@ servlist_load (void)
|
|||||||
|
|
||||||
fp = zoitechat_fopen_file ("servlist.conf", "r", 0);
|
fp = zoitechat_fopen_file ("servlist.conf", "r", 0);
|
||||||
if (!fp)
|
if (!fp)
|
||||||
|
{
|
||||||
|
servlist_needs_onboarding_flag = TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
while (fgets (buf, sizeof (buf) - 2, fp))
|
while (fgets (buf, sizeof (buf) - 2, fp))
|
||||||
{
|
{
|
||||||
@@ -1245,6 +1250,7 @@ servlist_load (void)
|
|||||||
net = servlist_net_add (buf + 2, NULL, FALSE);
|
net = servlist_net_add (buf + 2, NULL, FALSE);
|
||||||
}
|
}
|
||||||
fclose (fp);
|
fclose (fp);
|
||||||
|
servlist_needs_onboarding_flag = (network_list == NULL);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -1253,8 +1259,16 @@ void
|
|||||||
servlist_init (void)
|
servlist_init (void)
|
||||||
{
|
{
|
||||||
if (!network_list)
|
if (!network_list)
|
||||||
if (!servlist_load ())
|
{
|
||||||
|
if (!servlist_load () || !network_list)
|
||||||
servlist_load_defaults ();
|
servlist_load_defaults ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
servlist_needs_onboarding (void)
|
||||||
|
{
|
||||||
|
return servlist_needs_onboarding_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if a charset is known by Iconv */
|
/* check if a charset is known by Iconv */
|
||||||
@@ -1395,6 +1409,7 @@ servlist_save (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fclose (fp);
|
fclose (fp);
|
||||||
|
servlist_needs_onboarding_flag = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ extern GSList *network_list;
|
|||||||
#define IRC_DEFAULT_CHARSET "UTF-8 (Unicode)"
|
#define IRC_DEFAULT_CHARSET "UTF-8 (Unicode)"
|
||||||
|
|
||||||
void servlist_init (void);
|
void servlist_init (void);
|
||||||
|
gboolean servlist_needs_onboarding (void);
|
||||||
int servlist_save (void);
|
int servlist_save (void);
|
||||||
int servlist_cycle (server *serv);
|
int servlist_cycle (server *serv);
|
||||||
void servlist_connect (session *sess, ircnet *net, gboolean join);
|
void servlist_connect (session *sess, ircnet *net, gboolean join);
|
||||||
|
|||||||
@@ -134,6 +134,8 @@ struct zoitechatprefs
|
|||||||
unsigned int hex_gui_join_dialog;
|
unsigned int hex_gui_join_dialog;
|
||||||
unsigned int hex_gui_mode_buttons;
|
unsigned int hex_gui_mode_buttons;
|
||||||
unsigned int hex_gui_mode_buttons_inline;
|
unsigned int hex_gui_mode_buttons_inline;
|
||||||
|
unsigned int hex_gui_onboarding_disable;
|
||||||
|
unsigned int hex_gui_onboarding_pending;
|
||||||
unsigned int hex_gui_quit_dialog;
|
unsigned int hex_gui_quit_dialog;
|
||||||
/* unsigned int hex_gui_single; */
|
/* unsigned int hex_gui_single; */
|
||||||
unsigned int hex_gui_slist_fav;
|
unsigned int hex_gui_slist_fav;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -645,6 +645,9 @@ static const char *const proxyuse[] =
|
|||||||
|
|
||||||
static const setting network_settings[] =
|
static const setting network_settings[] =
|
||||||
{
|
{
|
||||||
|
{ST_HEADER, N_("Startup"), 0, 0, 0, 0},
|
||||||
|
{ST_TOGGLE, N_("Disable first-run assistant"), P_OFFINTNL(hex_gui_onboarding_disable), 0, 0, 0},
|
||||||
|
|
||||||
{ST_HEADER, N_("Your Address"), 0, 0, 0, 0},
|
{ST_HEADER, N_("Your Address"), 0, 0, 0, 0},
|
||||||
{ST_ENTRY, N_("Bind to:"), P_OFFSETNL(hex_net_bind_host), 0, 0, sizeof prefs.hex_net_bind_host},
|
{ST_ENTRY, N_("Bind to:"), P_OFFSETNL(hex_net_bind_host), 0, 0, sizeof prefs.hex_net_bind_host},
|
||||||
{ST_LABEL, N_("Only useful for computers with multiple addresses.")},
|
{ST_LABEL, N_("Only useful for computers with multiple addresses.")},
|
||||||
|
|||||||
Reference in New Issue
Block a user