Commit Graph

6 Commits

Author SHA1 Message Date
Felipe Sateler 2840825519 Migrate away from deprecated Gtk interfaces
This was accomplished by building with -DGTKMM_DISABLE_DEPRECATED.
2020-10-11 17:18:59 +03:00
lionel 327be8dc28 pavuapplication: fix compilation issue with g++ (Raspbian 4.9.2-10+deb8u2)
Fixes this compilation issue:

pavuapplication.cc: In function ‘int main(int, char**)’:
pavuapplication.cc:146:32: error: use of deleted function ‘PavuApplication::PavuApplication(PavuApplication&&)’
     auto app = PavuApplication();
                                ^
In file included from pavuapplication.cc:29:0:
pavuapplication.h:27:7: note: ‘PavuApplication::PavuApplication(PavuApplication&&)’ is implicitly deleted because the default definition would be ill-formed:
 class PavuApplication : public Gtk::Application {
       ^
In file included from /usr/include/gtkmm-3.0/gtkmm/window.h:32:0,
                 from /usr/include/gtkmm-3.0/gtkmm/dialog.h:30,
                 from /usr/include/gtkmm-3.0/gtkmm/aboutdialog.h:33,
                 from /usr/include/gtkmm-3.0/gtkmm.h:99,
                 from pavucontrol.h:29,
                 from pavuapplication.h:24,
                 from pavuapplication.cc:29:
/usr/include/gtkmm-3.0/gtkmm/application.h:211:3: error: ‘Gtk::Application::Application(const Gtk::Application&)’ is private
   Application(const Application&);
   ^
In file included from pavuapplication.cc:29:0:
pavuapplication.h:27:7: error: within this context
 class PavuApplication : public Gtk::Application {
       ^
In file included from /usr/include/glibmm-2.4/glibmm/wrap.h:26:0,
                 from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:26,
                 from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:23,
                 from /usr/include/glibmm-2.4/glibmm.h:91,
                 from /usr/include/gtkmm-3.0/gtkmm.h:87,
                 from pavucontrol.h:29,
                 from pavuapplication.h:24,
                 from pavuapplication.cc:29:
/usr/include/glibmm-2.4/glibmm/objectbase.h:238:3: error: ‘Glib::ObjectBase::ObjectBase(const Glib::ObjectBase&)’ is private
   ObjectBase(const ObjectBase&);
   ^
In file included from pavuapplication.cc:29:0:
pavuapplication.h:27:7: error: within this context
 class PavuApplication : public Gtk::Application {
       ^
2020-02-14 11:35:54 +02:00
Tanu Kaskinen d3b3bee378 pavuapplication: initialize members in the constructor
It seems that without explicit initialization of the members they remain
uninitialized. The lack of initialization caused crashing, because
PavuApplication::on_activate() creates the MainWindow only if mainWindow
is NULL, and if it's some random value instead, on_activate() calls
selectTab() on a non-existent window.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/issues/49
2018-10-18 15:27:10 +03:00
Tanu Kaskinen 36d82f23aa remove unnecessary Window -> MainWindow casting
mainwindow.h and pavucontrol.h include each other, which makes it
necessary to declare some types before the include directives.
2017-11-02 10:51:34 +02:00
Tanu Kaskinen 107a8dd305 remove unnecessary RefPtr wrapping of PavuApplication
There's no need for reference counting of PavuApplication.
2017-11-02 10:51:13 +02:00
Colin Leroy f6ce4fb8db Implement single-launch with Gtk::Application
This introduces a new file for clarity. Options
handling changes so that --tab changes the tab
if the window is already opened. Other options
are only used at start time.
2017-11-01 13:39:39 +02:00