Mercurial > audlegacy-plugins
comparison src/mtp_up/mtp.c @ 2180:f629e0c90f18
added basic internationalization support to mtp_up
author | mf0102 <0102@gmx.at> |
---|---|
date | Wed, 21 Nov 2007 16:10:58 +0100 |
parents | 5ba49a9c053c |
children | 7b284f323ad8 |
comparison
equal
deleted
inserted
replaced
2179:2f6d5e1a22cd | 2180:f629e0c90f18 |
---|---|
14 * | 14 * |
15 * You should have received a copy of the GNU General Public License | 15 * You should have received a copy of the GNU General Public License |
16 * along with this program. If not, see <http://www.gnu.org/licenses>. | 16 * along with this program. If not, see <http://www.gnu.org/licenses>. |
17 */ | 17 */ |
18 | 18 |
19 #include <config.h> | |
20 | |
19 #include <glib.h> | 21 #include <glib.h> |
20 #include <sys/types.h> | 22 #include <sys/types.h> |
21 #include <libmtp.h> | 23 #include <libmtp.h> |
22 #include <audacious/plugin.h> | 24 #include <audacious/plugin.h> |
23 #include <audacious/playlist.h> | 25 #include <audacious/playlist.h> |
24 #include <audacious/ui_plugin_menu.h> | 26 #include <audacious/ui_plugin_menu.h> |
27 #include <audacious/i18n.h> | |
25 | 28 |
26 #include <gtk/gtk.h> | 29 #include <gtk/gtk.h> |
27 #include <audacious/util.h> | 30 #include <audacious/util.h> |
28 #include "filetype.h" | 31 #include "filetype.h" |
32 | |
29 #define DEBUG 1 | 33 #define DEBUG 1 |
30 | 34 |
31 #define ROOT_LABEL "MTP device handler" | 35 #define UP_DEFAULT_LABEL _("Upload selected track(s)") |
32 #define UP_DEFAULT_LABEL "Upload selected track(s)" | 36 |
33 #define UP_BUSY_LABEL "Upload in progress..." | |
34 #define FREE_LABEL "Disconnect the device" | |
35 GMutex * mutex = NULL; | 37 GMutex * mutex = NULL; |
36 gboolean mtp_initialised = FALSE; | 38 gboolean mtp_initialised = FALSE; |
37 LIBMTP_mtpdevice_t *mtp_device = NULL; | 39 LIBMTP_mtpdevice_t *mtp_device = NULL; |
38 LIBMTP_progressfunc_t *callback; | 40 LIBMTP_progressfunc_t *callback; |
39 LIBMTP_file_t *filelist; | 41 LIBMTP_file_t *filelist; |
289 /* show_dialog("No MTP devices have been found !!!"); */ | 291 /* show_dialog("No MTP devices have been found !!!"); */ |
290 mtp_initialised = FALSE; | 292 mtp_initialised = FALSE; |
291 return TRUE; | 293 return TRUE; |
292 | 294 |
293 } | 295 } |
294 gtk_label_set_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(mtp_submenu_item_up))),UP_BUSY_LABEL); | 296 gtk_label_set_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(mtp_submenu_item_up))), _("Upload in progress...")); |
295 gtk_widget_set_sensitive(mtp_submenu_item_up, FALSE); | 297 gtk_widget_set_sensitive(mtp_submenu_item_up, FALSE); |
296 g_thread_create(upload,NULL,FALSE,NULL); | 298 g_thread_create(upload,NULL,FALSE,NULL); |
297 return TRUE; | 299 return TRUE; |
298 | 300 |
299 } | 301 } |
300 | 302 |
301 void mtp_init(void) | 303 void mtp_init(void) |
302 { | 304 { |
303 mtp_root_menuitem=gtk_menu_item_new_with_label(ROOT_LABEL); | 305 mtp_root_menuitem=gtk_menu_item_new_with_label(_("MTP device handler")); |
304 mtp_submenu=gtk_menu_new(); | 306 mtp_submenu=gtk_menu_new(); |
305 | 307 |
306 mtp_submenu_item_up=gtk_menu_item_new_with_label(UP_DEFAULT_LABEL); | 308 mtp_submenu_item_up=gtk_menu_item_new_with_label(UP_DEFAULT_LABEL); |
307 mtp_submenu_item_free=gtk_menu_item_new_with_label(FREE_LABEL); | 309 mtp_submenu_item_free=gtk_menu_item_new_with_label(_("Disconnect the device")); |
308 | 310 |
309 | 311 |
310 gtk_menu_shell_append (GTK_MENU_SHELL (mtp_submenu), mtp_submenu_item_up); | 312 gtk_menu_shell_append (GTK_MENU_SHELL (mtp_submenu), mtp_submenu_item_up); |
311 gtk_widget_show (mtp_submenu_item_up); | 313 gtk_widget_show (mtp_submenu_item_up); |
312 | 314 |