Move common setup into a shared header

This commit is contained in:
Colin Guthrie 2009-03-15 13:08:22 +00:00
parent e1e452ac22
commit a8357b3dc2
7 changed files with 45 additions and 35 deletions

View File

@ -28,7 +28,8 @@ pavucontrol_SOURCES= \
minimalstreamwidget.h minimalstreamwidget.cc \
channelwidget.h channelwidget.cc \
streamwidget.h streamwidget.cc \
pavucontrol.cc i18n.h
pavucontrol.h pavucontrol.cc \
i18n.h
pavucontrol_LDADD=$(AM_LDADD) $(GUILIBS_LIBS) $(PULSE_LIBS)
pavucontrol_CXXFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(PULSE_CFLAGS) -DLOCALEDIR=\"$(localedir)\"

View File

@ -21,6 +21,8 @@
#include "channelwidget.h"
#include "streamwidget.h"
#include "i18n.h"
static bool show_decibel = true;
/*** ChannelWidget ***/

View File

@ -21,19 +21,10 @@
#ifndef channelwidget_h
#define channelwidget_h
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtkmm.h>
#include <libglademm.h>
#include "pavucontrol.h"
#include <canberra-gtk.h>
#include <pulse/pulseaudio.h>
#include "i18n.h"
class StreamWidget;
class ChannelWidget : public Gtk::EventBox {

View File

@ -21,12 +21,7 @@
#ifndef minimalstreamwidget_h
#define minimalstreamwidget_h
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtkmm.h>
#include <libglademm.h>
#include "pavucontrol.h"
class MinimalStreamWidget : public Gtk::VBox {
public:

View File

@ -18,20 +18,15 @@
along with pavucontrol. If not, see <http://www.gnu.org/licenses/>.
***/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "pavucontrol.h"
#include <signal.h>
#include <string.h>
#include <gtkmm.h>
#include <libglademm.h>
#include <libintl.h>
#include <canberra-gtk.h>
#include <pulse/pulseaudio.h>
#include <pulse/glib-mainloop.h>
#include <pulse/ext-stream-restore.h>
@ -40,10 +35,6 @@
#include "channelwidget.h"
#include "streamwidget.h"
#ifndef GLADE_FILE
#define GLADE_FILE "pavucontrol.glade"
#endif
static pa_context *context = NULL;
static int n_outstanding = 0;

37
src/pavucontrol.h Normal file
View File

@ -0,0 +1,37 @@
/***
This file is part of pavucontrol.
Copyright 2006-2008 Lennart Poettering
Copyright 2009 Colin Guthrie
pavucontrol 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 of the License, or
(at your option) any later version.
pavucontrol 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 pavucontrol. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef pavucontrol_h
#define pavucontrol_h
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtkmm.h>
#include <libglademm.h>
#include <pulse/pulseaudio.h>
#ifndef GLADE_FILE
#define GLADE_FILE "pavucontrol.glade"
#endif
#endif

View File

@ -21,14 +21,7 @@
#ifndef streamwidget_h
#define streamwidget_h
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtkmm.h>
#include <libglademm.h>
#include <pulse/pulseaudio.h>
#include "pavucontrol.h"
#include "minimalstreamwidget.h"