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.
This commit is contained in:
parent
107a8dd305
commit
36d82f23aa
|
@ -21,6 +21,8 @@
|
||||||
#ifndef mainwindow_h
|
#ifndef mainwindow_h
|
||||||
#define mainwindow_h
|
#define mainwindow_h
|
||||||
|
|
||||||
|
class MainWindow;
|
||||||
|
|
||||||
#include "pavucontrol.h"
|
#include "pavucontrol.h"
|
||||||
#include <pulse/ext-stream-restore.h>
|
#include <pulse/ext-stream-restore.h>
|
||||||
#if HAVE_EXT_DEVICE_RESTORE_API
|
#if HAVE_EXT_DEVICE_RESTORE_API
|
||||||
|
|
|
@ -42,7 +42,7 @@ MainWindow* PavuApplication::create_window()
|
||||||
m = pa_glib_mainloop_new(g_main_context_default());
|
m = pa_glib_mainloop_new(g_main_context_default());
|
||||||
g_assert(m);
|
g_assert(m);
|
||||||
|
|
||||||
MainWindow* pavucontrol_window = (MainWindow *)pavucontrol_get_window(m, maximize, retry, tab);
|
MainWindow* pavucontrol_window = pavucontrol_get_window(m, maximize, retry, tab);
|
||||||
|
|
||||||
pavucontrol_window->signal_hide().connect(
|
pavucontrol_window->signal_hide().connect(
|
||||||
sigc::bind<Gtk::Window*>(sigc::mem_fun(*this,
|
sigc::bind<Gtk::Window*>(sigc::mem_fun(*this,
|
||||||
|
|
|
@ -625,7 +625,7 @@ gboolean connect_to_pulse(gpointer userdata) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gtk::Window* pavucontrol_get_window(pa_glib_mainloop *m, bool maximize, bool _retry, int _tab_number) {
|
MainWindow* pavucontrol_get_window(pa_glib_mainloop *m, bool maximize, bool _retry, int _tab_number) {
|
||||||
|
|
||||||
MainWindow* mainWindow = NULL;
|
MainWindow* mainWindow = NULL;
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,10 @@ enum SourceType {
|
||||||
SOURCE_MONITOR,
|
SOURCE_MONITOR,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include "mainwindow.h"
|
||||||
|
|
||||||
pa_context* get_context(void);
|
pa_context* get_context(void);
|
||||||
void show_error(const char *txt);
|
void show_error(const char *txt);
|
||||||
|
|
||||||
Gtk::Window* pavucontrol_get_window(pa_glib_mainloop *m, bool maximize, bool retry, int tab_number);
|
MainWindow* pavucontrol_get_window(pa_glib_mainloop *m, bool maximize, bool retry, int tab_number);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue