[Spice-devel] [PATCH spice-gtk 2/4] SpiceAudio stream name default to get_application_name()
Christophe Fergeau
cfergeau at redhat.com
Mon Nov 7 00:43:58 PST 2011
On Mon, Nov 07, 2011 at 09:35:27AM +0100, Christophe Fergeau wrote:
> On Sat, Nov 05, 2011 at 05:56:07PM +0100, Marc-André Lureau wrote:
> > ---
> > gtk/spice-audio.c | 9 +++++----
> > 1 files changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/gtk/spice-audio.c b/gtk/spice-audio.c
> > index e991cea..3f4bb80 100644
> > --- a/gtk/spice-audio.c
> > +++ b/gtk/spice-audio.c
> > @@ -64,22 +64,23 @@ static void spice_audio_init(SpiceAudio *self G_GNUC_UNUSED)
> > * spice_audio_new:
> > * @session: the #SpiceSession to connect to
> > * @context: a #GMainContext to attach to (or %NULL for default).
> > - * @name: a name for the audio channels (or %NULL for default).
> > + * @name: a name for the audio channels (or %NULL for application name).
> > *
> > * Once instantiated, #SpiceAudio will handle the playback and record
> > * channels to stream to your local audio system.
> > *
> > * Returns: a new #SpiceAudio instance or %NULL if no backend or failed.
> > + * Deprecated: 0.8: Use spice_audio_get() instead
> > **/
> > SpiceAudio *spice_audio_new(SpiceSession *session, GMainContext *context,
> > - const char *name)
> > + const char *name)
> > {
> > SpiceAudio *audio = NULL;
> >
> > if (context == NULL)
> > - context = g_main_context_default();
> > + context = g_main_context_default();
> > if (name == NULL)
> > - name = "spice";
> > + name = g_get_application_name();
>
> ACK, though this raises the question if this name will be enough when we
> have multiple sessions/processes running different VMs,
Rereading g_get_application_name, I was wondering if g_get_prg_name()
wouldn't be more appropriate here? g_get_application_name is the localized
application name for presentation to the user, g_get_prg_name is an
unlocalized one
Christophe
>
> Christophe
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20111107/c78f4a2c/attachment.pgp>
More information about the Spice-devel
mailing list