Mercurial > audlegacy-plugins
annotate src/scrobbler/gtkstuff.c @ 2306:dd78327f5747
keep track of how long song is played
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sun, 13 Jan 2008 17:33:47 +0100 |
parents | 912ab17a4bcc |
children | 42a5c9d5830b |
rev | line source |
---|---|
1950
2ebeb7816c5e
Change from "" to <>-style includes. With thanks to ccr for the correct sed voodoo.
chainsaw@localhost
parents:
1677
diff
changeset
|
1 #include <audacious/util.h> |
2ebeb7816c5e
Change from "" to <>-style includes. With thanks to ccr for the correct sed voodoo.
chainsaw@localhost
parents:
1677
diff
changeset
|
2 #include <audacious/configdb.h> |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
3 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
4 #include <glib.h> |
527
d124034ebea3
[svn] - glib/gi18n.h -> audacious/i18n.h for automatic dgettext support
nenolod
parents:
344
diff
changeset
|
5 #include <audacious/i18n.h> |
2052
6f99796c8fe0
Add plugin.h include to fix audacious_info_dialog symbol
Christian Birchinger <joker@netswarm.net>
parents:
1950
diff
changeset
|
6 #include <audacious/plugin.h> |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
7 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
8 #include <stdio.h> |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
9 #include <string.h> |
344
03c1ae10bc8d
[svn] - Merge audacious-scrobbler III, new features include:
nenolod
parents:
12
diff
changeset
|
10 #include "settings.h" |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
11 #include "config.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
12 #include "md5.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
13 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
14 void about_show(void) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
15 { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
16 static GtkWidget *aboutbox; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
17 gchar *tmp; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
18 if (aboutbox) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
19 return; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
20 |
1289
90d9d4cf619c
"Scrobbler" plugin and the wrath of "i18n project"... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
527
diff
changeset
|
21 tmp = g_strdup_printf(_("Audacious AudioScrobbler Plugin\n\n" |
90d9d4cf619c
"Scrobbler" plugin and the wrath of "i18n project"... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
527
diff
changeset
|
22 "Originally created by Audun Hove <audun@nlc.no> and Pipian <pipian@pipian.com>\n")); |
1677
f6f5603a0954
xmms_show_message() changed to audacious_info_dialog()
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
23 aboutbox = audacious_info_dialog(_("About Scrobbler Plugin"), |
1289
90d9d4cf619c
"Scrobbler" plugin and the wrath of "i18n project"... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
527
diff
changeset
|
24 tmp, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
25 _("Ok"), FALSE, NULL, NULL); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
26 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
27 g_free(tmp); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
28 gtk_signal_connect(GTK_OBJECT(aboutbox), "destroy", |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
29 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &aboutbox); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
30 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
31 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
32 void errorbox_show(char *errortxt) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
33 { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
34 gchar *tmp; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
35 |
1289
90d9d4cf619c
"Scrobbler" plugin and the wrath of "i18n project"... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
527
diff
changeset
|
36 tmp = g_strdup_printf(_("There has been an error" |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
37 " that may require your attention.\n\n" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
38 "Contents of server error:\n\n" |
1289
90d9d4cf619c
"Scrobbler" plugin and the wrath of "i18n project"... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
527
diff
changeset
|
39 "%s\n"), |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
40 errortxt); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
41 |
2297
912ab17a4bcc
try to prevent 'Xlib: unexpected async reply' on errorbox show
Tomasz Mon <desowin@gmail.com>
parents:
2052
diff
changeset
|
42 GDK_THREADS_ENTER(); |
1677
f6f5603a0954
xmms_show_message() changed to audacious_info_dialog()
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
43 audacious_info_dialog(_("Scrobbler Error"), |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
44 tmp, |
1289
90d9d4cf619c
"Scrobbler" plugin and the wrath of "i18n project"... ;-)
Stany HENRY <StrassBoy@gmail.com>
parents:
527
diff
changeset
|
45 _("OK"), FALSE, NULL, NULL); |
2297
912ab17a4bcc
try to prevent 'Xlib: unexpected async reply' on errorbox show
Tomasz Mon <desowin@gmail.com>
parents:
2052
diff
changeset
|
46 GDK_THREADS_LEAVE(); |
912ab17a4bcc
try to prevent 'Xlib: unexpected async reply' on errorbox show
Tomasz Mon <desowin@gmail.com>
parents:
2052
diff
changeset
|
47 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
48 g_free(tmp); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
49 } |