Mercurial > pidgin
annotate plugins/musicmessaging/musicmessaging.c @ 11108:641915a13cec
[gaim-migrate @ 13157]
Commited
committer: Tailor Script <tailor@pidgin.im>
author | Christian Muise <christian.muise@gmail.com> |
---|---|
date | Fri, 15 Jul 2005 11:35:46 +0000 |
parents | b8bfa71e5595 |
children | 268d5c498b64 |
rev | line source |
---|---|
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
1 #include "internal.h" |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
2 #include "gtkgaim.h" |
11088
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
3 |
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
4 #include "gtkconv.h" |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
5 #include "gtkplugin.h" |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
6 #include "gtkutils.h" |
11088
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
7 |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
8 #include "notify.h" |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
9 #include "version.h" |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
10 |
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
11 #define MUSICMESSAGIN_PLUGIN_ID "gtk-hazure-musicmessaging" |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
12 |
11088
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
13 static gboolean |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
14 plugin_load(GaimPlugin *plugin) { |
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
15 gaim_notify_message(plugin, GAIM_NOTIFY_MSG_INFO, "Welcome", |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
16 "Welcome to music messaging.", NULL, NULL, NULL); |
11088
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
17 |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
18 return TRUE; |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
19 } |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
20 |
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
21 static gboolean |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
22 plugin_unload(GaimPlugin *plugin) { |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
23 gaim_notify_message(plugin, GAIM_NOTIFY_MSG_INFO, "Unloaded", |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
24 "The MM plugin has been unloaded.", NULL, NULL, NULL); |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
25 return TRUE; |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
26 } |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
27 |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
28 static gboolean |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
29 plugin_destroyed(GaimPlugin *plugin) { |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
30 gaim_notify_message(plugin, GAIM_NOTIFY_MSG_INFO, "Destroyed", |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
31 "The MM plugin has been destroyed.", NULL, NULL, NULL); |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
32 return TRUE; |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
33 } |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
34 |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
35 static GtkWidget * |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
36 get_config_frame(GaimPlugin *plugin) |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
37 { |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
38 GtkWidget *ret; |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
39 GtkWidget *vbox; |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
40 |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
41 /* Outside container */ |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
42 ret = gtk_vbox_new(FALSE, 18); |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
43 gtk_container_set_border_width(GTK_CONTAINER(ret), 10); |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
44 |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
45 /* Configuration frame */ |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
46 vbox = gaim_gtk_make_frame(ret, _("Music Messaging Configuration")); |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
47 |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
48 gtk_widget_show_all(ret); |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
49 |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
50 return ret; |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
51 } |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
52 |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
53 static GaimGtkPluginUiInfo ui_info = |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
54 { |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
55 get_config_frame |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
56 }; |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
57 |
11088
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
58 static GaimPluginInfo info = { |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
59 GAIM_PLUGIN_MAGIC, |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
60 GAIM_MAJOR_VERSION, |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
61 GAIM_MINOR_VERSION, |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
62 GAIM_PLUGIN_STANDARD, |
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
63 GAIM_GTK_PLUGIN_TYPE, |
11088
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
64 0, |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
65 NULL, |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
66 GAIM_PRIORITY_DEFAULT, |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
67 |
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
68 MUSICMESSAGIN_PLUGIN_ID, |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
69 "Music Messaging", |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
70 VERSION, |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
71 "Music Messaging Plugin for collabrative composition.", |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
72 "The Music Messaging Plugin allows a number of users to simultaniously work on a piece of music by editting a common score in real-time.", |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
73 "Christian Muise <christian.muise@gmail.com>", |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
74 GAIM_WEBSITE, |
11088
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
75 plugin_load, |
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
76 plugin_unload, |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
77 plugin_destroyed, |
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
78 &ui_info, |
11088
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
79 NULL, |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
80 NULL, |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
81 NULL |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
82 }; |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
83 |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
84 static void |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
85 init_plugin(GaimPlugin *plugin) { |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
86 } |
b8bfa71e5595
[gaim-migrate @ 13108]
Christian Muise <christian.muise@gmail.com>
parents:
diff
changeset
|
87 |
11108
641915a13cec
[gaim-migrate @ 13157]
Christian Muise <christian.muise@gmail.com>
parents:
11088
diff
changeset
|
88 GAIM_INIT_PLUGIN(musicmessaging, init_plugin, info); |