correct check for presence of / or \ in a session name
[ardour.git] / gtk2_ardour / panner2d.cc
index 1fb94a1321130a292b9af83766052eedf3c6111b..6fa64be8e60e5d6a71869ad6a72683ba62c1cbdc 100644 (file)
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <cmath>
 #include <climits>
-#include <string.h>
+#include <cstring>
 
 #include <gtkmm/menu.h>
 #include <gtkmm/checkmenuitem.h>
@@ -58,8 +57,8 @@ Panner2d::Target::~Target ()
        }
 }
 
-Panner2d::Panner2d (Panner& p, int32_t w, int32_t h)
-       : panner (p), width (w), height (h)
+Panner2d::Panner2d (Panner& p, int32_t h)
+       : panner (p), width (0), height (h)
 {
        context_menu = 0;
        bypass_menu_item = 0;
@@ -535,7 +534,7 @@ Panner2d::on_button_release_event (GdkEventButton *ev)
                y = (int) floor (ev->y);
                state = (GdkModifierType) ev->state;
 
-               if (drag_is_puck && (Keyboard::modifier_state_contains (state, Keyboard::Shift))) {
+               if (drag_is_puck && (Keyboard::modifier_state_contains (state, Keyboard::TertiaryModifier))) {
                        
                        for (Targets::iterator i = pucks.begin(); i != pucks.end(); ++i) {
                                Target* puck = i->second;
@@ -593,7 +592,7 @@ Panner2d::show_context_menu ()
        } 
 
        bypass_menu_item->set_active (panner.bypassed());
-       context_menu->popup (1, 0);
+       context_menu->popup (1, gtk_get_current_event_time());
 }
 
 void