1 #include <config.h>
2 #include <glib.h>
3 #include <glib/gi18n.h>
4 #include <gtk/gtk.h>
5 #include <glade/glade.h>
6 
7 #include "help.h"
8 
9 
10 /* help strings */
11 
12 char *help_titles[] = {
13 /* HELP_TAG_FORMAT */
14 N_("Help - File Name Format"),
15 
16 /* HELP_RENAME_FORMAT */
17 N_("Help - File Name Format")
18 };
19 
20 char *help_strings[] = {
21 /* HELP_TAG_FORMAT */
22 N_("This field describes the expected format of the file name \n"
23 "(not including the extension).  Audio Tag Tool uses this \n"
24 "information to automatically fill in the tags based on the \n"
25 "file's name. \n"
26 "\n"
27 "Each tag field has a corresponding symbol, as listed below: \n"
28 "\n"
29 "  <title>\n"
30 "  <artist>\n"
31 "  <album>\n"
32 "  <year>\n"
33 "  <comment>\n"
34 "  <track>\n"
35 "  <genre>\n"
36 "\n"
37 "Examples: \n"
38 "\n"
39 "The format \"<artist> - <album> - <title>\" will match a \n"
40 "file named \"Pink Floyd - The Wall - Hey You.mp3\". In this \n"
41 "example the Artist, Album and Title fields of the tag will \n"
42 "be set to \"Pink Floyd\", \"The Wall\" and \"Hey You\", \n"
43 "respectively.\n"
44 "\n"
45 "The format \"<artist> - <*> - <title>\" could also be used \n"
46 "in the previous example if we did not want to fill in the \n"
47 "album name (the special symbol <*> causes a part of the \n"
48 "file name to be ignored.) \n"),
49 
50 /* HELP_RENAME_FORMAT */
51 N_("This field describes the desired format of the file name. \n"
52 "Audio Tag Tool can use this information to rename files or \n"
53 "organize them into subdirectories, based on the content of \n"
54 "their tags. \n"
55 "\n"
56 "Each ID3 field has a corresponding symbol, as listed below: \n"
57 "\n"
58 "  <title>\n"
59 "  <artist>\n"
60 "  <album>\n"
61 "  <year>\n"
62 "  <comment>\n"
63 "  <track>\n"
64 "  <genre>\n"
65 "\n"
66 "Renaming example: \n"
67 "\n"
68 "To have all file names consist of the track number followed \n"
69 "by the track title, a format such as \"<track> - <title>\" can \n"
70 "be used. \n"
71 "\n"
72 "Moving example: \n"
73 "\n"
74 "The file name format can include sub-directories. If in the \n"
75 "previous example we had wanted the files to be placed in \n"
76 "a directory with the album name, we would have used the \n"
77 "format \"<album>/<track> - <title>\". \n")
78 };
79 
80 
81 /* widgets */
82 static GtkWindow *dlg_help = NULL;
83 static GtkLabel *lab_help = NULL;
84 
85 
86 /*** public functions *******************************************************/
87 
help_init(GladeXML * xml)88 void help_init(GladeXML *xml)
89 {
90 	dlg_help = GTK_WINDOW(glade_xml_get_widget(xml, "dlg_help"));
91 	lab_help = GTK_LABEL(glade_xml_get_widget(xml, "lab_help"));
92 }
93 
94 
help_display(int topic)95 void help_display(int topic)
96 {
97 	gtk_window_set_title(dlg_help, _(help_titles[topic]));
98 	gtk_label_set_text(lab_help, _(help_strings[topic]));
99 
100 	gtk_widget_show(GTK_WIDGET(dlg_help));
101 }
102 
103