Mercurial > audlegacy-plugins
annotate src/amidi-plug/i_configure-timidity.c @ 3047:4434b4c4a715
ported EsounD plugin
author | Andrew O. Shadoura <bugzilla@tut.by> |
---|---|
date | Fri, 17 Apr 2009 16:17:10 +0300 |
parents | 5daedb3af7c9 |
children |
rev | line source |
---|---|
240
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
1 /* |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
2 * |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
3 * Author: Giacomo Lozito <james@develia.org>, (C) 2005-2006 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
4 * |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify it |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License as published by the |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
7 * Free Software Foundation; either version 2 of the License, or (at your |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
8 * option) any later version. |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
9 * |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
10 * This program is distributed in the hope that it will be useful, but |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
11 * WITHOUT ANY WARRANTY; without even the implied warranty of |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
13 * General Public License for more details. |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
14 * |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License along |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
16 * with this program; if not, write to the Free Software Foundation, Inc., |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
18 * |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
19 */ |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
20 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
21 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
22 #include "i_configure-timidity.h" |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
23 #include "backend-timidity/backend-timidity-icon.xpm" |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
24 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
25 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
26 void i_configure_gui_tab_timi( GtkWidget * timi_page_alignment , |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
27 gpointer backend_list_p , |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
28 gpointer commit_button ) |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
29 { |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
30 GtkWidget *timi_page_vbox; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
31 GtkWidget *title_widget; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
32 GtkWidget *content_vbox; /* this vbox will contain two items of equal space (50%/50%) */ |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
33 GSList * backend_list = backend_list_p; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
34 gboolean timi_module_ok = FALSE; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
35 gchar * timi_module_pathfilename; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
36 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
37 timi_page_vbox = gtk_vbox_new( FALSE , 0 ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
38 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
39 title_widget = i_configure_gui_draw_title( _("TIMIDITY BACKEND CONFIGURATION") ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
40 gtk_box_pack_start( GTK_BOX(timi_page_vbox) , title_widget , FALSE , FALSE , 2 ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
41 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
42 content_vbox = gtk_vbox_new( TRUE , 2 ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
43 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
44 /* check if the TiMidity module is available */ |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
45 while ( backend_list != NULL ) |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
46 { |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
47 amidiplug_sequencer_backend_name_t * mn = backend_list->data; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
48 if ( !strcmp( mn->name , "timidity" ) ) |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
49 { |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
50 timi_module_ok = TRUE; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
51 timi_module_pathfilename = mn->filename; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
52 break; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
53 } |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
54 backend_list = backend_list->next; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
55 } |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
56 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
57 if ( timi_module_ok ) |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
58 { |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
59 } |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
60 else |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
61 { |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
62 /* display "not available" information */ |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
63 GtkWidget * info_label; |
1290
5daedb3af7c9
"amidi-plug" : "i18n project" (part 1)
Stany HENRY <StrassBoy@gmail.com>
parents:
240
diff
changeset
|
64 info_label = gtk_label_new( _("TiMidity Backend not loaded or not available") ); |
240
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
65 gtk_box_pack_start( GTK_BOX(timi_page_vbox) , info_label , FALSE , FALSE , 2 ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
66 } |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
67 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
68 gtk_box_pack_start( GTK_BOX(timi_page_vbox) , content_vbox , TRUE , TRUE , 2 ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
69 gtk_container_add( GTK_CONTAINER(timi_page_alignment) , timi_page_vbox ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
70 } |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
71 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
72 |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
73 void i_configure_gui_tablabel_timi( GtkWidget * timi_page_alignment , |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
74 gpointer backend_list_p , |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
75 gpointer commit_button ) |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
76 { |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
77 GtkWidget *pagelabel_vbox, *pagelabel_image, *pagelabel_label; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
78 GdkPixbuf *pagelabel_image_pix; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
79 pagelabel_vbox = gtk_vbox_new( FALSE , 1 ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
80 pagelabel_image_pix = gdk_pixbuf_new_from_xpm_data( (const gchar **)backend_timidity_icon_xpm ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
81 pagelabel_image = gtk_image_new_from_pixbuf( pagelabel_image_pix ); g_object_unref( pagelabel_image_pix ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
82 pagelabel_label = gtk_label_new( "" ); |
1290
5daedb3af7c9
"amidi-plug" : "i18n project" (part 1)
Stany HENRY <StrassBoy@gmail.com>
parents:
240
diff
changeset
|
83 gtk_label_set_markup( GTK_LABEL(pagelabel_label) , _("<span size=\"smaller\">TiMidity\nbackend</span>") ); |
240
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
84 gtk_label_set_justify( GTK_LABEL(pagelabel_label) , GTK_JUSTIFY_CENTER ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
85 gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_image , FALSE , FALSE , 1 ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
86 gtk_box_pack_start( GTK_BOX(pagelabel_vbox) , pagelabel_label , FALSE , FALSE , 1 ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
87 gtk_container_add( GTK_CONTAINER(timi_page_alignment) , pagelabel_vbox ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
88 gtk_widget_show_all( timi_page_alignment ); |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
89 return; |
59d793da5395
[svn] - import amidi-plug 0.7 (among new features, a transposer to play midi files in different keys)
giacomo
parents:
diff
changeset
|
90 } |