Freeciv-3.2
Loading...
Searching...
No Matches
client
gui-qt
connectdlg.cpp
Go to the documentation of this file.
1
/***********************************************************************
2
Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; either version 2, or (at your option)
6
any later version.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
***********************************************************************/
13
14
#ifdef HAVE_CONFIG_H
15
#include <fc_config.h>
16
#endif
17
18
// utility
19
#include "
fcintl.h
"
20
#include "
log.h
"
21
#include "
support.h
"
22
23
#include "
connectdlg_g.h
"
24
25
// client
26
#include "
chatline_common.h
"
// For append_output_window
27
#include "
client_main.h
"
28
#include "
packhand_gen.h
"
29
30
// gui-qt
31
#include "
connectdlg.h
"
32
#include "
fc_client.h
"
33
34
35
/**********************************************************************/
39
void
qtg_close_connection_dialog
()
40
{
41
if
(
gui
()->
current_page
() !=
PAGE_NETWORK
) {
42
qtg_real_set_client_page
(
PAGE_MAIN
);
43
}
44
}
45
46
/**********************************************************************/
50
void
handle_authentication_req
(
enum
authentication_type
type
,
51
const
char
*
message
)
52
{
53
gui
()->handle_authentication_req(
type
,
message
);
54
}
55
56
/**********************************************************************/
62
void
handle_game_load
(
bool
load_successful,
const
char
*filename)
63
{
64
if
(load_successful) {
65
set_client_page
(
PAGE_START
);
66
67
if
(
game
.
info
.
is_new_game
) {
68
// It's pregame. Create a player and connect to it
69
send_chat
(
"/take -"
);
70
}
71
}
72
}
73
74
/**********************************************************************/
77
void
qtg_server_connect
()
78
{
79
// PORTME
80
}
send_chat
int send_chat(const char *message)
Definition
chatline_common.c:46
chatline_common.h
client_main.h
incite_cost
char * incite_cost
Definition
comments.c:75
authentication_type
authentication_type
Definition
conn_types.h:41
handle_game_load
void handle_game_load(bool load_successful, const char *filename)
Definition
connectdlg.cpp:62
qtg_close_connection_dialog
void qtg_close_connection_dialog()
Definition
connectdlg.cpp:39
qtg_server_connect
void qtg_server_connect()
Definition
connectdlg.cpp:77
handle_authentication_req
void handle_authentication_req(enum authentication_type type, const char *message)
Definition
connectdlg.cpp:50
connectdlg_g.h
fc_client.h
fcintl.h
game
struct civ_game game
Definition
game.c:62
current_page
static enum client_pages current_page
Definition
pages.c:78
type
GType type
Definition
repodlgs.c:1313
connectdlg.h
log.h
gui
static mpgui * gui
Definition
mpgui_qt.cpp:52
packhand_gen.h
qtg_real_set_client_page
void qtg_real_set_client_page(enum client_pages page)
Definition
pages.cpp:104
set_client_page
void set_client_page(enum client_pages page)
Definition
update_queue.c:496
civ_game::info
struct packet_game_info info
Definition
game.h:89
message
Definition
messagewin_common.h:29
packet_game_info::is_new_game
bool is_new_game
Definition
packets_gen.h:184
support.h
Generated on Sun Dec 22 2024 23:00:31 for Freeciv-3.2 by
1.9.8