annotate plugins/mailchk.c @ 5537:3becf79500d2

[gaim-migrate @ 5937] This is: -AIM over OSCAR use Christian's new, kick ass gaim_notify_email stuff for new mail notification. This should be good, but it's kind of a pain to test. Let me know if you have any problems -Minor fix to the translation README -2 minor changes to the doxygen of 2 major header files (this means you'll have to recompile a lot of files :-) ) -If your global proxy setting is "No Proxy" and your global proxy host is empty, but $http_proxy is set to something, gaim used to switch your global proxy setting to "HTTP." It no longer does this. This makes more sense to me. If you disagree, please let me know--this is open to debate, and what not. Also, the use of environmental proxy settings will be changed a bit in the next day or two committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 27 May 2003 03:38:52 +0000
parents 1f901484599d
children 7d385de2f9cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 #include "gaim.h"
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
2 #include "gtkplugin.h"
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
3 #include "blist.h"
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
4 #include "gtkblist.h"
4576
c7569367ed87 [gaim-migrate @ 4857]
Luke Schierer <lschiere@pidgin.im>
parents: 4575
diff changeset
5 #include "sound.h"
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 #include <sys/stat.h>
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 #include <sys/types.h>
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 #include <unistd.h>
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
10 #define MAILCHK_PLUGIN_ID "gtk-mailchk"
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4655
diff changeset
11
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 #define ANY_MAIL 0x01
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 #define UNREAD_MAIL 0x02
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 #define NEW_MAIL 0x04
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 static guint32 timer = 0;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 static GtkWidget *mail = NULL;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 static gint check_mail()
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 {
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 static off_t oldsize = 0;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 gchar *filename;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 off_t newsize;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 struct stat s;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 gint ret = 0;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26
4655
fac4c73dd5ad [gaim-migrate @ 4966]
Nathan Walp <nwalp@pidgin.im>
parents: 4576
diff changeset
27 filename = g_strdup(g_getenv("MAIL"));
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28 if (!filename)
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 filename = g_strconcat("/var/spool/mail/", g_get_user_name(), NULL);
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 if (stat(filename, &s) < 0) {
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 g_free(filename);
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 return -1;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 newsize = s.st_size;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37 if (newsize) ret |= ANY_MAIL;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 if (s.st_mtime > s.st_atime && newsize) ret |= UNREAD_MAIL;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39 if (newsize != oldsize && (ret & UNREAD_MAIL)) ret |= NEW_MAIL;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 oldsize = newsize;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42 g_free(filename);
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44 return ret;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
47 static void destroy_cb()
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
48 {
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49 mail = NULL;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
51
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52 static gboolean check_timeout(gpointer data)
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53 {
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
54 gint count = check_mail();
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
55 struct gaim_buddy_list *list = gaim_get_blist();
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
56 if (count == -1)
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
57 return FALSE;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
58
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
59 if (!list || !GAIM_GTK_BLIST(list))
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60 return TRUE;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
62 if (!mail) {
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63 /* guess we better build it then :P */
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
64 //GList *tmp = gtk_container_get_children(GTK_CONTAINER(GAIM_GTK_BLIST(list)));
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
65 //GtkWidget *vbox2 = (GtkWidget *)tmp->data;
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
66 GtkWidget *vbox = (GtkWidget *)(GAIM_GTK_BLIST(list)->vbox);
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
68 mail = gtk_label_new("No mail messages.");
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
69 gtk_box_pack_start(GTK_BOX(vbox), mail, FALSE, FALSE, 0);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
70 gtk_box_reorder_child(GTK_BOX(vbox), mail, 1);
5314
1f901484599d [gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents: 5255
diff changeset
71 g_signal_connect(G_OBJECT(mail), "destroy", G_CALLBACK(destroy_cb), NULL);
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
72 gtk_widget_show(mail);
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
73 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
74
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
75 if (count & NEW_MAIL)
4576
c7569367ed87 [gaim-migrate @ 4857]
Luke Schierer <lschiere@pidgin.im>
parents: 4575
diff changeset
76 gaim_sound_play_event(GAIM_SOUND_POUNCE_DEFAULT);
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
77
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78 if (count & UNREAD_MAIL)
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
79 gtk_label_set_text(GTK_LABEL(mail), "You have new mail!");
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
80 else if (count & ANY_MAIL)
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
81 gtk_label_set_text(GTK_LABEL(mail), "You have mail.");
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
82 else
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
83 gtk_label_set_text(GTK_LABEL(mail), "No mail messages.");
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
84
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
85 return TRUE;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
86 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
87
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
88 static void signon_cb(struct gaim_connection *gc)
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
89 {
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
90 struct gaim_buddy_list *list = gaim_get_blist();
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
91 if (list && GAIM_GTK_BLIST(list) && !timer)
4168
ebfb80bbe1ed [gaim-migrate @ 4397]
Luke Schierer <lschiere@pidgin.im>
parents: 4165
diff changeset
92 timer = g_timeout_add(2000, check_timeout, NULL);
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
94
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
95 static void signoff_cb(struct gaim_connection *gc)
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
96 {
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
97 struct gaim_buddy_list *list = gaim_get_blist();
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
98 if ((!list || !GAIM_GTK_BLIST(list)) && timer) {
4168
ebfb80bbe1ed [gaim-migrate @ 4397]
Luke Schierer <lschiere@pidgin.im>
parents: 4165
diff changeset
99 g_source_remove(timer);
2259
866bf3ced1bc [gaim-migrate @ 2269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1804
diff changeset
100 timer = 0;
866bf3ced1bc [gaim-migrate @ 2269]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1804
diff changeset
101 }
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
102 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
103
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
104 /*
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
105 * EXPORTED FUNCTIONS
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
106 */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
107
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
108 static gboolean
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
109 plugin_load(GaimPlugin *plugin)
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
110 {
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
111 struct gaim_buddy_list *list = gaim_get_blist();
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
112 if (!check_timeout(NULL)) {
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
113 gaim_debug(GAIM_DEBUG_WARNING, "mailchk", "Could not read $MAIL or /var/spool/mail/$USER");
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
114 return FALSE;
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
115 }
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
116
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
117 if (list && GAIM_GTK_BLIST(list))
4168
ebfb80bbe1ed [gaim-migrate @ 4397]
Luke Schierer <lschiere@pidgin.im>
parents: 4165
diff changeset
118 timer = g_timeout_add(2000, check_timeout, NULL);
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
119
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
120 gaim_signal_connect(plugin, event_signon, signon_cb, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
121 gaim_signal_connect(plugin, event_signoff, signoff_cb, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
122
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
123 return TRUE;
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
124 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
125
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
126 static gboolean
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
127 plugin_unload(GaimPlugin *plugin)
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
128 {
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
129 if (timer)
4168
ebfb80bbe1ed [gaim-migrate @ 4397]
Luke Schierer <lschiere@pidgin.im>
parents: 4165
diff changeset
130 g_source_remove(timer);
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
131 timer = 0;
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
132 if (mail)
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
133 gtk_widget_destroy(mail);
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
134 mail = NULL;
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
135
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
136 return TRUE;
1803
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
137 }
d36f759df56d [gaim-migrate @ 1813]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
138
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
139 static GaimPluginInfo info =
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
140 {
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
141 2, /**< api_version */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
142 GAIM_PLUGIN_STANDARD, /**< type */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
143 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
144 0, /**< flags */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
145 NULL, /**< dependencies */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
146 GAIM_PRIORITY_DEFAULT, /**< priority */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
147
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
148 MAILCHK_PLUGIN_ID, /**< id */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
149 N_("Mail Checker"), /**< name */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
150 VERSION, /**< version */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
151 /** summary */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
152 N_("Checks for new local mail."),
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
153 /** description */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
154 N_("Checks for new local mail."),
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
155 "Eric Warmenhoven <eric@warmenhoven.org>", /**< author */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
156 WEBSITE, /**< homepage */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
157
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
158 plugin_load, /**< load */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
159 plugin_unload, /**< unload */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
160 NULL, /**< destroy */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
161
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
162 NULL, /**< ui_info */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
163 NULL /**< extra_info */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
164 };
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
165
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
166 static void
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
167 __init_plugin(GaimPlugin *plugin)
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
168 {
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3060
diff changeset
169 }
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 3060
diff changeset
170
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
171 GAIM_INIT_PLUGIN(mailchk, __init_plugin, info);