~audio-recorder/audio-recorder/trunk

« back to all changes in this revision

Viewing changes to src/settings-pipe.c

  • Committer: Osmo Antero
  • Date: 2014-09-24 13:51:15 UTC
  • Revision ID: osmoma@gmail.com-20140924135115-uq77346mihssi60l
Modifications towards version 1.5. Please see ChangeLog file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#include "settings.h" 
 
3
#include "support.h"
 
4
#include "utility.h"
 
5
#include "dconf.h"
 
6
 
 
7
void get_default_profiles() {
 
8
    // Read hard-coded values from src/media-profiles.c
 
9
    // Modifications are saved in DConf settings, key "saved-profiles".
 
10
}
 
11
 
 
12
 
 
13
void get_profiles() {
 
14
    // Read  media-profiles/pipelines to DConf registry.
 
15
    // Key: "saved-profiles"
 
16
 
 
17
 
 
18
}
 
19
 
 
20
void save_profiles() {
 
21
    // Save modified mediua-profiles/pipelines to DConf registry.
 
22
    // Key: "saved-profiles"
 
23
 
 
24
}
 
25
 
 
26
 
 
27
GtkWidget *page_to_edit_pipelines() {
 
28
 
 
29
    GtkWidget *vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 3);
 
30
    
 
31
 
 
32
    // Create a GtkGrid. 
 
33
    // Ref: http://developer.gnome.org/gtk3/3.3/GtkGrid.html
 
34
    GtkWidget *grid2 = gtk_grid_new();
 
35
    gtk_grid_set_row_homogeneous(GTK_GRID(grid2), FALSE);
 
36
    gtk_grid_set_column_homogeneous(GTK_GRID(grid2), FALSE);
 
37
 
 
38
    gtk_box_pack_start(GTK_BOX(vbox2), grid2, FALSE, TRUE, 0);
 
39
    gtk_grid_set_row_spacing(GTK_GRID(grid2), 3);
 
40
 
 
41
    // Editable ComboBox with names of the pipelines
 
42
 
 
43
    // "Title:" label
 
44
    // Translators: This is a GUI label. Keep it short.
 
45
    GtkWidget *label0 = gtk_label_new(_("Title:"));
 
46
 
 
47
    gtk_grid_attach(GTK_GRID(grid2), label0, 0, 0, 1, 1);
 
48
    gtk_misc_set_alignment(GTK_MISC(label0), 0, 0.5);
 
49
 
 
50
    GtkWidget *pipe_titles = gtk_combo_box_text_new_with_entry();
 
51
    //gtk_container_add(GTK_CONTAINER(box), combo);
 
52
    gtk_grid_attach(GTK_GRID(grid2), pipe_titles, 1, 0, 4, 1);
 
53
 
 
54
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(pipe_titles), "CD Quality, AAC 44KHz");
 
55
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(pipe_titles), "CD Quality, Lossless 44KHz");
 
56
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(pipe_titles), "CD Quality, Lossy 44KHz");
 
57
    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(pipe_titles), "CD Quality, Lossy 44KHz");
 
58
 
 
59
    // "Title:" label
 
60
    // Translators: This is a GUI label. Keep it short.
 
61
    label0 = gtk_label_new(_("File extension:"));
 
62
    gtk_grid_attach(GTK_GRID(grid2), label0, 0, 1, 1, 1);
 
63
 
 
64
    GtkWidget *file_ext = gtk_entry_new();
 
65
    gtk_grid_attach(GTK_GRID(grid2), file_ext, 1, 1, 2, 1);
 
66
 
 
67
    // Gstreamer pipeline (fragment) 
 
68
    GtkWidget *frame2 = gtk_frame_new(NULL);
 
69
    gtk_widget_show(frame2);
 
70
    gtk_box_pack_start(GTK_BOX(vbox2), frame2, TRUE, TRUE, 0);
 
71
 
 
72
    GtkWidget *pipe_text = gtk_text_view_new();
 
73
    gtk_widget_show(pipe_text);
 
74
    gtk_container_add(GTK_CONTAINER(frame2), pipe_text);
 
75
 
 
76
 
 
77
 
 
78
    GtkWidget *vbox3 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3);
 
79
 
 
80
    GtkWidget *box0 = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
 
81
    gtk_widget_show(box0);
 
82
    gtk_button_box_set_layout(GTK_BUTTON_BOX(box0), GTK_BUTTONBOX_START);
 
83
 
 
84
    GtkWidget *button0 = gtk_button_new_with_label("Test");
 
85
    gtk_box_pack_start(GTK_BOX(box0), button0, TRUE, FALSE, 0);
 
86
 
 
87
    button0 = gtk_button_new_with_label("Show cmd");
 
88
    gtk_box_pack_start(GTK_BOX(box0), button0, TRUE, FALSE, 0);
 
89
 
 
90
    button0 = gtk_button_new_with_label("Reset");
 
91
    gtk_box_pack_start(GTK_BOX(box0), button0, TRUE, FALSE, 0);
 
92
 
 
93
    gtk_box_pack_start(GTK_BOX(vbox3), box0, FALSE, FALSE, 0);
 
94
 
 
95
 
 
96
    box0 = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
 
97
    gtk_widget_show(box0);
 
98
    
 
99
    gtk_button_box_set_layout(GTK_BUTTON_BOX(box0), GTK_BUTTONBOX_END);
 
100
    
 
101
    button0 = gtk_button_new_with_label("New");
 
102
    gtk_box_pack_start(GTK_BOX(box0), button0, TRUE, FALSE, 0);
 
103
 
 
104
    button0 = gtk_button_new_with_label("Remove");
 
105
    gtk_box_pack_start(GTK_BOX(box0), button0, TRUE, FALSE, 0);
 
106
 
 
107
    button0 = gtk_button_new_with_label("Save");
 
108
    gtk_box_pack_start(GTK_BOX(box0), button0, TRUE, FALSE, 0);
 
109
 
 
110
    gtk_box_pack_end(GTK_BOX(vbox3), box0, FALSE, FALSE, 0);
 
111
 
 
112
    gtk_box_pack_start(GTK_BOX(vbox2), vbox3, FALSE, TRUE, 0);
 
113
    
 
114
    return vbox2;
 
115
    
 
116
}
 
117
 
 
118
 
 
119