summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/MainWindow.cc10
-rw-r--r--src/MainWindow.hh4
-rw-r--r--src/ServerInfoManager.cc7
-rw-r--r--src/paman.glade238
4 files changed, 209 insertions, 50 deletions
diff --git a/src/MainWindow.cc b/src/MainWindow.cc
index 7ae0987..67dfe37 100644
--- a/src/MainWindow.cc
+++ b/src/MainWindow.cc
@@ -27,6 +27,8 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
linkLibraryVersionLabel(NULL),
compiledLibraryVersionLabel(NULL),
titleLabel(NULL),
+ defaultSinkLabel(NULL),
+ defaultSourceLabel(NULL),
deviceOpenButton(NULL),
clientOpenButton(NULL),
moduleOpenButton(NULL),
@@ -49,6 +51,8 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
refGlade->get_widget("hostNameLabel", hostNameLabel);
refGlade->get_widget("userNameLabel", userNameLabel);
refGlade->get_widget("titleLabel", titleLabel);
+ refGlade->get_widget("defaultSinkLabel", defaultSinkLabel);
+ refGlade->get_widget("defaultSourceLabel", defaultSourceLabel);
refGlade->get_widget("deviceTreeView", deviceTreeView);
refGlade->get_widget("clientTreeView", clientTreeView);
refGlade->get_widget("moduleTreeView", moduleTreeView);
@@ -109,7 +113,7 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
clearAllData();
- Gdk::Color c("black");
+ Gdk::Color c("white");
titleEventBox->modify_bg(Gtk::STATE_NORMAL, c);
}
@@ -342,6 +346,8 @@ void MainWindow::updateInfo(const struct pa_server_info &i) {
defaultSampleTypeLabel->set_text(t);
hostNameLabel->set_text(i.host_name);
userNameLabel->set_text(i.user_name);
+ defaultSinkLabel->set_markup(*i.default_sink_name ? i.default_sink_name : "<i>not set</i>");
+ defaultSourceLabel->set_markup(*i.default_source_name ? i.default_source_name: "<i>not set</i>");
}
void MainWindow::showSuccess(const char *t) {
@@ -386,6 +392,8 @@ void MainWindow::clearAllData() {
defaultSampleTypeLabel->set_markup("<i>n/a</i>");
hostNameLabel->set_markup("<i>n/a</i>");
userNameLabel->set_markup("<i>n/a</i>");
+ defaultSinkLabel->set_markup("<i>n/a</i>");
+ defaultSourceLabel->set_markup("<i>n/a</i>");
}
void MainWindow::onDeviceOpenButton() {
diff --git a/src/MainWindow.hh b/src/MainWindow.hh
index 4ddf403..211a011 100644
--- a/src/MainWindow.hh
+++ b/src/MainWindow.hh
@@ -23,7 +23,9 @@ public:
*hostNameLabel,
*linkLibraryVersionLabel,
*compiledLibraryVersionLabel,
- *titleLabel;
+ *titleLabel,
+ *defaultSinkLabel,
+ *defaultSourceLabel;
Gtk::Button *deviceOpenButton,
*clientOpenButton,
diff --git a/src/ServerInfoManager.cc b/src/ServerInfoManager.cc
index be934f8..a21033e 100644
--- a/src/ServerInfoManager.cc
+++ b/src/ServerInfoManager.cc
@@ -388,6 +388,10 @@ static void subscribe_callback(struct pa_context *c, enum pa_subscription_event_
else
pa_operation_unref(pa_context_get_sample_info_by_index(c, index, sample_info_callback, si));
break;
+ case PA_SUBSCRIPTION_EVENT_SERVER:
+ pa_operation_unref(pa_context_get_server_info(c, server_info_callback, si));
+ break;
+
default:
fprintf(stderr, "OTHER EVENT\n");
break;
@@ -415,7 +419,8 @@ ServerInfoManager::ServerInfoManager(struct pa_context &c) :
PA_SUBSCRIPTION_MASK_SINK_INPUT|
PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT|
PA_SUBSCRIPTION_MASK_CLIENT|
- PA_SUBSCRIPTION_MASK_SAMPLE_CACHE), NULL, NULL));
+ PA_SUBSCRIPTION_MASK_SAMPLE_CACHE|
+ PA_SUBSCRIPTION_MASK_SERVER), NULL, NULL));
}
diff --git a/src/paman.glade b/src/paman.glade
index 958e6e5..c58603b 100644
--- a/src/paman.glade
+++ b/src/paman.glade
@@ -32,18 +32,53 @@
<property name="above_child">False</property>
<child>
- <widget class="GtkLabel" id="titleLabel">
+ <widget class="GtkVBox" id="vbox22">
+ <property name="border_width">12</property>
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span size=&quot;26000&quot; color=&quot;white&quot; font_family=&quot;serif&quot;&gt;&lt;b&gt;Polypaudio Manager&lt;/b&gt;&lt;/span&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</property>
- <property name="ypad">12</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="titleLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;span size=&quot;18000&quot; color=&quot;black&quot;&gt;&lt;b&gt;Polypaudio Manager&lt;/b&gt;&lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4825">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Use this application to view and modify the Polypaudio Sound Daemon's internals</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
@@ -55,6 +90,17 @@
</child>
<child>
+ <widget class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkVBox" id="vbox20">
<property name="border_width">12</property>
<property name="visible">True</property>
@@ -93,7 +139,7 @@
<child>
<widget class="GtkTable" id="table3">
<property name="visible">True</property>
- <property name="n_rows">9</property>
+ <property name="n_rows">11</property>
<property name="n_columns">3</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
@@ -345,9 +391,33 @@
</child>
<child>
- <widget class="GtkLabel" id="label4794">
+ <widget class="GtkLabel" id="label4790">
<property name="visible">True</property>
- <property name="label" translatable="yes">Linked to Library Version:</property>
+ <property name="label" translatable="yes">&lt;b&gt;Server Information&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_padding">12</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4795">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Compiled with Library Version:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -361,17 +431,17 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label4795">
+ <widget class="GtkLabel" id="label4794">
<property name="visible">True</property>
- <property name="label" translatable="yes">Compiled with Library Version:</property>
+ <property name="label" translatable="yes">Linked to Library Version:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -385,15 +455,15 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="linkLibraryVersionLabel">
+ <widget class="GtkLabel" id="compiledLibraryVersionLabel">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">foo</property>
@@ -410,15 +480,15 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="compiledLibraryVersionLabel">
+ <widget class="GtkLabel" id="linkLibraryVersionLabel">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">foo</property>
@@ -435,15 +505,40 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4791">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Client Information&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">3</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
- <property name="x_options">fill</property>
+ <property name="y_padding">12</property>
+ <property name="x_options">expand|shrink|fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label4792">
+ <widget class="GtkLabel" id="label4820">
<property name="visible">True</property>
<property name="label" translatable="yes"> </property>
<property name="use_underline">False</property>
@@ -459,15 +554,15 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">6</property>
- <property name="x_options"></property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">11</property>
+ <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label4793">
+ <widget class="GtkLabel" id="label4792">
<property name="visible">True</property>
<property name="label" translatable="yes"> </property>
<property name="use_underline">False</property>
@@ -483,58 +578,107 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">8</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label4791">
+ <widget class="GtkLabel" id="defaultSinkLabel">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Client Information&lt;/b&gt;</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">foo</property>
<property name="use_underline">False</property>
- <property name="use_markup">True</property>
+ <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
- <property name="selectable">False</property>
+ <property name="selectable">True</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
+ <property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
- <property name="y_padding">12</property>
- <property name="x_options">expand|shrink|fill</property>
+ <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label4790">
+ <widget class="GtkLabel" id="defaultSourceLabel">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Server Information&lt;/b&gt;</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">foo</property>
<property name="use_underline">False</property>
- <property name="use_markup">True</property>
+ <property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
- <property name="selectable">False</property>
+ <property name="selectable">True</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
+ <property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_padding">12</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4823">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Default Sink:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4824">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Default Source:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>