Added alt. glade file, changed frequency, use alt. glade file
authorEinar Jørgen Haraldseid <einar@haraldseid.net>
Thu, 19 Jun 2014 10:32:10 +0000 (12:32 +0200)
committerEinar Jørgen Haraldseid <einar@haraldseid.net>
Thu, 19 Jun 2014 10:32:10 +0000 (12:32 +0200)
example2.py
example2_2.glade [new file with mode: 0644]

index 21d4dbb9517917caef3a234aca3488bb8fd0b820..90b846337a1ea2f82ce64a73098d54f5a876376d 100755 (executable)
@@ -15,7 +15,7 @@ class Main:
         # Create gui bits and bobs
 
         self.wTree = Gtk.Builder()
         # Create gui bits and bobs
 
         self.wTree = Gtk.Builder()
-        self.wTree.add_from_file("example2.glade")
+        self.wTree.add_from_file("example2_2.glade")
         
         signals = {
             "on_play_clicked" : self.OnPlay,
         
         signals = {
             "on_play_clicked" : self.OnPlay,
@@ -33,7 +33,7 @@ class Main:
 
         # Add an audiotestsrc element to the pipeline
         self.audiotestsrc = Gst.ElementFactory.make("audiotestsrc", "audio")
 
         # Add an audiotestsrc element to the pipeline
         self.audiotestsrc = Gst.ElementFactory.make("audiotestsrc", "audio")
-        self.audiotestsrc.set_property("freq", 200)
+        self.audiotestsrc.set_property("freq", 800)
         self.pipeline.add(self.audiotestsrc)
 
         # Add a pulsesink element to the pipeline
         self.pipeline.add(self.audiotestsrc)
 
         # Add a pulsesink element to the pipeline
diff --git a/example2_2.glade b/example2_2.glade
new file mode 100644 (file)
index 0000000..0a448f8
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.10"/>
+  <object class="GtkImage" id="image1">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="icon_name">audio-volume-high</property>
+  </object>
+  <object class="GtkImage" id="image2">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="icon_name">audio-volume-muted</property>
+  </object>
+  <object class="GtkDialog" id="mainwindow">
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">Beeeeeeeeeeeeeeeeeeeeeeeeeeeep!</property>
+    <property name="resizable">False</property>
+    <property name="destroy_with_parent">True</property>
+    <property name="type_hint">normal</property>
+    <property name="has_resize_grip">False</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="label" translatable="yes">Beeeeeeeep!</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="image">image1</property>
+                <property name="always_show_image">True</property>
+                <signal name="clicked" handler="on_play_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button2">
+                <property name="label" translatable="yes">No beeeeeep!</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="image">image2</property>
+                <property name="always_show_image">True</property>
+                <signal name="clicked" handler="on_stop_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button3">
+                <property name="label">gtk-quit</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <property name="always_show_image">True</property>
+                <signal name="clicked" handler="on_quit_clicked" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Beeeeeeeeeeeeeeeep?</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>