X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2FEqualizerPopUp.vala;fp=src%2FEqualizerPopUp.vala;h=adba54b838b29dcb4d135d00fdaa0c987b5664e7;hb=804630a4e0d41b182d8540f2aec69cf25ca0acfd;hp=0000000000000000000000000000000000000000;hpb=753fb925588aeeacdd74a163672acf2bf362a99e;p=demorecorder diff --git a/src/EqualizerPopUp.vala b/src/EqualizerPopUp.vala new file mode 100644 index 0000000..adba54b --- /dev/null +++ b/src/EqualizerPopUp.vala @@ -0,0 +1,55 @@ +/* Demo Recorder for MAEMO 5 +* Copyright (C) 2010 Dru Moore +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2, +* or (at your option) any later version, as published by the Free +* Software Foundation +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details +* +* You should have received a copy of the GNU General Public +* License along with this program; if not, write to the +* Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ +namespace IdWorks { + + public class EqualizerPopUp : Hildon.Dialog { + + GraphicEqualizer equalizer; + + public signal void eq_updated(int band, double val); + public signal void name_updated(string name); + + private void eq_updated_callback(GraphicEqualizer sender, int band, double val) { + eq_updated(band, val); + } + + private void name_updated_callback(GraphicEqualizer sender, string name) { + name_updated(name); + } + + public EqualizerPopUp(string title, Gtk.Widget parent) { + this.set_title(title); + this.set_parent(parent); + + this.set_default_response(Gtk.ResponseType.ACCEPT); + this.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.ACCEPT); + + Gtk.VBox control_area = (Gtk.VBox)this.get_content_area(); + + equalizer = new GraphicEqualizer(); + equalizer.name_updated.connect(name_updated_callback); + equalizer.eq_updated.connect(eq_updated_callback); + + control_area.pack_start(equalizer, true, true , 2); + + this.show_all(); + } + + } + +} \ No newline at end of file