~ubuntu-branches/ubuntu/trusty/gnomeradio/trusty

« back to all changes in this revision

Viewing changes to .pc/gnomeradio-media_types.patch/src/prefs.c

  • Committer: Package Import Robot
  • Author(s): POJAR GEORGE
  • Date: 2013-05-24 01:42:00 UTC
  • Revision ID: package-import@ubuntu.com-20130524014200-b156v5n1ifwagbn4
Tags: 1.8-2ubuntu11
* Modified debian/patches/gnomeradio-media_types.patch: Fixed crashed with
  SIGSEGV in fprintf(). (LP: #1183470)
* Modified gnomeradio-license.patch:
  - Rewrite About() to display only the essential information.
  - Run gtk-update-icon-cache in uninstall-hook.
* Modified gnomeradio-station_list.patch: Added missing ellipsis for some
  buttons in Preferences menu.
* Added full path of icon in debian/menu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
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;
366
366
        }
367
367
}
368
368
 
369
 
static void up_button_clicked_cb(GtkWidget * widget, gpointer data)
 
369
static void move_up_button_clicked_cb(GtkWidget * widget, gpointer data)
370
370
{
371
371
        GtkTreeIter iter, iter2;
372
372
        GtkTreePath *path, *path2;
421
421
        gtk_tree_path_free(path);
422
422
 
423
423
        if (pos - 1 <= 0) {
424
 
                gtk_widget_set_sensitive(up_button, FALSE);
 
424
                gtk_widget_set_sensitive(move_up_button, FALSE);
425
425
        } else {
426
 
                gtk_widget_set_sensitive(up_button, TRUE);
 
426
                gtk_widget_set_sensitive(move_up_button, TRUE);
427
427
        }
428
 
        gtk_widget_set_sensitive(down_button, TRUE);
 
428
        gtk_widget_set_sensitive(move_down_button, TRUE);
429
429
}
430
430
 
431
 
static void down_button_clicked_cb(GtkWidget * widget, gpointer data)
 
431
static void move_down_button_clicked_cb(GtkWidget * widget, gpointer data)
432
432
{
433
433
        GtkTreeIter iter, iter2;
434
434
        GtkTreePath *path, *path2;
487
487
        gtk_tree_path_free(path);
488
488
 
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);
491
491
        } else {
492
 
                gtk_widget_set_sensitive(down_button, TRUE);
 
492
                gtk_widget_set_sensitive(move_down_button, TRUE);
493
493
        }
494
 
        gtk_widget_set_sensitive(up_button, TRUE);
 
494
        gtk_widget_set_sensitive(move_up_button, TRUE);
495
495
}
496
496
 
497
497
static void destination_button_clicked_cb(GtkWidget *button, gpointer data)
530
530
                gtk_tree_path_free(path);
531
531
 
532
532
                if (pos == 0) {
533
 
                        gtk_widget_set_sensitive(up_button, FALSE);
 
533
                        gtk_widget_set_sensitive(move_up_button, FALSE);
534
534
                } else {
535
 
                        gtk_widget_set_sensitive(up_button, TRUE);
 
535
                        gtk_widget_set_sensitive(move_up_button, TRUE);
536
536
                }
537
537
 
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);
540
540
                } else {
541
 
                        gtk_widget_set_sensitive(down_button, TRUE);
 
541
                        gtk_widget_set_sensitive(move_down_button, TRUE);
542
542
                }
543
543
        }
544
544
        return FALSE;
649
649
        pos = g_list_index(settings.presets, (gpointer)ps);
650
650
 
651
651
        if (pos == 0) {
652
 
                gtk_widget_set_sensitive(up_button, FALSE);
 
652
                gtk_widget_set_sensitive(move_up_button, FALSE);
653
653
        } else {
654
 
                gtk_widget_set_sensitive(up_button, TRUE);
 
654
                gtk_widget_set_sensitive(move_up_button, TRUE);
655
655
        }
656
656
 
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);
659
659
        } else {
660
 
                        gtk_widget_set_sensitive(down_button, TRUE);
 
660
                        gtk_widget_set_sensitive(move_down_button, TRUE);
661
661
        }
662
662
        gtk_tree_path_free(path);
663
663
        return;
846
846
        {
847
847
                xmlFreeDoc(doc);
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);
851
851
                g_free(caption);
852
852
                g_free(detail);
926
926
 
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);
931
931
}
932
932
 
933
933
/* Callback for the "Load from file" button; calls load_from_file */
1115
1115
 
1116
1116
        button_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
1117
1117
 
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"));
1123
 
 
1124
 
        g_signal_connect(G_OBJECT(up_button), "clicked", G_CALLBACK(up_button_clicked_cb), NULL);
1125
 
 
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"));
1131
 
 
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"));
 
1123
 
 
1124
        g_signal_connect(G_OBJECT(move_up_button), "clicked", G_CALLBACK(move_up_button_clicked_cb), NULL);
 
1125
 
 
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"));
 
1131
 
 
1132
        g_signal_connect(G_OBJECT(move_down_button), "clicked", G_CALLBACK(move_down_button_clicked_cb), NULL);
1133
1133
 
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..."));
1153
1153
 
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);
1167
1167
 
1168
1168
        g_signal_connect(G_OBJECT(open_button), "clicked", G_CALLBACK(load_from_file_cb), NULL);
1169
1169
 
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);
1209
1209
 
1210
1210
        gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(destination_button), rec_settings.destination);
1211
1211
 
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."));
1214
1214
        
1215
1215
        gtk_widget_show_all(dialog);
1216
1216