annotate console/gntui.c @ 14059:2d1b41e3cf0d

[gaim-migrate @ 16674] Add a way to change some preferences (the preferences for the conversations do not do anything yet). I used the request-api for this, which I think is cool. But too many preferences will make the dialog long, which may not fit in the screen. It looks alright for now though. You can pop the dialog up with "/prefs" command in a converastion. And some other minor fixes. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 09 Aug 2006 03:41:45 +0000
parents 7573bd40a190
children 8375ecb6152b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 #include "gntui.h"
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
2
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
3 #include "gntaccount.h"
13887
7d3256b253ec [gaim-migrate @ 16368]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13885
diff changeset
4 #include "gntblist.h"
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
5 #include "gntconn.h"
13887
7d3256b253ec [gaim-migrate @ 16368]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13885
diff changeset
6 #include "gntconv.h"
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
7 #include "gntnotify.h"
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
8 #include "gntplugin.h"
13983
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
9 #include "gntrequest.h"
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
11 #include <prefs.h>
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
12
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13 void init_gnt_ui()
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14 {
13966
80cbf6c2d562 [gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13952
diff changeset
15 #ifdef STANDALONE
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16 gnt_init();
13966
80cbf6c2d562 [gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13952
diff changeset
17 #endif
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
18
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
19 gaim_prefs_add_none("/gaim/gnt");
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
20
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
21 /* Accounts */
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
22 gg_accounts_init();
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
23 gaim_accounts_set_ui_ops(gg_accounts_get_ui_ops());
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
24
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
25 /* Connections */
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
26 gg_connections_init();
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
27 gaim_connections_set_ui_ops(gg_connections_get_ui_ops());
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
28
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29 /* Initialize the buddy list */
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
30 gg_blist_init();
13857
d341b5ac1a78 [gaim-migrate @ 16316]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13850
diff changeset
31 gaim_blist_set_ui_ops(gg_blist_get_ui_ops());
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
32
13884
eac18261c6f0 [gaim-migrate @ 16364]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13857
diff changeset
33 /* Now the conversations */
13885
582aaa4e287e [gaim-migrate @ 16365]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13884
diff changeset
34 gg_conversation_init();
582aaa4e287e [gaim-migrate @ 16365]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13884
diff changeset
35 gaim_conversations_set_ui_ops(gg_conv_get_ui_ops());
13884
eac18261c6f0 [gaim-migrate @ 16364]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13857
diff changeset
36
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
37 /* Notify */
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
38 gg_notify_init();
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
39 gaim_notify_set_ui_ops(gg_notify_get_ui_ops());
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
40
13983
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
41 gg_request_init();
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
42 gaim_request_set_ui_ops(gg_request_get_ui_ops());
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
43
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
44 gg_plugins_show_all();
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
45
13966
80cbf6c2d562 [gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13952
diff changeset
46 #ifdef STANDALONE
14010
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
47
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
48 gg_plugins_save_loaded();
7573bd40a190 [gaim-migrate @ 16602]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13983
diff changeset
49
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
50 gnt_main();
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
51
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
52 gaim_accounts_set_ui_ops(NULL);
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
53 gg_accounts_uninit();
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
54
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
55 gaim_connections_set_ui_ops(NULL);
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
56 gg_connections_uninit();
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
57
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
58 gaim_blist_set_ui_ops(NULL);
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
59 gg_blist_uninit();
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
60
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
61 gaim_conversations_set_ui_ops(NULL);
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
62 gg_conversation_uninit();
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
63
13952
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
64 gaim_notify_set_ui_ops(NULL);
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
65 gg_notify_uninit();
841a5ffbfee4 [gaim-migrate @ 16500]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13907
diff changeset
66
13983
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
67 gaim_request_set_ui_ops(NULL);
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
68 gg_request_uninit();
b7a99d54a5a9 [gaim-migrate @ 16552]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13966
diff changeset
69
13907
cc60d0861337 [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13887
diff changeset
70 gnt_quit();
13966
80cbf6c2d562 [gaim-migrate @ 16522]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13952
diff changeset
71 #endif
13850
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
72 }
0e1e59770cb0 [gaim-migrate @ 16308]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
73