Mercurial > audlegacy-plugins
comparison src/hotkey/plugin.c @ 1551:a9af4f1aede9
hotkey plugin: stripped unneeded #ifdefs from standalone version
| author | Sascha Hlusiak <contact@saschahlusiak.de> |
|---|---|
| date | Fri, 31 Aug 2007 23:21:30 +0200 |
| parents | ec4e8ec829b1 |
| children | 5538324eb069 |
comparison
equal
deleted
inserted
replaced
| 1543:ec4e8ec829b1 | 1551:a9af4f1aede9 |
|---|---|
| 47 #include <gdk/gdkkeysyms.h> | 47 #include <gdk/gdkkeysyms.h> |
| 48 #include <audacious/plugin.h> | 48 #include <audacious/plugin.h> |
| 49 #include <audacious/auddrct.h> | 49 #include <audacious/auddrct.h> |
| 50 #include <audacious/configdb.h> | 50 #include <audacious/configdb.h> |
| 51 | 51 |
| 52 #ifdef ENABLE_NLS | 52 #include <audacious/i18n.h> |
| 53 #ifdef HAVE_AUDACIOUS_I18N_H | |
| 54 #include <audacious/i18n.h> | |
| 55 #else | |
| 56 #ifdef HAVE_DCGETTEXT | |
| 57 #include <libintl.h> | |
| 58 #define _(String) dgettext(PACKAGE, String) | |
| 59 #else | |
| 60 #define _(String) (String) | |
| 61 #endif | |
| 62 #endif | |
| 63 #else | |
| 64 #define _(String) (String) | |
| 65 #endif | |
| 66 | 53 |
| 67 /* for xmms_show_message () */ | 54 /* for xmms_show_message () */ |
| 68 #include <audacious/util.h> | 55 #include <audacious/util.h> |
| 69 | 56 |
| 70 | 57 |
| 749 GtkWidget *table; | 736 GtkWidget *table; |
| 750 GtkWidget *button_box, *button; | 737 GtkWidget *button_box, *button; |
| 751 | 738 |
| 752 if (!xdisplay) x_display_init(); | 739 if (!xdisplay) x_display_init(); |
| 753 | 740 |
| 754 #ifdef ENABLE_NLS | |
| 755 bind_textdomain_codeset(PACKAGE, "UTF-8"); | |
| 756 #endif | |
| 757 | |
| 758 load_config ( ); | 741 load_config ( ); |
| 759 | 742 |
| 760 ungrab_keys(); | 743 ungrab_keys(); |
| 761 | 744 |
| 762 controls = (ConfigurationControls*)g_malloc(sizeof(ConfigurationControls)); | 745 controls = (ConfigurationControls*)g_malloc(sizeof(ConfigurationControls)); |
| 917 | 900 |
| 918 static void about (void) | 901 static void about (void) |
| 919 { | 902 { |
| 920 static GtkWidget *dialog; | 903 static GtkWidget *dialog; |
| 921 | 904 |
| 922 #ifdef ENABLE_NLS | |
| 923 bind_textdomain_codeset(PACKAGE, "UTF-8"); | |
| 924 #endif | |
| 925 | |
| 926 dialog = xmms_show_message (_("About Global Hotkey Plugin"), | 905 dialog = xmms_show_message (_("About Global Hotkey Plugin"), |
| 927 _("Global Hotkey Plugin version " VERSION "\n\n" | 906 _("Global Hotkey Plugin\n" |
| 907 "Control the player with global key combinations or multimedia keys.\n\n" | |
| 928 "Copyright (C) 2007 Sascha Hlusiak <contact@saschahlusiak.de>\n\n" | 908 "Copyright (C) 2007 Sascha Hlusiak <contact@saschahlusiak.de>\n\n" |
| 929 | 909 "Contributers include:\n" |
| 930 "Parts of the plugin source are from itouch-ctrl plugin.\n" | 910 "Copyright (C) 2006 - 2007 Vladimir Paskov <vlado.paskov@gmail.com>\n" |
| 931 "Authors of itouch-ctrl are listed below:\n" | |
| 932 "Copyright (C) 2006 - 2007 Vladimir Paskov <vlado.paskov@gmail.com>\n\n" | |
| 933 | |
| 934 "Parts of the plugin source are from xmms-itouch plugin.\n" | |
| 935 "Authors of xmms-itouch are listed below:\n" | |
| 936 "Copyright (C) 2000-2002 Ville Syrjälä <syrjala@sci.fi>\n" | 911 "Copyright (C) 2000-2002 Ville Syrjälä <syrjala@sci.fi>\n" |
| 937 " Bryn Davies <curious@ihug.com.au>\n" | 912 " Bryn Davies <curious@ihug.com.au>\n" |
| 938 " Jonathan A. Davis <davis@jdhouse.org>\n" | 913 " Jonathan A. Davis <davis@jdhouse.org>\n" |
| 939 " Jeremy Tan <nsx@nsx.homeip.net>\n\n" | 914 " Jeremy Tan <nsx@nsx.homeip.net>\n\n" |
| 940 ), | 915 ), |
| 941 _("Ok"), TRUE, NULL, NULL); | 916 _("OK"), TRUE, NULL, NULL); |
| 942 | 917 |
| 943 gtk_signal_connect(GTK_OBJECT(dialog), "destroy", | 918 gtk_signal_connect(GTK_OBJECT(dialog), "destroy", |
| 944 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog); | 919 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog); |
| 945 } | 920 } |
| 946 | 921 |
| 1034 | 1009 |
| 1035 XUngrabKey (xdisplay, AnyKey, AnyModifier, x_root_window); | 1010 XUngrabKey (xdisplay, AnyKey, AnyModifier, x_root_window); |
| 1036 | 1011 |
| 1037 grabbed = 0; | 1012 grabbed = 0; |
| 1038 } | 1013 } |
| 1039 |
