[virt-tools-list] [PATCH 4/4] Port to GtkApplicationWindow API's

Jonathon Jongsma jjongsma at redhat.com
Tue Dec 1 17:17:47 UTC 2015


Hmm, I don't quite understand most of these changes. 

Why are you removing the window from the xml file instead of just changing the
'class' attribute to GtkApplicationWindow? (Of course, we can't set the
'application' property of the window inside of the builder file, so we still
have to set that by continuing to call gtk_application_add_window() or setting
the GtkWindow::application property on the retrieved window object). 

Also, I don't quite understand why the code had to be moved from _init to
_constructed. Can you expand on that?

Jonathon

On Fri, 2015-11-27 at 17:24 -0200, Eduardo Lima (Etrunko) wrote:
> As a follow up to the previous patch, this has lots of code shuffled
> around to make it work with the new flow. Also, there is no need to have
> a GtkWindow in virt-viewer.xml file anymore.
> 
> Because of that, you may get the following warning message:
> 
> Gtk-CRITICAL **: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW
> (window)' failed
> 
> This happens because GtkAccelGroup is defined in virt-viewer.xml, but
> no GtkWindow to be associated with it anymore. The warning is harmless,
> and can be ignored. This should go away by the moment we start using
> GMenuModel for the menus instead of GtkMenuBar, in a following patch.
> 
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> ---
>  src/virt-viewer-app.c    |   1 -
>  src/virt-viewer-window.c |  57 ++++---
>  src/virt-viewer.xml      | 416 +++++++++++++++++++++++-----------------------
> -
>  3 files changed, 234 insertions(+), 240 deletions(-)
> 
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index adabb27..cc8364c 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -931,7 +931,6 @@ virt_viewer_app_window_new(VirtViewerApp *self, gint nth)
>          app_window_try_fullscreen(self, window, nth);
>  
>      w = virt_viewer_window_get_window(window);
> -    gtk_application_add_window(GTK_APPLICATION(self), w);
>      g_signal_connect(w, "hide", G_CALLBACK(viewer_window_visible_cb), self);
>      g_signal_connect(w, "show", G_CALLBACK(viewer_window_visible_cb), self);
>      g_signal_connect(w, "focus-in-event",
> G_CALLBACK(viewer_window_focus_in_cb), self);
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index 3a958f0..6b2a66e 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -219,11 +219,40 @@ rebuild_combo_menu(GObject    *gobject G_GNUC_UNUSED,
>  static void
>  virt_viewer_window_constructed(GObject *object)
>  {
> -    VirtViewerWindowPrivate *priv = VIRT_VIEWER_WINDOW(object)->priv;
> +    VirtViewerWindow *self = VIRT_VIEWER_WINDOW(object);
> +    VirtViewerWindowPrivate *priv = self->priv;
> +    GtkWidget *vbox;
> +    GdkColor color;
> +    GSList *accels;
>  
>      if (G_OBJECT_CLASS(virt_viewer_window_parent_class)->constructed)
>          G_OBJECT_CLASS(virt_viewer_window_parent_class)->constructed(object);
>  
> +    priv->window = gtk_application_window_new(GTK_APPLICATION(priv->app));
> +    g_signal_connect(priv->window, "delete-event",
> +                     G_CALLBACK(virt_viewer_window_delete), self);
> +    gtk_window_add_accel_group(GTK_WINDOW(priv->window), priv->accel_group);
> +
> +    vbox = GTK_WIDGET(gtk_builder_get_object(priv->builder, "viewer-box"));
> +    gtk_container_add(GTK_CONTAINER(priv->window), vbox);
> +    virt_viewer_window_toolbar_setup(self);
> +
> +    gtk_box_pack_end(GTK_BOX(vbox), priv->layout, TRUE, TRUE, 0);
> +    gdk_color_parse("black", &color);
> +    gtk_widget_modify_bg(priv->layout, GTK_STATE_NORMAL, &color);
> +    virt_viewer_window_update_title(self);
> +    gtk_window_set_resizable(GTK_WINDOW(priv->window), TRUE);
> +    gtk_window_set_has_resize_grip(GTK_WINDOW(priv->window), FALSE);
> +    priv->accel_enabled = TRUE;
> +
> +    accels = gtk_accel_groups_from_object(G_OBJECT(priv->window));
> +    for ( ; accels ; accels = accels->next) {
> +        priv->accel_list = g_slist_append(priv->accel_list, accels->data);
> +        g_object_ref(G_OBJECT(accels->data));
> +    }
> +
> +    priv->zoomlevel = NORMAL_ZOOM_LEVEL;
> +
>      g_signal_connect(priv->app, "notify::enable-accel",
>                       G_CALLBACK(rebuild_combo_menu), object);
>      rebuild_combo_menu(NULL, NULL, object);
> @@ -293,9 +322,6 @@ static void
>  virt_viewer_window_init (VirtViewerWindow *self)
>  {
>      VirtViewerWindowPrivate *priv;
> -    GtkWidget *vbox;
> -    GdkColor color;
> -    GSList *accels;
>  
>      self->priv = GET_PRIVATE(self);
>      priv = self->priv;
> @@ -330,29 +356,6 @@ virt_viewer_window_init (VirtViewerWindow *self)
>                       "can-activate-accel", G_CALLBACK(can_activate_cb),
> self);
>      g_signal_connect(gtk_builder_get_object(priv->builder, "menu-view-zoom
> -out"),
>                       "can-activate-accel", G_CALLBACK(can_activate_cb),
> self);
> -
> -    vbox = GTK_WIDGET(gtk_builder_get_object(priv->builder, "viewer-box"));
> -    virt_viewer_window_toolbar_setup(self);
> -
> -    gtk_box_pack_end(GTK_BOX(vbox), priv->layout, TRUE, TRUE, 0);
> -    gdk_color_parse("black", &color);
> -    gtk_widget_modify_bg(priv->layout, GTK_STATE_NORMAL, &color);
> -
> -    priv->window = GTK_WIDGET(gtk_builder_get_object(priv->builder,
> "viewer"));
> -    gtk_window_add_accel_group(GTK_WINDOW(priv->window), priv->accel_group);
> -
> -    virt_viewer_window_update_title(self);
> -    gtk_window_set_resizable(GTK_WINDOW(priv->window), TRUE);
> -    gtk_window_set_has_resize_grip(GTK_WINDOW(priv->window), FALSE);
> -    priv->accel_enabled = TRUE;
> -
> -    accels = gtk_accel_groups_from_object(G_OBJECT(priv->window));
> -    for ( ; accels ; accels = accels->next) {
> -        priv->accel_list = g_slist_append(priv->accel_list, accels->data);
> -        g_object_ref(G_OBJECT(accels->data));
> -    }
> -
> -    priv->zoomlevel = NORMAL_ZOOM_LEVEL;
>  }
>  
>  static void
> diff --git a/src/virt-viewer.xml b/src/virt-viewer.xml
> index 07948bd..f2b7986 100644
> --- a/src/virt-viewer.xml
> +++ b/src/virt-viewer.xml
> @@ -2,260 +2,252 @@
>  <interface>
>    <!-- interface-requires gtk+ 2.6 -->
>    <object class="GtkAccelGroup" id="accelgroup"/>
> -  <object class="GtkWindow" id="viewer">
> +  <object class="GtkVBox" id="viewer-box">
> +    <property name="visible">True</property>
>      <property name="can_focus">False</property>
> -    <property name="default_width">1024</property>
> -    <property name="default_height">768</property>
> -    <signal name="delete-event" handler="virt_viewer_window_delete"
> swapped="no"/>
>      <child>
> -      <object class="GtkVBox" id="viewer-box">
> +      <object class="GtkMenuBar" id="top-menu">
>          <property name="visible">True</property>
>          <property name="can_focus">False</property>
>          <child>
> -          <object class="GtkMenuBar" id="top-menu">
> +          <object class="GtkMenuItem" id="menu-file">
>              <property name="visible">True</property>
>              <property name="can_focus">False</property>
> -            <child>
> -              <object class="GtkMenuItem" id="menu-file">
> +            <property name="use_action_appearance">False</property>
> +            <property name="label" translatable="yes">_File</property>
> +            <property name="use_underline">True</property>
> +            <child type="submenu">
> +              <object class="GtkMenu" id="menu1">
>                  <property name="visible">True</property>
>                  <property name="can_focus">False</property>
> -                <property name="use_action_appearance">False</property>
> -                <property name="label" translatable="yes">_File</property>
> -                <property name="use_underline">True</property>
> -                <child type="submenu">
> -                  <object class="GtkMenu" id="menu1">
> +                <property name="accel_group">accelgroup</property>
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-file-screenshot">
>                      <property name="visible">True</property>
>                      <property name="can_focus">False</property>
> -                    <property name="accel_group">accelgroup</property>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-file-screenshot">
> -                        <property name="visible">True</property>
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="label"
> translatable="yes">Screenshot</property>
> -                        <property name="use_underline">True</property>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_file_screenshot" swapped="no"/>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-file-usb-device
> -selection">
> -                        <property name="visible">True</property>
> -                        <property name="sensitive">False</property>
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="label" translatable="yes">USB device
> selection</property>
> -                        <property name="use_underline">True</property>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_file_usb_device_selection" swapped="no"/>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-file-smartcard
> -insert">
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="accel_path"><virt
> -viewer>/file/smartcard-insert</property>
> -                        <property name="label" translatable="yes">Smartcard
> insertion</property>
> -                        <property name="use_underline">True</property>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_file_smartcard_insert" swapped="no"/>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-file-smartcard
> -remove">
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="accel_path"><virt
> -viewer>/file/smartcard-remove</property>
> -                        <property name="label" translatable="yes">Smartcard
> removal</property>
> -                        <property name="use_underline">True</property>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_file_smartcard_remove" swapped="no"/>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-preferences">
> -                        <property name="visible">True</property>
> -                        <property name="can_focus">False</property>
> -                        <property name="label"
> translatable="yes">Preferences</property>
> -                        <property name="use_underline">True</property>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_preferences_cb" swapped="no"/>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkSeparatorMenuItem"
> id="separatormenuitem1">
> -                        <property name="visible">True</property>
> -                        <property name="can_focus">False</property>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkImageMenuItem" id="imagemenuitem5">
> -                        <property name="label">gtk-quit</property>
> -                        <property name="visible">True</property>
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="use_underline">True</property>
> -                        <property name="use_stock">True</property>
> -                        <accelerator key="q" signal="activate"
> modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_file_quit" swapped="no"/>
> -                      </object>
> -                    </child>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="label"
> translatable="yes">Screenshot</property>
> +                    <property name="use_underline">True</property>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_file_screenshot" swapped="no"/>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-file-usb-device
> -selection">
> +                    <property name="visible">True</property>
> +                    <property name="sensitive">False</property>
> +                    <property name="can_focus">False</property>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="label" translatable="yes">USB device
> selection</property>
> +                    <property name="use_underline">True</property>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_file_usb_device_selection" swapped="no"/>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-file-smartcard
> -insert">
> +                    <property name="can_focus">False</property>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="accel_path"><virt
> -viewer>/file/smartcard-insert</property>
> +                    <property name="label" translatable="yes">Smartcard
> insertion</property>
> +                    <property name="use_underline">True</property>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_file_smartcard_insert" swapped="no"/>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-file-smartcard
> -remove">
> +                    <property name="can_focus">False</property>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="accel_path"><virt
> -viewer>/file/smartcard-remove</property>
> +                    <property name="label" translatable="yes">Smartcard
> removal</property>
> +                    <property name="use_underline">True</property>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_file_smartcard_remove" swapped="no"/>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-preferences">
> +                    <property name="visible">True</property>
> +                    <property name="can_focus">False</property>
> +                    <property name="label"
> translatable="yes">Preferences</property>
> +                    <property name="use_underline">True</property>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_preferences_cb" swapped="no"/>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkSeparatorMenuItem"
> id="separatormenuitem1">
> +                    <property name="visible">True</property>
> +                    <property name="can_focus">False</property>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkImageMenuItem" id="imagemenuitem5">
> +                    <property name="label">gtk-quit</property>
> +                    <property name="visible">True</property>
> +                    <property name="can_focus">False</property>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="use_underline">True</property>
> +                    <property name="use_stock">True</property>
> +                    <accelerator key="q" signal="activate"
> modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_file_quit" swapped="no"/>
>                    </object>
>                  </child>
>                </object>
>              </child>
> -            <child>
> -              <object class="GtkMenuItem" id="menu-view">
> +          </object>
> +        </child>
> +        <child>
> +          <object class="GtkMenuItem" id="menu-view">
> +            <property name="visible">True</property>
> +            <property name="can_focus">False</property>
> +            <property name="use_action_appearance">False</property>
> +            <property name="label" translatable="yes">_View</property>
> +            <property name="use_underline">True</property>
> +            <child type="submenu">
> +              <object class="GtkMenu" id="menu2">
>                  <property name="visible">True</property>
>                  <property name="can_focus">False</property>
> -                <property name="use_action_appearance">False</property>
> -                <property name="label" translatable="yes">_View</property>
> -                <property name="use_underline">True</property>
> -                <child type="submenu">
> -                  <object class="GtkMenu" id="menu2">
> +                <property name="accel_group">accelgroup</property>
> +                <child>
> +                  <object class="GtkCheckMenuItem" id="menu-view-fullscreen">
>                      <property name="visible">True</property>
>                      <property name="can_focus">False</property>
> -                    <property name="accel_group">accelgroup</property>
> -                    <child>
> -                      <object class="GtkCheckMenuItem" id="menu-view
> -fullscreen">
> -                        <property name="visible">True</property>
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="accel_path"><virt
> -viewer>/view/toggle-fullscreen</property>
> -                        <property name="label" translatable="yes">Full
> screen</property>
> -                        <property name="use_underline">True</property>
> -                        <signal name="toggled"
> handler="virt_viewer_window_menu_view_fullscreen" swapped="no"/>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-view-zoom">
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="accel_path"><virt
> -viewer>/view/toggle-fullscreen</property>
> +                    <property name="label" translatable="yes">Full
> screen</property>
> +                    <property name="use_underline">True</property>
> +                    <signal name="toggled"
> handler="virt_viewer_window_menu_view_fullscreen" swapped="no"/>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-view-zoom">
> +                    <property name="visible">True</property>
> +                    <property name="can_focus">False</property>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="label"
> translatable="yes">_Zoom</property>
> +                    <property name="use_underline">True</property>
> +                    <child type="submenu">
> +                      <object class="GtkMenu" id="menu4">
>                          <property name="visible">True</property>
>                          <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="label"
> translatable="yes">_Zoom</property>
> -                        <property name="use_underline">True</property>
> -                        <child type="submenu">
> -                          <object class="GtkMenu" id="menu4">
> +                        <property name="accel_group">accelgroup</property>
> +                        <child>
> +                          <object class="GtkImageMenuItem" id="menu-view-zoom
> -in">
> +                            <property name="accel_path"><virt
> -viewer>/view/zoom-in</property>
> +                            <property name="label">gtk-zoom-in</property>
>                              <property name="visible">True</property>
>                              <property name="can_focus">False</property>
> -                            <property
> name="accel_group">accelgroup</property>
> -                            <child>
> -                              <object class="GtkImageMenuItem" id="menu-view
> -zoom-in">
> -                                <property name="accel_path"><virt
> -viewer>/view/zoom-in</property>
> -                                <property name="label">gtk-zoom-in</property>
> -                                <property name="visible">True</property>
> -                                <property name="can_focus">False</property>
> -                                <property
> name="use_action_appearance">False</property>
> -                                <property
> name="use_underline">True</property>
> -                                <property name="use_stock">True</property>
> -                                <signal name="activate"
> handler="virt_viewer_window_menu_view_zoom_in" swapped="no"/>
> -                              </object>
> -                            </child>
> -                            <child>
> -                              <object class="GtkImageMenuItem" id="menu-view
> -zoom-out">
> -                                <property name="accel_path"><virt
> -viewer>/view/zoom-out</property>
> -                                <property name="label">gtk-zoom
> -out</property>
> -                                <property name="visible">True</property>
> -                                <property name="can_focus">False</property>
> -                                <property
> name="use_action_appearance">False</property>
> -                                <property
> name="use_underline">True</property>
> -                                <property name="use_stock">True</property>
> -                                <signal name="activate"
> handler="virt_viewer_window_menu_view_zoom_out" swapped="no"/>
> -                              </object>
> -                            </child>
> -                            <child>
> -                              <object class="GtkSeparatorMenuItem"
> id="separatormenuitem4">
> -                                <property name="visible">True</property>
> -                                <property name="can_focus">False</property>
> -                              </object>
> -                            </child>
> -                            <child>
> -                              <object class="GtkImageMenuItem" id="menu-view
> -zoom-reset">
> -                                <property name="accel_path"><virt
> -viewer>/view/zoom-reset</property>
> -                                <property name="label">gtk-zoom
> -100</property>
> -                                <property name="visible">True</property>
> -                                <property name="can_focus">False</property>
> -                                <property
> name="use_action_appearance">False</property>
> -                                <property
> name="use_underline">True</property>
> -                                <property name="use_stock">True</property>
> -                                <signal name="activate"
> handler="virt_viewer_window_menu_view_zoom_reset" swapped="no"/>
> -                              </object>
> -                            </child>
> +                            <property
> name="use_action_appearance">False</property>
> +                            <property name="use_underline">True</property>
> +                            <property name="use_stock">True</property>
> +                            <signal name="activate"
> handler="virt_viewer_window_menu_view_zoom_in" swapped="no"/>
> +                          </object>
> +                        </child>
> +                        <child>
> +                          <object class="GtkImageMenuItem" id="menu-view-zoom
> -out">
> +                            <property name="accel_path"><virt
> -viewer>/view/zoom-out</property>
> +                            <property name="label">gtk-zoom-out</property>
> +                            <property name="visible">True</property>
> +                            <property name="can_focus">False</property>
> +                            <property
> name="use_action_appearance">False</property>
> +                            <property name="use_underline">True</property>
> +                            <property name="use_stock">True</property>
> +                            <signal name="activate"
> handler="virt_viewer_window_menu_view_zoom_out" swapped="no"/>
> +                          </object>
> +                        </child>
> +                        <child>
> +                          <object class="GtkSeparatorMenuItem"
> id="separatormenuitem4">
> +                            <property name="visible">True</property>
> +                            <property name="can_focus">False</property>
> +                          </object>
> +                        </child>
> +                        <child>
> +                          <object class="GtkImageMenuItem" id="menu-view-zoom
> -reset">
> +                            <property name="accel_path"><virt
> -viewer>/view/zoom-reset</property>
> +                            <property name="label">gtk-zoom-100</property>
> +                            <property name="visible">True</property>
> +                            <property name="can_focus">False</property>
> +                            <property
> name="use_action_appearance">False</property>
> +                            <property name="use_underline">True</property>
> +                            <property name="use_stock">True</property>
> +                            <signal name="activate"
> handler="virt_viewer_window_menu_view_zoom_reset" swapped="no"/>
>                            </object>
>                          </child>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-displays">
> -                        <property name="visible">True</property>
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="label"
> translatable="yes">Displays</property>
> -                        <property name="use_underline">True</property>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-view-release
> -cursor">
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="accel_path"><virt
> -viewer>/view/release-cursor</property>
> -                        <property name="label" translatable="yes">Release
> cursor</property>
> -                        <property name="use_underline">True</property>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_view_release_cursor" swapped="no"/>
>                        </object>
>                      </child>
>                    </object>
>                  </child>
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-displays">
> +                    <property name="visible">True</property>
> +                    <property name="can_focus">False</property>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="label"
> translatable="yes">Displays</property>
> +                    <property name="use_underline">True</property>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-view-release-cursor">
> +                    <property name="can_focus">False</property>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="accel_path"><virt
> -viewer>/view/release-cursor</property>
> +                    <property name="label" translatable="yes">Release
> cursor</property>
> +                    <property name="use_underline">True</property>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_view_release_cursor" swapped="no"/>
> +                  </object>
> +                </child>
>                </object>
>              </child>
> -            <child>
> -              <object class="GtkMenuItem" id="menu-send">
> -                <property name="visible">True</property>
> -                <property name="can_focus">False</property>
> -                <property name="use_action_appearance">False</property>
> -                <property name="label" translatable="yes">_Send
> key</property>
> -                <property name="use_underline">True</property>
> -              </object>
> -            </child>
> -            <child>
> -              <object class="GtkMenuItem" id="menu-help">
> +          </object>
> +        </child>
> +        <child>
> +          <object class="GtkMenuItem" id="menu-send">
> +            <property name="visible">True</property>
> +            <property name="can_focus">False</property>
> +            <property name="use_action_appearance">False</property>
> +            <property name="label" translatable="yes">_Send key</property>
> +            <property name="use_underline">True</property>
> +          </object>
> +        </child>
> +        <child>
> +          <object class="GtkMenuItem" id="menu-help">
> +            <property name="visible">True</property>
> +            <property name="can_focus">False</property>
> +            <property name="use_action_appearance">False</property>
> +            <property name="label" translatable="yes">_Help</property>
> +            <property name="use_underline">True</property>
> +            <child type="submenu">
> +              <object class="GtkMenu" id="menu3">
>                  <property name="visible">True</property>
>                  <property name="can_focus">False</property>
> -                <property name="use_action_appearance">False</property>
> -                <property name="label" translatable="yes">_Help</property>
> -                <property name="use_underline">True</property>
> -                <child type="submenu">
> -                  <object class="GtkMenu" id="menu3">
> +                <child>
> +                  <object class="GtkMenuItem" id="menu-help-guest-details">
>                      <property name="visible">True</property>
>                      <property name="can_focus">False</property>
> -                    <child>
> -                      <object class="GtkMenuItem" id="menu-help-guest
> -details">
> -                        <property name="visible">True</property>
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="label" translatable="yes">_Guest
> Details</property>
> -                        <property name="use_underline">True</property>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_help_guest_details" swapped="no"/>
> -                      </object>
> -                    </child>
> -                    <child>
> -                      <object class="GtkImageMenuItem" id="imagemenuitem10">
> -                        <property name="label">gtk-about</property>
> -                        <property name="visible">True</property>
> -                        <property name="can_focus">False</property>
> -                        <property
> name="use_action_appearance">False</property>
> -                        <property name="use_underline">True</property>
> -                        <property name="use_stock">True</property>
> -                        <signal name="activate"
> handler="virt_viewer_window_menu_help_about" swapped="no"/>
> -                      </object>
> -                    </child>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="label" translatable="yes">_Guest
> Details</property>
> +                    <property name="use_underline">True</property>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_help_guest_details" swapped="no"/>
> +                  </object>
> +                </child>
> +                <child>
> +                  <object class="GtkImageMenuItem" id="imagemenuitem10">
> +                    <property name="label">gtk-about</property>
> +                    <property name="visible">True</property>
> +                    <property name="can_focus">False</property>
> +                    <property name="use_action_appearance">False</property>
> +                    <property name="use_underline">True</property>
> +                    <property name="use_stock">True</property>
> +                    <signal name="activate"
> handler="virt_viewer_window_menu_help_about" swapped="no"/>
>                    </object>
>                  </child>
>                </object>
>              </child>
>            </object>
> -          <packing>
> -            <property name="expand">False</property>
> -            <property name="fill">True</property>
> -            <property name="position">0</property>
> -          </packing>
>          </child>
>        </object>
> +      <packing>
> +        <property name="expand">False</property>
> +        <property name="fill">True</property>
> +        <property name="position">0</property>
> +      </packing>
>      </child>
>    </object>
>  </interface>


Reviewed-by: Jonathon Jongsma <jjongsma at redhat.com>




More information about the virt-tools-list mailing list