[SCM] calf/master: Set JACK host's main window title according to JACK client name.

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:40:32 UTC 2013


The following commit has been merged in the master branch:
commit 296f3ce476b12a55e1d57b659aa901ff1688ce7d
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Tue Dec 28 17:31:13 2010 +0000

    Set JACK host's main window title according to JACK client name.

diff --git a/src/calf/gui.h b/src/calf/gui.h
index b090fd2..ea9355c 100644
--- a/src/calf/gui.h
+++ b/src/calf/gui.h
@@ -192,6 +192,7 @@ struct main_window_owner_iface
     virtual char *open_file(const char *name) = 0;
     virtual char *save_file(const char *name) = 0;
     virtual void reorder_plugins() = 0;
+    virtual std::string get_client_name() const = 0;
     virtual ~main_window_owner_iface() {}
 };
 
diff --git a/src/calf/host_session.h b/src/calf/host_session.h
index 1085ebd..5b832c6 100644
--- a/src/calf/host_session.h
+++ b/src/calf/host_session.h
@@ -99,6 +99,9 @@ public:
     
     /// SIGUSR1 handler
     static void sigusr1handler(int signum);
+    
+    /// Client name for window title bar
+    std::string get_client_name() const;
 };
 
 };
diff --git a/src/host_session.cpp b/src/host_session.cpp
index fe75b6f..337023e 100644
--- a/src/host_session.cpp
+++ b/src/host_session.cpp
@@ -510,3 +510,7 @@ void host_session::reorder_plugins()
     client.apply_plugin_order(order);
 }
 
+std::string host_session::get_client_name() const
+{
+    return client.name;
+}
diff --git a/src/main_win.cpp b/src/main_win.cpp
index 866260d..ae72913 100644
--- a/src/main_win.cpp
+++ b/src/main_win.cpp
@@ -484,6 +484,7 @@ std::string main_window::make_plugin_list(GtkActionGroup *actions)
 void main_window::create()
 {
     toplevel = GTK_WINDOW(gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_window_set_title(toplevel, (owner->get_client_name() + " - Calf JACK Host").c_str());
     gtk_widget_set_name(GTK_WIDGET(toplevel), "Calf-Rack");
     gtk_window_set_default_icon_name("calf");
     is_closed = false;

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list