diff --git a/debian/changelog b/debian/changelog index e357faab..2fdd7d2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vbam (0.svn500-1) hardy; urgency=low + + * Updated VBA-M to r500 + + -- Bastien Bouclet Sun, 29 Apr 2008 21:16:23 +0200 + vbam (0.svn484-1) gutsy; urgency=low * Added a GTK+ binary diff --git a/src/gtk/menuitem.h b/src/gtk/menuitem.h deleted file mode 100644 index 6d3f3573..00000000 --- a/src/gtk/menuitem.h +++ /dev/null @@ -1,76 +0,0 @@ -// -*- C++ -*- -// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. -// Copyright (C) 1999-2003 Forgotten -// Copyright (C) 2004 Forgotten and the VBA development team - -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or(at your option) -// any later version. -// -// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef __VBA_MENUITEM_H__ -#define __VBA_MENUITEM_H__ - -#include -#include - -namespace VBA -{ - -class MenuItem : public Gtk::MenuItem -{ -public: - MenuItem() - {} - - MenuItem(Gtk::Widget & _roWidget) : - Gtk::MenuItem(_roWidget) - {} - - MenuItem(const Glib::ustring & _rsLabel, bool _bMnemonic = false) : - Gtk::MenuItem(_rsLabel, _bMnemonic) - {} - - inline void set_accel_key(const Gtk::AccelKey & _roAccelKey) - { - Gtk::MenuItem::set_accel_key(_roAccelKey); - } -}; - -class ImageMenuItem : public Gtk::ImageMenuItem -{ -public: - ImageMenuItem() - {} - - ImageMenuItem(Widget & _roImage, const Glib::ustring & _rsLabel, bool _bMnemonic = false) : - Gtk::ImageMenuItem(_roImage, _rsLabel, _bMnemonic) - {} - - ImageMenuItem(const Glib::ustring & _rsLabel, bool _bMnemonic = false) : - Gtk::ImageMenuItem(_rsLabel, _bMnemonic) - {} - - ImageMenuItem(const Gtk::StockID & _roId) : - Gtk::ImageMenuItem(_roId) - {} - - inline void set_accel_key(const Gtk::AccelKey & _roAccelKey) - { - Gtk::MenuItem::set_accel_key(_roAccelKey); - } -}; - -} // namespace VBA - - -#endif // __VBA_MENUITEM_H__ diff --git a/src/gtk/sndPortAudio.cpp b/src/gtk/sndPortAudio.cpp index cfb94e7c..5fa7a91e 100644 --- a/src/gtk/sndPortAudio.cpp +++ b/src/gtk/sndPortAudio.cpp @@ -106,6 +106,8 @@ bool systemSoundInit() if (err != paNoError) goto error; outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */ + if (outputParameters.device == paNoDevice) goto error; + outputParameters.channelCount = 2; /* stereo output */ outputParameters.sampleFormat = paInt16; outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index c3811abf..80fc77b8 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -30,7 +30,6 @@ #include "../Sound.h" #include "../Util.h" -#include "menuitem.h" #include "tools.h" #include "intl.h" #include "screenarea-cairo.h" @@ -99,6 +98,7 @@ Window::Window(GtkWindow * _pstWindow, const Glib::RefPtr & _poXml) : m_iScreenHeight = m_iGBAScreenHeight; m_eCartridge = CartridgeNone; m_uiJoypadState = 0; + m_poKeymap = NULL; vInitSystem(); @@ -1339,6 +1339,8 @@ void Window::vUpdateHistoryMenu() { vClearHistoryMenu(); + Glib::RefPtr poAccelGroup = get_accel_group(); + guint uiAccelKey = GDK_F1; for (std::list::const_iterator it = m_listHistory.begin(); it != m_listHistory.end(); @@ -1346,7 +1348,7 @@ void Window::vUpdateHistoryMenu() { Gtk::Image * poImage = Gtk::manage(new Gtk::Image(Gtk::Stock::OPEN, Gtk::ICON_SIZE_MENU)); Glib::ustring sLabel = Glib::path_get_basename(*it); - VBA::ImageMenuItem * poIMI = Gtk::manage(new VBA::ImageMenuItem(*poImage, sLabel)); + Gtk::ImageMenuItem * poIMI = Gtk::manage(new Gtk::ImageMenuItem(*poImage, sLabel)); poIMI->set_tooltip_text(*it); @@ -1354,8 +1356,7 @@ void Window::vUpdateHistoryMenu() sigc::mem_fun(*this, &Window::vOnRecentFile), *it)); - poIMI->set_accel_key(Gtk::AccelKey(uiAccelKey, Gdk::CONTROL_MASK)); - poIMI->accelerate(*this); + poIMI->add_accelerator("activate", poAccelGroup, uiAccelKey, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); poIMI->show(); m_poRecentMenu->items().push_back(*poIMI);