annotate plugins/win32/winprefs/winprefs.c @ 5798:217d24d11b6e

[gaim-migrate @ 6223] <SimGuy> it was partly my stupidity :) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 07 Jun 2003 09:09:11 +0000
parents 0efc365eed6d
children 14891982dbee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
1 /*
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
2 * winprefs.c
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
3 *
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
4 * copyright (c) 1998-2002, Herman Bloggs <hermanator12002@yahoo.com>
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
5 *
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
6 * this program is free software; you can redistribute it and/or modify
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
7 * it under the terms of the gnu general public license as published by
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
8 * the free software foundation; either version 2 of the license, or
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
9 * (at your option) any later version.
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
10 *
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
11 * this program is distributed in the hope that it will be useful,
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
12 * but without any warranty; without even the implied warranty of
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
13 * merchantability or fitness for a particular purpose. see the
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
14 * gnu general public license for more details.
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
15 *
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
16 * you should have received a copy of the gnu general public license
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
17 * along with this program; if not, write to the free software
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
18 * foundation, inc., 59 temple place, suite 330, boston, ma 02111-1307 usa
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
19 *
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
20 */
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
21 #include <windows.h>
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
22 #include <winreg.h>
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
23 #include <winerror.h>
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
24 #include "gaim.h"
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
25 #include "gtkplugin.h"
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
26 #include "prefs.h"
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
27 #include "win32dep.h"
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
28
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
29 /*
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
30 * MACROS & DEFINES
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
31 */
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
32 #define WINPREFS_PLUGIN_ID "gaim-winprefs"
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
33 #define WINPREFS_VERSION 1
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
34
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
35 /*
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
36 * LOCALS
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
37 */
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
38 static const char *OPT_WINPREFS_AUTOSTART="/plugins/gtk/win32/winprefs/auto_start";
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
39
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
40 /*
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
41 * PROTOS
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
42 */
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
43
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
44 /*
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
45 * CODE
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
46 */
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
47
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
48 static GtkWidget *wgaim_button(const char *text, const char *pref, GtkWidget *page) {
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
49 GtkWidget *button;
5749
6d6ae91c5de7 [gaim-migrate @ 6174]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5224
diff changeset
50 button = gtk_check_button_new_with_mnemonic(text);
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
51 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), gaim_prefs_get_bool(pref));
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
52 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0);
5749
6d6ae91c5de7 [gaim-migrate @ 6174]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5224
diff changeset
53 gtk_widget_show(button);
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
54 return button;
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
55 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
56
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
57 static int open_run_key(PHKEY phKey, REGSAM samDesired) {
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
58 /* First try current user key (for WinNT & Win2k +), fall back to local machine */
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
59 if(ERROR_SUCCESS == RegOpenKeyEx(HKEY_CURRENT_USER,
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
60 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
61 0, samDesired, phKey));
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
62 else if(ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE,
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
63 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
64 0, samDesired, phKey));
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
65 else {
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
66 gaim_debug(3, WINPREFS_PLUGIN_ID, "open_run_key: Could not open key for writing value\n");
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
67 return 0;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
68 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
69 return 1;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
70 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
71
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
72 static void set_winprefs_option(GtkWidget *w, const char *key) {
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
73 gaim_prefs_set_bool(key, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
74 if(key == OPT_WINPREFS_AUTOSTART) {
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
75 HKEY hKey;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
76
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
77 if(!open_run_key(&hKey, KEY_SET_VALUE))
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
78 return;
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
79 if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) {
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
80 char buffer[1024];
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
81 DWORD size;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
82
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
83 if((size = GetModuleFileName(wgaim_hinstance(),
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
84 (LPBYTE)buffer,
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
85 sizeof(buffer)))==0) {
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
86 gaim_debug(3, WINPREFS_PLUGIN_ID, "GetModuleFileName Error.. Could not set Gaim autostart.\n");
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
87 RegCloseKey(hKey);
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
88 return;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
89 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
90 /* Now set value of new key */
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
91 if(ERROR_SUCCESS != RegSetValueEx(hKey,
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
92 "Gaim",
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
93 0,
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
94 REG_SZ,
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
95 buffer,
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
96 size))
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
97 gaim_debug(3, WINPREFS_PLUGIN_ID, "Could not set registry key value\n");
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
98 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
99 else {
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
100 if(ERROR_SUCCESS != RegDeleteValue(hKey, "Gaim"))
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
101 gaim_debug(3, WINPREFS_PLUGIN_ID, "Could not delete registry key value\n");
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
102 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
103 RegCloseKey(hKey);
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
104 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
105 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
106
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
107 /*
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
108 * EXPORTED FUNCTIONS
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
109 */
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
110 static GtkWidget* get_config_frame(GaimPlugin *plugin) {
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
111 GtkWidget *ret;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
112 GtkWidget *button;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
113 GtkWidget *vbox;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
114 HKEY hKey;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
115
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
116 ret = gtk_vbox_new(FALSE, 18);
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
117 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
118
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
119 /* IM Convo trans options */
5749
6d6ae91c5de7 [gaim-migrate @ 6174]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5224
diff changeset
120 vbox = gaim_gtk_make_frame (ret, _("Startup"));
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
121 button = wgaim_button(_("_Start Gaim on Windows startup"), OPT_WINPREFS_AUTOSTART, vbox);
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
122 /* Set initial value */
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
123 if(open_run_key(&hKey, KEY_QUERY_VALUE)) {
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
124 if(ERROR_SUCCESS == RegQueryValueEx(hKey, "Gaim", 0, NULL, NULL, NULL)) {
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
125 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
126 }
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
127 }
5795
0efc365eed6d [gaim-migrate @ 6220]
Christian Hammond <chipx86@chipx86.com>
parents: 5749
diff changeset
128 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_winprefs_option), (void *)OPT_WINPREFS_AUTOSTART);
4134
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
129
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
130 gtk_widget_show_all(ret);
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
131 return ret;
c0f4c664e3ba [gaim-migrate @ 4352]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff changeset
132 }
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
133
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
134 static GaimGtkPluginUiInfo ui_info =
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
135 {
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
136 get_config_frame
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
137 };
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
138
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
139 static GaimPluginInfo info =
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
140 {
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
141 2,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
142 GAIM_PLUGIN_STANDARD,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
143 GAIM_GTK_PLUGIN_TYPE,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
144 0,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
145 NULL,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
146 GAIM_PRIORITY_DEFAULT,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
147 WINPREFS_PLUGIN_ID,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
148 N_("WinGaim Options"),
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
149 VERSION,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
150 N_("Options specific to Windows Gaim."),
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
151 N_("Options specific to Windows Gaim."),
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
152 "Herman Bloggs <hermanator12002@yahoo.com>",
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
153 WEBSITE,
5798
217d24d11b6e [gaim-migrate @ 6223]
Christian Hammond <chipx86@chipx86.com>
parents: 5795
diff changeset
154 NULL,
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
155 NULL,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
156 NULL,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
157 &ui_info,
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
158 NULL
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
159 };
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
160
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
161 static void
5798
217d24d11b6e [gaim-migrate @ 6223]
Christian Hammond <chipx86@chipx86.com>
parents: 5795
diff changeset
162 init_plugin(GaimPlugin *plugin)
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
163 {
5798
217d24d11b6e [gaim-migrate @ 6223]
Christian Hammond <chipx86@chipx86.com>
parents: 5795
diff changeset
164 gaim_prefs_add_none("/plugins/gtk/win32");
217d24d11b6e [gaim-migrate @ 6223]
Christian Hammond <chipx86@chipx86.com>
parents: 5795
diff changeset
165 gaim_prefs_add_none("/plugins/gtk/win32/winprefs");
217d24d11b6e [gaim-migrate @ 6223]
Christian Hammond <chipx86@chipx86.com>
parents: 5795
diff changeset
166 gaim_prefs_add_bool("/plugins/gtk/win32/winprefs/auto_start", FALSE);
5224
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
167 }
5160333a80df [gaim-migrate @ 5594]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 4606
diff changeset
168
5798
217d24d11b6e [gaim-migrate @ 6223]
Christian Hammond <chipx86@chipx86.com>
parents: 5795
diff changeset
169 GAIM_INIT_PLUGIN(winprefs, init_plugin, info);