ben's pane resizing "fixes" for OSX, plus slightly more debugging for kbd events (disabled)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@10141 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
aed62d61de
commit
e6b2776e8a
|
@ -197,7 +197,6 @@ DragInfo::clear_copied_locations ()
|
|||
copied_locations.clear ();
|
||||
}
|
||||
|
||||
#ifdef GTKOSX
|
||||
static void
|
||||
pane_size_watcher (Paned* pane)
|
||||
{
|
||||
|
@ -208,7 +207,7 @@ pane_size_watcher (Paned* pane)
|
|||
ugh.
|
||||
*/
|
||||
|
||||
int max_width_of_lhs = GTK_WIDGET(pane->gobj())->allocation.width - 25;
|
||||
int max_width_of_lhs = GTK_WIDGET(pane->gobj())->allocation.width - 62;
|
||||
|
||||
gint pos = pane->get_position ();
|
||||
|
||||
|
@ -216,7 +215,6 @@ pane_size_watcher (Paned* pane)
|
|||
pane->set_position (max_width_of_lhs);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Editor::Editor ()
|
||||
:
|
||||
|
@ -747,10 +745,9 @@ Editor::Editor ()
|
|||
edit_pane.pack2 (the_notebook, false, true);
|
||||
|
||||
edit_pane.signal_size_allocate().connect (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast<Paned*> (&edit_pane)));
|
||||
#ifdef GTKOSX
|
||||
|
||||
Glib::PropertyProxy<int> proxy = edit_pane.property_position();
|
||||
proxy.signal_changed().connect (bind (sigc::ptr_fun (pane_size_watcher), static_cast<Paned*> (&edit_pane)));
|
||||
#endif
|
||||
|
||||
top_hbox.pack_start (toolbar_frame, true, true);
|
||||
|
||||
|
|
|
@ -59,6 +59,25 @@ using namespace std;
|
|||
|
||||
using PBD::atoi;
|
||||
|
||||
static void
|
||||
pane_size_watcher (Paned* pane)
|
||||
{
|
||||
/* if the handle of a pane vanishes into (at least) the tabs of a notebook,
|
||||
it is no longer accessible. so stop that. this doesn't happen on X11,
|
||||
just the quartz backend.
|
||||
|
||||
ugh.
|
||||
*/
|
||||
|
||||
gint pos = pane->get_position ();
|
||||
|
||||
if (pos < 22) {
|
||||
pane->set_position (22);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Mixer_UI::Mixer_UI ()
|
||||
: Window (Gtk::WINDOW_TOPLEVEL)
|
||||
{
|
||||
|
@ -218,6 +237,10 @@ Mixer_UI::Mixer_UI ()
|
|||
static_cast<Gtk::Paned*> (&rhs_pane1)));
|
||||
list_hpane.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler),
|
||||
static_cast<Gtk::Paned*> (&list_hpane)));
|
||||
|
||||
Glib::PropertyProxy<int> proxy = list_hpane.property_position();
|
||||
proxy.signal_changed().connect (bind (sigc::ptr_fun (pane_size_watcher), static_cast<Paned*> (&list_hpane)));
|
||||
|
||||
|
||||
global_vpacker.pack_start (list_hpane, true, true);
|
||||
|
||||
|
|
|
@ -485,7 +485,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
|||
bool special_handling_of_unmodified_accelerators = false;
|
||||
bool allow_activating = true;
|
||||
|
||||
//#define DEBUG_ACCELERATOR_HANDLING
|
||||
// #define DEBUG_ACCELERATOR_HANDLING
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
//bool debug = (getenv ("ARDOUR_DEBUG_ACCELERATOR_HANDLING") != 0);
|
||||
bool debug=true;
|
||||
|
@ -510,7 +510,8 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
|||
if (debug) {
|
||||
cerr << "Win = " << win << " Key event: code = " << ev->keyval << " name = " << gdk_keyval_name (ev->keyval) << " state = " << hex << ev->state << dec
|
||||
<< " ctrl " << ((ev->state & GDK_CONTROL_MASK) ? 1 : 0)
|
||||
<< " alt " << ((ev->state & GDK_MOD1_MASK) ? 1 : 0)
|
||||
<< " alt/mod1 " << ((ev->state & GDK_MOD1_MASK) ? 1 : 0)
|
||||
<< " mod2 " << ((ev->state & GDK_MOD2_MASK) ? 1 : 0)
|
||||
<< " shift " << ((ev->state & GDK_SHIFT_MASK) ? 1 : 0)
|
||||
<< " cmd/meta " << ((ev->state & GDK_META_MASK) ? 1 : 0)
|
||||
<< " lock " << ((ev->state & GDK_LOCK_MASK) ? 1 : 0)
|
||||
|
@ -568,7 +569,9 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
|||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
cerr << "Remapped " << gdk_keyval_name (ev->keyval) << " to " << gdk_keyval_name (keyval_without_alt) << endl;
|
||||
|
||||
#endif ev->keyval = keyval_without_alt;
|
||||
#endif
|
||||
ev->keyval = keyval_without_alt;
|
||||
ev->group = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue