mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-02-08 05:57:29 +03:00
cleanup: Don't use GtkStock
It has been deprecated since Gtk 3.10. New strings have been added as the GTK_STOCK_* defines had their translations done inside Gtk itself, but now the translations of the new added labels must be done by virt-viewer translators. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
parent
a37127c7cf
commit
af1e42a101
@ -24,12 +24,12 @@
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-cancel">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="label" translatable="yes">_Cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -39,14 +39,14 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-ok">
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -20,11 +20,11 @@
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="label" translatable="yes">_Close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -790,7 +790,7 @@ virt_viewer_session_spice_usb_device_selection(VirtViewerSession *session,
|
||||
/* Create the widgets */
|
||||
dialog = gtk_dialog_new_with_buttons(_("Select USB devices for redirection"), parent,
|
||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT,
|
||||
_("_Close"), GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(dialog), 12);
|
||||
|
@ -21,11 +21,11 @@
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-cancel">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="label" translatable="yes">_Cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -35,13 +35,13 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-connect">
|
||||
<property name="label">gtk-connect</property>
|
||||
<property name="label" translatable="yes">C_onnect</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -914,8 +914,8 @@ virt_viewer_window_menu_file_screenshot(GtkWidget *menu G_GNUC_UNUSED,
|
||||
dialog = gtk_file_chooser_dialog_new("Save screenshot",
|
||||
NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_SAVE,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_Save"), GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER (dialog), TRUE);
|
||||
gtk_window_set_transient_for(GTK_WINDOW(dialog),
|
||||
@ -1051,7 +1051,8 @@ virt_viewer_window_toolbar_setup(VirtViewerWindow *self)
|
||||
gtk_toolbar_set_style(GTK_TOOLBAR(priv->toolbar), GTK_TOOLBAR_BOTH_HORIZ);
|
||||
|
||||
/* Close connection */
|
||||
button = GTK_WIDGET(gtk_tool_button_new_from_stock(GTK_STOCK_CLOSE));
|
||||
button = GTK_WIDGET(gtk_tool_button_new(NULL, NULL));
|
||||
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(button), "window-close");
|
||||
gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(button), _("Disconnect"));
|
||||
gtk_widget_show(GTK_WIDGET(button));
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(priv->toolbar), GTK_TOOL_ITEM (button), 0);
|
||||
@ -1079,7 +1080,8 @@ virt_viewer_window_toolbar_setup(VirtViewerWindow *self)
|
||||
priv->toolbar_send_key = button;
|
||||
|
||||
/* Leave fullscreen */
|
||||
button = GTK_WIDGET(gtk_tool_button_new_from_stock(GTK_STOCK_LEAVE_FULLSCREEN));
|
||||
button = GTK_WIDGET(gtk_tool_button_new(NULL, NULL));
|
||||
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(button), "view-restore");
|
||||
gtk_tool_button_set_label(GTK_TOOL_BUTTON(button), _("Leave fullscreen"));
|
||||
gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(button), _("Leave fullscreen"));
|
||||
gtk_tool_item_set_is_important(GTK_TOOL_ITEM(button), TRUE);
|
||||
|
@ -84,13 +84,12 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="imagemenuitem5">
|
||||
<property name="label">gtk-quit</property>
|
||||
<object class="GtkMenuItem" id="imagemenuitem5">
|
||||
<property name="label" translatable="yes">_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>
|
||||
@ -135,26 +134,24 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="accel_group">accelgroup</property>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="menu-view-zoom-in">
|
||||
<object class="GtkMenuItem" id="menu-view-zoom-in">
|
||||
<property name="accel_path"><virt-viewer>/view/zoom-in</property>
|
||||
<property name="label">gtk-zoom-in</property>
|
||||
<property name="label" translatable="yes">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">
|
||||
<object class="GtkMenuItem" id="menu-view-zoom-out">
|
||||
<property name="accel_path"><virt-viewer>/view/zoom-out</property>
|
||||
<property name="label">gtk-zoom-out</property>
|
||||
<property name="label" translatable="yes">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>
|
||||
@ -165,14 +162,13 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="menu-view-zoom-reset">
|
||||
<object class="GtkMenuItem" id="menu-view-zoom-reset">
|
||||
<property name="accel_path"><virt-viewer>/view/zoom-reset</property>
|
||||
<property name="label">gtk-zoom-100</property>
|
||||
<property name="label" translatable="yes">_Normal Size</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>
|
||||
@ -234,13 +230,12 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="imagemenuitem10">
|
||||
<property name="label">gtk-about</property>
|
||||
<object class="GtkMenuItem" id="imagemenuitem10">
|
||||
<property name="label" translatable="yes">_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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user