From cbe721af1a9c84169cec5e58ffbd71367bb8199b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Dec 2010 03:59:18 +0000 Subject: Simplify LashClient. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2694 a436a847-0d15-0410-975c-d299462d15a1 --- src/LashClient.cpp | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'src/LashClient.cpp') diff --git a/src/LashClient.cpp b/src/LashClient.cpp index c41fef6..a7dd4ae 100644 --- a/src/LashClient.cpp +++ b/src/LashClient.cpp @@ -1,5 +1,5 @@ -// -*- Mode: C++ ; indent-tabs-mode: t -*- /* This file is part of Patchage. + * Copyright (C) 2008-2010 David Robillard * Copyright (C) 2008 Nedko Arnaudov * * Patchage is free software; you can redistribute it and/or modify it under the @@ -22,31 +22,25 @@ using namespace std; struct LashClientImpl { - LashProxy* proxy; - Project* project; - string id; - string name; + Project* project; + string id; + string name; }; LashClient::LashClient( - LashProxy* proxy, - Project* project, + Project* project, const string& id, const string& name) { - _impl = new LashClientImpl; - _impl->proxy = proxy; + _impl = new LashClientImpl(); _impl->project = project; - _impl->id = id; - _impl->name = name; - - //g_app->info_msg("client created"); + _impl->id = id; + _impl->name = name; } LashClient::~LashClient() { delete _impl; - //g_app->info_msg("client destroyed"); } Project* @@ -68,16 +62,10 @@ LashClient::get_name() const } void -LashClient::do_rename(const string& name) +LashClient::set_name(const string& name) { if (_impl->name != name) { - //_impl->proxy->client_rename(_impl->id, name); + _impl->name = name; + _signal_renamed.emit(); } } - -void -LashClient::on_name_changed(const string& name) -{ - _impl->name = name; - _signal_renamed.emit(); -} -- cgit v1.2.1