Re: [PATCH v2 09/16] app: append VTE consoles to display submenu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Thu, Dec 20, 2018 at 8:43 PM Victor Toso <victortoso@xxxxxxxxxx> wrote:
>
> Hi,
>
> On Wed, Sep 26, 2018 at 07:26:32PM +0400, marcandre.lureau@xxxxxxxxxx wrote:
> > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> >
> > Get the name of the console, and set the subtitle with it.
> >
> > Rename "set_title" to "set_subtitle" while at it, since it is more
> > appropriate.
>
> I'm confused, isn't this the previous patch? :)

indeed

>
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > ---
> >  src/virt-viewer-app.c | 20 ++++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> >
> > diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> > index 7b750c6..568af47 100644
> > --- a/src/virt-viewer-app.c
> > +++ b/src/virt-viewer-app.c
> > @@ -2294,6 +2294,26 @@ window_update_menu_displays_cb(gpointer value,
> >          tmp = tmp->next;
> >      }
> >
> > +    for (GList *l = self->priv->windows; l; l = l->next) {
>
> It would be the first time using this C feature in virt-viewer
> codebase I think. You might use tmp if you don't want to declare
> a new var.

ok

>
> > +        VirtViewerWindow *win = VIRT_VIEWER_WINDOW(l->data);
> > +        VirtViewerDisplay *display = virt_viewer_window_get_display(win);
> > +
> > +        if (VIRT_VIEWER_IS_DISPLAY_VTE(display)) {
> > +            gchar *name = NULL;
> > +            GtkWidget *item;
> > +
> > +            g_object_get(display, "name", &name, NULL);
> > +            item = gtk_check_menu_item_new_with_label(name);
> > +            g_free(name);
> > +
> > +            virt_viewer_signal_connect_object(G_OBJECT(item), "toggled",
> > +                G_CALLBACK(menu_display_visible_toggled_cb), display, 0);
> > +            gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item),
> > +                gtk_widget_get_visible(GTK_WIDGET(virt_viewer_window_get_window(win))));
> > +            gtk_menu_shell_append(submenu, item);
> > +        }
> > +
> > +
>
> Apart from the rename bit on commit log,
> Acked-by: Victor Toso <victortoso@xxxxxxxxxx>
>
> >      gtk_widget_show_all(GTK_WIDGET(submenu));
> >      g_list_free(keys);
> >  }
> > --
> > 2.19.0.271.gfe8321ec05
> >

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux