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_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_LIBS)

View File

@ -27,7 +27,7 @@
#include "i18n.h"
/*** 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) {
x->get_widget("nameLabel", nameLabel);
@ -43,7 +43,7 @@ CardWidget::CardWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
CardWidget* CardWidget::create() {
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);
return w;
}

View File

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

View File

@ -31,7 +31,7 @@ static bool show_decibel = true;
/*** 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),
volumeScaleEnabled(true) {
@ -47,7 +47,9 @@ ChannelWidget::ChannelWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
ChannelWidget* ChannelWidget::create() {
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);
return w;
}

View File

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

View File

@ -31,7 +31,7 @@
#include "i18n.h"
/*** 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) {
x->get_widget("lockToggleButton", lockToggleButton);
@ -197,7 +197,7 @@ void DeviceWidget::renamePopup() {
Gtk::Dialog* dialog;
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("renameText", renameText);

View File

@ -30,7 +30,7 @@ class ChannelWidget;
class DeviceWidget : public MinimalStreamWidget {
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 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),
showSinkInputType(SINK_INPUT_CLIENT),
showSinkType(SINK_ALL),
@ -139,7 +139,12 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
MainWindow* MainWindow::create() {
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);
return w;
}

View File

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

View File

@ -25,7 +25,7 @@
#include "minimalstreamwidget.h"
/*** 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),
peakProgressBar(),
lastPeak(0),

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -28,7 +28,7 @@
#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) {
lockToggleButton->hide();
@ -38,7 +38,7 @@ RoleWidget::RoleWidget(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
RoleWidget* RoleWidget::create() {
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);
return w;
}

View File

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

View File

@ -28,7 +28,7 @@
#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) {
gchar *txt;
@ -40,7 +40,7 @@ SinkInputWidget::SinkInputWidget(BaseObjectType* cobject, const Glib::RefPtr<Gno
SinkInputWidget* SinkInputWidget::create(MainWindow* mainWindow) {
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);
w->init(mainWindow);
return w;

View File

@ -29,7 +29,7 @@ class MainWindow;
class SinkInputWidget : public StreamWidget {
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);
~SinkInputWidget(void);

View File

@ -28,13 +28,13 @@
#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) {
}
SinkWidget* SinkWidget::create(MainWindow* mainWindow) {
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);
w->init(mainWindow, "sink");
return w;

View File

@ -27,7 +27,7 @@
class SinkWidget : public DeviceWidget {
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);
SinkType type;

View File

@ -28,7 +28,7 @@
#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) {
gchar *txt;
@ -44,7 +44,7 @@ SourceOutputWidget::SourceOutputWidget(BaseObjectType* cobject, const Glib::RefP
SourceOutputWidget* SourceOutputWidget::create(MainWindow* mainWindow) {
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);
w->init(mainWindow);
return w;

View File

@ -29,7 +29,7 @@ class MainWindow;
class SourceOutputWidget : public StreamWidget {
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);
~SourceOutputWidget(void);

View File

@ -26,13 +26,13 @@
#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) {
}
SourceWidget* SourceWidget::create(MainWindow* mainWindow) {
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);
w->init(mainWindow, "source");
return w;

View File

@ -27,7 +27,7 @@
class SourceWidget : public DeviceWidget {
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);
SourceType type;

View File

@ -29,7 +29,7 @@
#include "i18n.h"
/*** 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),
peak(NULL),
mpMainWindow(NULL) {

View File

@ -30,7 +30,7 @@ class ChannelWidget;
class StreamWidget : public MinimalStreamWidget {
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 setChannelMap(const pa_channel_map &m, bool can_decibel);