diff options
author | Colin Guthrie <cguthrie@mandriva.org> | 2009-03-15 13:08:22 +0000 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2009-03-15 13:08:22 +0000 |
commit | a8357b3dc21ee666bd81aa2e1f3e27170354d226 (patch) | |
tree | 396242bd9ce15fb1d323d539444de73885149e9f /src | |
parent | e1e452ac2209a343feea10a358668a75c5c5e289 (diff) |
Move common setup into a shared header
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/channelwidget.cc | 2 | ||||
-rw-r--r-- | src/channelwidget.h | 11 | ||||
-rw-r--r-- | src/minimalstreamwidget.h | 7 | ||||
-rw-r--r-- | src/pavucontrol.cc | 11 | ||||
-rw-r--r-- | src/pavucontrol.h | 37 | ||||
-rw-r--r-- | src/streamwidget.h | 9 |
7 files changed, 45 insertions, 35 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 5df4619..4a228b8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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)\" diff --git a/src/channelwidget.cc b/src/channelwidget.cc index f30a01a..d6832a3 100644 --- a/src/channelwidget.cc +++ b/src/channelwidget.cc @@ -21,6 +21,8 @@ #include "channelwidget.h" #include "streamwidget.h" +#include "i18n.h" + static bool show_decibel = true; /*** ChannelWidget ***/ diff --git a/src/channelwidget.h b/src/channelwidget.h index a999783..3472420 100644 --- a/src/channelwidget.h +++ b/src/channelwidget.h @@ -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 { diff --git a/src/minimalstreamwidget.h b/src/minimalstreamwidget.h index c2f5b72..af5c9b5 100644 --- a/src/minimalstreamwidget.h +++ b/src/minimalstreamwidget.h @@ -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: diff --git a/src/pavucontrol.cc b/src/pavucontrol.cc index 597591e..64b4d8c 100644 --- a/src/pavucontrol.cc +++ b/src/pavucontrol.cc @@ -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; diff --git a/src/pavucontrol.h b/src/pavucontrol.h new file mode 100644 index 0000000..55256d7 --- /dev/null +++ b/src/pavucontrol.h @@ -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 diff --git a/src/streamwidget.h b/src/streamwidget.h index da4c8b8..c4b82bb 100644 --- a/src/streamwidget.h +++ b/src/streamwidget.h @@ -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" |