summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Patchage.cpp13
-rw-r--r--src/Patchage.hpp1
-rw-r--r--src/PatchageCanvas.cpp4
-rw-r--r--src/patchage.glade8
4 files changed, 22 insertions, 4 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index b91150f..84f66d3 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -162,6 +162,9 @@ Patchage::Patchage(int argc, char** argv)
_main_scrolledwin->property_hadjustment().get_value()->set_step_increment(10);
_main_scrolledwin->property_vadjustment().get_value()->set_step_increment(10);
+ _main_scrolledwin->signal_scroll_event().connect(
+ sigc::mem_fun(this, &Patchage::on_scroll));
+
_buffer_size_combo->signal_changed().connect(
sigc::mem_fun(this, &Patchage::buffer_size_changed));
_clear_load_but->signal_clicked().connect(
@@ -251,6 +254,8 @@ Patchage::Patchage(int argc, char** argv)
connect_widgets();
update_state();
+ _canvas->grab_focus();
+
// Idle callback, check if we need to refresh
Glib::signal_timeout().connect(
sigc::mem_fun(this, &Patchage::idle_callback), 100);
@@ -663,6 +668,14 @@ Patchage::on_view_toolbar()
_toolbar->hide();
}
+
+bool
+Patchage::on_scroll(GdkEventScroll* ev)
+{
+ cout << "ON SCROLL" << endl;
+ return false;
+}
+
void
Patchage::buffer_size_changed()
diff --git a/src/Patchage.hpp b/src/Patchage.hpp
index 2f08d2b..18f95d3 100644
--- a/src/Patchage.hpp
+++ b/src/Patchage.hpp
@@ -73,6 +73,7 @@ protected:
void on_show_messages();
void on_store_positions();
void on_view_toolbar();
+ bool on_scroll(GdkEventScroll* ev);
void zoom(double z);
bool idle_callback();
diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp
index 1a06674..565e703 100644
--- a/src/PatchageCanvas.cpp
+++ b/src/PatchageCanvas.cpp
@@ -31,8 +31,8 @@
#endif
PatchageCanvas::PatchageCanvas(Patchage* app, int width, int height)
-: FlowCanvas::Canvas(width, height),
- _app(app)
+ : FlowCanvas::Canvas(width, height)
+ , _app(app)
{
}
diff --git a/src/patchage.glade b/src/patchage.glade
index 963ce5d..7559db8 100644
--- a/src/patchage.glade
+++ b/src/patchage.glade
@@ -486,6 +486,7 @@ The bar represents the percentage of available time used for audio processing (i
<property name="draw">False</property>
</widget>
<packing>
+ <property name="expand">False</property>
<property name="homogeneous">False</property>
</packing>
</child>
@@ -496,6 +497,7 @@ The bar represents the percentage of available time used for audio processing (i
</widget>
<packing>
<property name="expand">False</property>
+ <property name="homogeneous">False</property>
</packing>
</child>
<child>
@@ -529,8 +531,10 @@ The bar represents the percentage of available time used for audio processing (i
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
+ <property name="is_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
+ <property name="receives_default">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
@@ -595,7 +599,7 @@ JACK D-Bus driver by Nedko Arnaudov &lt;nedko@arnaudov.name&gt;</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
+ <widget class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<child>
<widget class="GtkVBox" id="vbox2">
@@ -663,7 +667,7 @@ JACK D-Bus driver by Nedko Arnaudov &lt;nedko@arnaudov.name&gt;</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <widget class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>