Drop the need to use libglademm

This commit is contained in:
Rafał Mużyło 2011-03-03 14:31:14 +00:00 committed by Colin Guthrie
parent 5997290d1e
commit 9ce0e0a380
25 changed files with 1110 additions and 855 deletions

View File

@ -39,7 +39,7 @@ AC_PROG_LN_S
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_HEADER_STDC AC_HEADER_STDC
PKG_CHECK_MODULES(GUILIBS, [ gtkmm-2.4 >= 2.16 libglademm-2.4 sigc++-2.0 libcanberra-gtk >= 0.16 ]) PKG_CHECK_MODULES(GUILIBS, [ gtkmm-2.4 >= 2.16 sigc++-2.0 libcanberra-gtk >= 0.16 ])
AC_SUBST(GUILIBS_CFLAGS) AC_SUBST(GUILIBS_CFLAGS)
AC_SUBST(GUILIBS_LIBS) AC_SUBST(GUILIBS_LIBS)

View File

@ -27,7 +27,7 @@
#include "i18n.h" #include "i18n.h"
/*** CardWidget ***/ /*** CardWidget ***/
CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::VBox(cobject) { Gtk::VBox(cobject) {
x->get_widget("nameLabel", nameLabel); x->get_widget("nameLabel", nameLabel);
@ -43,7 +43,7 @@ CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
CardWidget* CardWidget::create() { CardWidget* CardWidget::create() {
CardWidget* w; CardWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "cardWidget"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "cardWidget");
x->get_widget_derived("cardWidget", w); x->get_widget_derived("cardWidget", w);
return w; return w;
} }

View File

@ -25,7 +25,7 @@
class CardWidget : public Gtk::VBox { class CardWidget : public Gtk::VBox {
public: public:
CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static CardWidget* create(); static CardWidget* create();
Gtk::Label *nameLabel; Gtk::Label *nameLabel;

View File

@ -31,7 +31,7 @@ static bool show_decibel = true;
/*** ChannelWidget ***/ /*** ChannelWidget ***/
ChannelWidget::ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : ChannelWidget::ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::EventBox(cobject), Gtk::EventBox(cobject),
volumeScaleEnabled(true) { volumeScaleEnabled(true) {
@ -47,7 +47,9 @@ ChannelWidget::ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
ChannelWidget* ChannelWidget::create() { ChannelWidget* ChannelWidget::create() {
ChannelWidget* w; ChannelWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "channelWidget"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create();
x->add_from_file(GLADE_FILE, "adjustment1");
x->add_from_file(GLADE_FILE, "channelWidget");
x->get_widget_derived("channelWidget", w); x->get_widget_derived("channelWidget", w);
return w; return w;
} }

View File

@ -27,7 +27,7 @@ class MinimalStreamWidget;
class ChannelWidget : public Gtk::EventBox { class ChannelWidget : public Gtk::EventBox {
public: public:
ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static ChannelWidget* create(); static ChannelWidget* create();
void setVolume(pa_volume_t volume); void setVolume(pa_volume_t volume);

View File

@ -31,7 +31,7 @@
#include "i18n.h" #include "i18n.h"
/*** DeviceWidget ***/ /*** DeviceWidget ***/
DeviceWidget::DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : DeviceWidget::DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
MinimalStreamWidget(cobject, x) { MinimalStreamWidget(cobject, x) {
x->get_widget("lockToggleButton", lockToggleButton); x->get_widget("lockToggleButton", lockToggleButton);
@ -197,7 +197,7 @@ void DeviceWidget::renamePopup() {
Gtk::Dialog* dialog; Gtk::Dialog* dialog;
Gtk::Entry* renameText; Gtk::Entry* renameText;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "renameDialog"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "renameDialog");
x->get_widget("renameDialog", dialog); x->get_widget("renameDialog", dialog);
x->get_widget("renameText", renameText); x->get_widget("renameText", renameText);

View File

@ -30,7 +30,7 @@ class ChannelWidget;
class DeviceWidget : public MinimalStreamWidget { class DeviceWidget : public MinimalStreamWidget {
public: public:
DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); DeviceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
void init(MainWindow* mainWindow, Glib::ustring); void init(MainWindow* mainWindow, Glib::ustring);
void setChannelMap(const pa_channel_map &m, bool can_decibel); void setChannelMap(const pa_channel_map &m, bool can_decibel);

View File

@ -66,7 +66,7 @@ struct source_port_prio_compare {
} }
}; };
MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::Window(cobject), Gtk::Window(cobject),
showSinkInputType(SINK_INPUT_CLIENT), showSinkInputType(SINK_INPUT_CLIENT),
showSinkType(SINK_ALL), showSinkType(SINK_ALL),
@ -139,7 +139,12 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
MainWindow* MainWindow::create() { MainWindow* MainWindow::create() {
MainWindow* w; MainWindow* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "mainWindow"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create();
x->add_from_file(GLADE_FILE, "liststore1");
x->add_from_file(GLADE_FILE, "liststore2");
x->add_from_file(GLADE_FILE, "liststore3");
x->add_from_file(GLADE_FILE, "liststore4");
x->add_from_file(GLADE_FILE, "mainWindow");
x->get_widget_derived("mainWindow", w); x->get_widget_derived("mainWindow", w);
return w; return w;
} }

View File

@ -34,7 +34,7 @@ class RoleWidget;
class MainWindow : public Gtk::Window { class MainWindow : public Gtk::Window {
public: public:
MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static MainWindow* create(); static MainWindow* create();
virtual ~MainWindow(); virtual ~MainWindow();

View File

@ -25,7 +25,7 @@
#include "minimalstreamwidget.h" #include "minimalstreamwidget.h"
/*** MinimalStreamWidget ***/ /*** MinimalStreamWidget ***/
MinimalStreamWidget::MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : MinimalStreamWidget::MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
Gtk::VBox(cobject), Gtk::VBox(cobject),
peakProgressBar(), peakProgressBar(),
lastPeak(0), lastPeak(0),

View File

@ -25,7 +25,7 @@
class MinimalStreamWidget : public Gtk::VBox { class MinimalStreamWidget : public Gtk::VBox {
public: public:
MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); MinimalStreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
Gtk::VBox *channelsVBox; Gtk::VBox *channelsVBox;
Gtk::Label *nameLabel, *boldNameLabel; Gtk::Label *nameLabel, *boldNameLabel;

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,6 @@
#include <libintl.h> #include <libintl.h>
#include <gtkmm.h> #include <gtkmm.h>
#include <libglademm.h>
#include <pulse/pulseaudio.h> #include <pulse/pulseaudio.h>

View File

@ -28,7 +28,7 @@
#include "i18n.h" #include "i18n.h"
RoleWidget::RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : RoleWidget::RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
StreamWidget(cobject, x) { StreamWidget(cobject, x) {
lockToggleButton->hide(); lockToggleButton->hide();
@ -38,7 +38,7 @@ RoleWidget::RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
RoleWidget* RoleWidget::create() { RoleWidget* RoleWidget::create() {
RoleWidget* w; RoleWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "streamWidget"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w); x->get_widget_derived("streamWidget", w);
return w; return w;
} }

View File

@ -27,7 +27,7 @@
class RoleWidget : public StreamWidget { class RoleWidget : public StreamWidget {
public: public:
RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static RoleWidget* create(); static RoleWidget* create();
Glib::ustring role; Glib::ustring role;

View File

@ -28,7 +28,7 @@
#include "i18n.h" #include "i18n.h"
SinkInputWidget::SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : SinkInputWidget::SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
StreamWidget(cobject, x) { StreamWidget(cobject, x) {
gchar *txt; gchar *txt;
@ -40,7 +40,7 @@ SinkInputWidget::SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gno
SinkInputWidget* SinkInputWidget::create(MainWindow* mainWindow) { SinkInputWidget* SinkInputWidget::create(MainWindow* mainWindow) {
SinkInputWidget* w; SinkInputWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "streamWidget"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w); x->get_widget_derived("streamWidget", w);
w->init(mainWindow); w->init(mainWindow);
return w; return w;

View File

@ -29,7 +29,7 @@ class MainWindow;
class SinkInputWidget : public StreamWidget { class SinkInputWidget : public StreamWidget {
public: public:
SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static SinkInputWidget* create(MainWindow* mainWindow); static SinkInputWidget* create(MainWindow* mainWindow);
~SinkInputWidget(void); ~SinkInputWidget(void);

View File

@ -28,13 +28,13 @@
#include "i18n.h" #include "i18n.h"
SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
DeviceWidget(cobject, x) { DeviceWidget(cobject, x) {
} }
SinkWidget* SinkWidget::create(MainWindow* mainWindow) { SinkWidget* SinkWidget::create(MainWindow* mainWindow) {
SinkWidget* w; SinkWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "deviceWidget"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget");
x->get_widget_derived("deviceWidget", w); x->get_widget_derived("deviceWidget", w);
w->init(mainWindow, "sink"); w->init(mainWindow, "sink");
return w; return w;

View File

@ -27,7 +27,7 @@
class SinkWidget : public DeviceWidget { class SinkWidget : public DeviceWidget {
public: public:
SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static SinkWidget* create(MainWindow* mainWindow); static SinkWidget* create(MainWindow* mainWindow);
SinkType type; SinkType type;

View File

@ -28,7 +28,7 @@
#include "i18n.h" #include "i18n.h"
SourceOutputWidget::SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : SourceOutputWidget::SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
StreamWidget(cobject, x) { StreamWidget(cobject, x) {
gchar *txt; gchar *txt;
@ -44,7 +44,7 @@ SourceOutputWidget::SourceOutputWidget(BaseObjectType* cobject, const Glib::RefP
SourceOutputWidget* SourceOutputWidget::create(MainWindow* mainWindow) { SourceOutputWidget* SourceOutputWidget::create(MainWindow* mainWindow) {
SourceOutputWidget* w; SourceOutputWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "streamWidget"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "streamWidget");
x->get_widget_derived("streamWidget", w); x->get_widget_derived("streamWidget", w);
w->init(mainWindow); w->init(mainWindow);
return w; return w;

View File

@ -29,7 +29,7 @@ class MainWindow;
class SourceOutputWidget : public StreamWidget { class SourceOutputWidget : public StreamWidget {
public: public:
SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); SourceOutputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static SourceOutputWidget* create(MainWindow* mainWindow); static SourceOutputWidget* create(MainWindow* mainWindow);
~SourceOutputWidget(void); ~SourceOutputWidget(void);

View File

@ -26,13 +26,13 @@
#include "i18n.h" #include "i18n.h"
SourceWidget::SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : SourceWidget::SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
DeviceWidget(cobject, x) { DeviceWidget(cobject, x) {
} }
SourceWidget* SourceWidget::create(MainWindow* mainWindow) { SourceWidget* SourceWidget::create(MainWindow* mainWindow) {
SourceWidget* w; SourceWidget* w;
Glib::RefPtr<Gnome::Glade::Xml> x = Gnome::Glade::Xml::create(GLADE_FILE, "deviceWidget"); Glib::RefPtr<Gtk::Builder> x = Gtk::Builder::create_from_file(GLADE_FILE, "deviceWidget");
x->get_widget_derived("deviceWidget", w); x->get_widget_derived("deviceWidget", w);
w->init(mainWindow, "source"); w->init(mainWindow, "source");
return w; return w;

View File

@ -27,7 +27,7 @@
class SourceWidget : public DeviceWidget { class SourceWidget : public DeviceWidget {
public: public:
SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); SourceWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
static SourceWidget* create(MainWindow* mainWindow); static SourceWidget* create(MainWindow* mainWindow);
SourceType type; SourceType type;

View File

@ -29,7 +29,7 @@
#include "i18n.h" #include "i18n.h"
/*** StreamWidget ***/ /*** StreamWidget ***/
StreamWidget::StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) : StreamWidget::StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x) :
MinimalStreamWidget(cobject, x), MinimalStreamWidget(cobject, x),
peak(NULL), peak(NULL),
mpMainWindow(NULL) { mpMainWindow(NULL) {

View File

@ -30,7 +30,7 @@ class ChannelWidget;
class StreamWidget : public MinimalStreamWidget { class StreamWidget : public MinimalStreamWidget {
public: public:
StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x); StreamWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& x);
void init(MainWindow* mainWindow); void init(MainWindow* mainWindow);
void setChannelMap(const pa_channel_map &m, bool can_decibel); void setChannelMap(const pa_channel_map &m, bool can_decibel);