1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/*
* Initial main.c file generated by Glade. Edit as required.
* Glade will not overwrite this file.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gnome.h>
#include "interface.h"
#include "support.h"
#include "eggtrayicon.h"
#include <gconf/gconf-client.h>
int
main (int argc, char *argv[])
{
GtkWidget *vpnclient_main_window;
GtkWidget *login_window;
GtkWidget *preference_window;
GtkWidget *status_window;
GtkWidget *group_password_window;
GError *err;
const gchar *vpnconfig_dir;
gchar *val;
GConfClient *client;
gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
argc, argv,
GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR,
NULL);
client = gconf_client_get_default();
/*
* The following code was added by Glade to create one of each component
* (except popup menus), just so that you see something after building
* the project. Delete any components that you don't want shown initially.
*/
vpnclient_main_window = create_vpnclient_main_window ();
gtk_widget_show(vpnclient_main_window);
if(gconf_client_get_bool(client, "/apps/gnome-settings/gvpndialer/starthidden", NULL))
gtk_widget_hide(vpnclient_main_window);
/*create status window..assign a key pointer to find it within
callback.c */
status_window = create_status_window();
g_object_set_data(G_OBJECT(vpnclient_main_window),"statuswindow",status_window);
/* create login window. assign a key pointer to find it within
callback.c */
login_window = create_login_window();
g_object_set_data(G_OBJECT(vpnclient_main_window),"loginwindow_key",
login_window);
g_object_set_data(G_OBJECT(login_window),"mainwindow_key",vpnclient_main_window);
/* create group password window. assign a key pointer to find it
within callback.c */
group_password_window = create_group_password();
g_object_set_data(G_OBJECT(vpnclient_main_window),"group_pass_win",group_password_window);
g_object_set_data(G_OBJECT(group_password_window),"mainwindow_key",vpnclient_main_window);
/* start the system tray */
tray_create(vpnclient_main_window);
/* start the program */
gtk_main ();
return 0;
}
|