37
37
static GtkWidget *device_entry, *mixer_entry;
38
38
static GtkWidget *mute_on_exit_cb;
39
static GtkWidget *save_button, *up_button, *down_button, *remove_button;
39
static GtkWidget *save_button, *move_up_button, *move_down_button, *remove_button;
40
40
static GtkWidget *list_view;
41
41
static GtkListStore *list_store;
42
42
static GtkTreeSelection *selection;
421
421
gtk_tree_path_free(path);
423
423
if (pos - 1 <= 0) {
424
gtk_widget_set_sensitive(up_button, FALSE);
424
gtk_widget_set_sensitive(move_up_button, FALSE);
426
gtk_widget_set_sensitive(up_button, TRUE);
426
gtk_widget_set_sensitive(move_up_button, TRUE);
428
gtk_widget_set_sensitive(down_button, TRUE);
428
gtk_widget_set_sensitive(move_down_button, TRUE);
431
static void down_button_clicked_cb(GtkWidget * widget, gpointer data)
431
static void move_down_button_clicked_cb(GtkWidget * widget, gpointer data)
433
433
GtkTreeIter iter, iter2;
434
434
GtkTreePath *path, *path2;
487
487
gtk_tree_path_free(path);
489
489
if (pos + 2 == gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list_store), NULL)) {
490
gtk_widget_set_sensitive(down_button, FALSE);
490
gtk_widget_set_sensitive(move_down_button, FALSE);
492
gtk_widget_set_sensitive(down_button, TRUE);
492
gtk_widget_set_sensitive(move_down_button, TRUE);
494
gtk_widget_set_sensitive(up_button, TRUE);
494
gtk_widget_set_sensitive(move_up_button, TRUE);
497
497
static void destination_button_clicked_cb(GtkWidget *button, gpointer data)
530
530
gtk_tree_path_free(path);
533
gtk_widget_set_sensitive(up_button, FALSE);
533
gtk_widget_set_sensitive(move_up_button, FALSE);
535
gtk_widget_set_sensitive(up_button, TRUE);
535
gtk_widget_set_sensitive(move_up_button, TRUE);
538
538
if (pos + 1 == gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list_store), NULL)) {
539
gtk_widget_set_sensitive(down_button, FALSE);
539
gtk_widget_set_sensitive(move_down_button, FALSE);
541
gtk_widget_set_sensitive(down_button, TRUE);
541
gtk_widget_set_sensitive(move_down_button, TRUE);
649
649
pos = g_list_index(settings.presets, (gpointer)ps);
652
gtk_widget_set_sensitive(up_button, FALSE);
652
gtk_widget_set_sensitive(move_up_button, FALSE);
654
gtk_widget_set_sensitive(up_button, TRUE);
654
gtk_widget_set_sensitive(move_up_button, TRUE);
657
657
if (pos + 1 == gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list_store), NULL)) {
658
gtk_widget_set_sensitive(down_button, FALSE);
658
gtk_widget_set_sensitive(move_down_button, FALSE);
660
gtk_widget_set_sensitive(down_button, TRUE);
660
gtk_widget_set_sensitive(move_down_button, TRUE);
662
662
gtk_tree_path_free(path);
848
848
char *caption = g_strdup_printf(_("Cannot parsing file \"%s\"."), filename);
849
char *detail = g_strdup_printf(_("You can create a new presets file using the \"Add\" (or \"+\") button on the presets panel. Set the settings you wish to use in the presets and save with \"Save to file\" button. Presets is saved as a file with the \".xml\" extension."));
849
char *detail = g_strdup_printf(_("To create FM radio station presets use \"Add preset\" button"));
850
850
show_error_message(caption, detail);
927
927
gtk_widget_set_sensitive(save_button, TRUE);
928
928
gtk_widget_set_sensitive(remove_button, FALSE);
929
gtk_widget_set_sensitive(up_button, FALSE);
930
gtk_widget_set_sensitive(down_button, FALSE);
929
gtk_widget_set_sensitive(move_up_button, FALSE);
930
gtk_widget_set_sensitive(move_down_button, FALSE);
933
933
/* Callback for the "Load from file" button; calls load_from_file */
1116
1116
button_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
1118
up_button = gtk_button_new();
1119
gtk_button_set_image(GTK_BUTTON(up_button), gtk_image_new_from_stock(GTK_STOCK_GO_UP, GTK_ICON_SIZE_MENU));
1120
gtk_button_set_relief (GTK_BUTTON (up_button), GTK_RELIEF_NONE);
1121
gtk_widget_set_sensitive(up_button, FALSE);
1122
gtk_widget_set_tooltip_text(up_button, _("Move preset up"));
1124
g_signal_connect(G_OBJECT(up_button), "clicked", G_CALLBACK(up_button_clicked_cb), NULL);
1126
down_button = gtk_button_new();
1127
gtk_button_set_image(GTK_BUTTON(down_button), gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_MENU));
1128
gtk_button_set_relief (GTK_BUTTON (down_button), GTK_RELIEF_NONE);
1129
gtk_widget_set_sensitive(down_button, FALSE);
1130
gtk_widget_set_tooltip_text(down_button, _("Move preset down"));
1132
g_signal_connect(G_OBJECT(down_button), "clicked", G_CALLBACK(down_button_clicked_cb), NULL);
1118
move_up_button = gtk_button_new();
1119
gtk_button_set_image(GTK_BUTTON(move_up_button), gtk_image_new_from_stock(GTK_STOCK_GO_UP, GTK_ICON_SIZE_MENU));
1120
gtk_button_set_relief (GTK_BUTTON (move_up_button), GTK_RELIEF_NONE);
1121
gtk_widget_set_sensitive(move_up_button, FALSE);
1122
gtk_widget_set_tooltip_text(move_up_button, _("Move preset up"));
1124
g_signal_connect(G_OBJECT(move_up_button), "clicked", G_CALLBACK(move_up_button_clicked_cb), NULL);
1126
move_down_button = gtk_button_new();
1127
gtk_button_set_image(GTK_BUTTON(move_down_button), gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_MENU));
1128
gtk_button_set_relief (GTK_BUTTON (move_down_button), GTK_RELIEF_NONE);
1129
gtk_widget_set_sensitive(move_down_button, FALSE);
1130
gtk_widget_set_tooltip_text(move_down_button, _("Move preset down"));
1132
g_signal_connect(G_OBJECT(move_down_button), "clicked", G_CALLBACK(move_down_button_clicked_cb), NULL);
1134
1134
add_button = gtk_button_new();
1135
1135
gtk_button_set_image(GTK_BUTTON(add_button), gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU));
1149
1149
save_button = gtk_button_new();
1150
1150
gtk_button_set_image(GTK_BUTTON(save_button), gtk_image_new_from_stock(GTK_STOCK_SAVE, GTK_ICON_SIZE_MENU));
1151
1151
gtk_button_set_relief (GTK_BUTTON (save_button), GTK_RELIEF_NONE);
1152
gtk_widget_set_tooltip_text(save_button, _("Save presets to file"));
1152
gtk_widget_set_tooltip_text(save_button, _("Save to file..."));
1154
1154
if (settings.presets == NULL) {
1155
1155
gtk_widget_set_sensitive(save_button, FALSE);
1162
1162
open_button = gtk_button_new();
1163
1163
gtk_button_set_image(GTK_BUTTON(open_button), gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU));
1164
1164
gtk_button_set_relief (GTK_BUTTON (open_button), GTK_RELIEF_NONE);
1165
gtk_widget_set_tooltip_text(open_button, _("Load presets from file"));
1165
gtk_widget_set_tooltip_text(open_button, _("Load from file..."));
1166
1166
gtk_widget_set_sensitive(open_button, TRUE);
1168
1168
g_signal_connect(G_OBJECT(open_button), "clicked", G_CALLBACK(load_from_file_cb), NULL);
1170
gtk_box_pack_end(GTK_BOX(button_box), down_button, FALSE, FALSE, 0);
1171
gtk_box_pack_end(GTK_BOX(button_box), up_button, FALSE, FALSE, 0);
1170
gtk_box_pack_end(GTK_BOX(button_box), move_down_button, FALSE, FALSE, 0);
1171
gtk_box_pack_end(GTK_BOX(button_box), move_up_button, FALSE, FALSE, 0);
1172
1172
gtk_box_pack_end(GTK_BOX(button_box), remove_button, FALSE, FALSE, 0);
1173
1173
gtk_box_pack_end(GTK_BOX(button_box), add_button, FALSE, FALSE, 0);
1174
1174
gtk_box_pack_end(GTK_BOX(button_box), save_button, FALSE, FALSE, 0);
1210
1210
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(destination_button), rec_settings.destination);
1212
gtk_widget_set_tooltip_text(destination_button, _("Select a location to save the recording file"));
1213
gtk_widget_set_tooltip_text(profile_eb, _("Choose the profile to be used for recording"));
1212
gtk_widget_set_tooltip_text(destination_button, _("Choose a destination directory for recording file."));
1213
gtk_widget_set_tooltip_text(profile_eb, _("Choose the Media Profile that should be used to record."));
1215
1215
gtk_widget_show_all(dialog);