diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2017-06-26 14:12:42 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2017-07-11 17:51:04 +0200 |
commit | 0984879dd1232a6a6958618778c1298a4392c314 (patch) | |
tree | 96ba5270457fadf4bd7c07a26dc5d6ea21d0e5a1 | |
parent | 556006bf0fe7b2a1c035835e3b8597a2778e54f7 (diff) | |
download | network-manager-applet-0984879dd1232a6a6958618778c1298a4392c314.tar.gz |
all: get rid of all GtkStock
It's deprecated, discouraged and even doesn't work anymore in some cases
(GTK_STOCK_NETWORK).
-rw-r--r-- | src/applet-device-ethernet.c | 6 | ||||
-rw-r--r-- | src/applet-dialogs.c | 6 | ||||
-rw-r--r-- | src/applet.c | 2 | ||||
-rw-r--r-- | src/connection-editor/ce-polkit-button.c | 16 | ||||
-rw-r--r-- | src/connection-editor/ce-polkit-button.h | 4 | ||||
-rw-r--r-- | src/connection-editor/connection-helpers.c | 10 | ||||
-rw-r--r-- | src/connection-editor/nm-connection-editor.c | 4 | ||||
-rw-r--r-- | src/connection-editor/nm-connection-list.c | 6 | ||||
-rw-r--r-- | src/connection-editor/page-bluetooth.c | 6 | ||||
-rw-r--r-- | src/connection-editor/page-mobile.c | 6 | ||||
-rw-r--r-- | src/connection-editor/page-proxy.c | 4 | ||||
-rw-r--r-- | src/connection-editor/page-team-port.c | 6 | ||||
-rw-r--r-- | src/connection-editor/page-team.c | 6 | ||||
-rw-r--r-- | src/connection-editor/vpn-helpers.c | 6 | ||||
-rw-r--r-- | src/libnm-gtk/nm-mobile-wizard.c | 4 | ||||
-rw-r--r-- | src/libnm-gtk/nm-vpn-password-dialog.c | 21 | ||||
-rw-r--r-- | src/libnm-gtk/nm-wifi-dialog.c | 19 | ||||
-rw-r--r-- | src/libnma/nma-mobile-wizard.c | 4 | ||||
-rw-r--r-- | src/libnma/nma-vpn-password-dialog.c | 21 | ||||
-rw-r--r-- | src/libnma/nma-wifi-dialog.c | 19 | ||||
-rw-r--r-- | src/mobile-helpers.c | 6 |
21 files changed, 73 insertions, 109 deletions
diff --git a/src/applet-device-ethernet.c b/src/applet-device-ethernet.c index da2a89f9..caac52d0 100644 --- a/src/applet-device-ethernet.c +++ b/src/applet-device-ethernet.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2008 - 2014 Red Hat, Inc. + * Copyright 2008 - 2017 Red Hat, Inc. * Copyright 2008 Novell, Inc. */ @@ -346,8 +346,8 @@ pppoe_get_secrets (SecretsRequest *req, GError **error) gtk_window_set_title (GTK_WINDOW (info->dialog), _("DSL authentication")); gtk_window_set_modal (GTK_WINDOW (info->dialog), TRUE); - gtk_dialog_add_button (GTK_DIALOG (info->dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT); - w = gtk_dialog_add_button (GTK_DIALOG (info->dialog), GTK_STOCK_OK, GTK_RESPONSE_OK); + gtk_dialog_add_button (GTK_DIALOG (info->dialog), _("_Cancel"), GTK_RESPONSE_REJECT); + w = gtk_dialog_add_button (GTK_DIALOG (info->dialog), _("_OK"), GTK_RESPONSE_OK); info->ok_button = w; gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (info->dialog))), diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c index 6a79b0e5..03bc17b2 100644 --- a/src/applet-dialogs.c +++ b/src/applet-dialogs.c @@ -1027,7 +1027,7 @@ applet_missing_ui_warning_dialog_show (void) /* Bash focus-stealing prevention in the face */ gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ALWAYS); - gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_DIALOG_ERROR); + gtk_window_set_icon_name (GTK_WINDOW (dialog), "dialog-error"); gtk_window_set_title (GTK_WINDOW (dialog), _("Missing resources")); gtk_widget_realize (dialog); gtk_widget_show (dialog); @@ -1056,8 +1056,8 @@ applet_mobile_password_dialog_new (NMConnection *connection, gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ALWAYS); gtk_window_set_title (GTK_WINDOW (dialog), _("Mobile broadband network password")); - gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT); - w = gtk_dialog_add_button (dialog, GTK_STOCK_OK, GTK_RESPONSE_OK); + gtk_dialog_add_button (dialog, _("_Cancel"), GTK_RESPONSE_REJECT); + w = gtk_dialog_add_button (dialog, _("_OK"), GTK_RESPONSE_OK); gtk_window_set_default (GTK_WINDOW (dialog), w); s_con = nm_connection_get_setting_connection (connection); diff --git a/src/applet.c b/src/applet.c index 322e0e91..6b9eb4ab 100644 --- a/src/applet.c +++ b/src/applet.c @@ -742,7 +742,7 @@ applet_do_notify (NMApplet *applet, escaped = utils_escape_notify_message (message); notify = notify_notification_new (summary, escaped, - icon ? icon : GTK_STOCK_NETWORK + icon ? icon : "network-workgroup" #if HAVE_LIBNOTIFY_07 ); #else diff --git a/src/connection-editor/ce-polkit-button.c b/src/connection-editor/ce-polkit-button.c index 677cffe0..a552a514 100644 --- a/src/connection-editor/ce-polkit-button.c +++ b/src/connection-editor/ce-polkit-button.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2009 - 2014 Red Hat, Inc. + * Copyright 2009 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -35,7 +35,7 @@ typedef struct { char *auth_tooltip; char *validation_error; - GtkWidget *stock; + GtkWidget *icon; GtkWidget *auth; NMClient *client; @@ -74,7 +74,7 @@ update_button (CEPolkitButton *self) gtk_widget_set_tooltip_text (GTK_WIDGET (self), _("No polkit authorization to perform the action")); if (priv->permission_result == NM_CLIENT_PERMISSION_RESULT_YES) - gtk_button_set_image (GTK_BUTTON (self), priv->stock); + gtk_button_set_image (GTK_BUTTON (self), priv->icon); else gtk_button_set_image (GTK_BUTTON (self), priv->auth); } @@ -162,7 +162,7 @@ GtkWidget * ce_polkit_button_new (const char *label, const char *tooltip, const char *auth_tooltip, - const char *stock_icon, + const char *icon_name, NMClient *client, NMClientPermission permission) { @@ -185,9 +185,9 @@ ce_polkit_button_new (const char *label, G_CALLBACK (permission_changed_cb), object); - priv->stock = gtk_image_new_from_stock (stock_icon, GTK_ICON_SIZE_BUTTON); - g_object_ref_sink (priv->stock); - priv->auth = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_BUTTON); + priv->icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON); + g_object_ref_sink (priv->icon); + priv->auth = gtk_image_new_from_icon_name ("dialog-password", GTK_ICON_SIZE_BUTTON); g_object_ref_sink (priv->auth); gtk_button_set_label (GTK_BUTTON (object), label); @@ -213,7 +213,7 @@ dispose (GObject *object) g_clear_object (&priv->client); g_clear_object (&priv->auth); - g_clear_object (&priv->stock); + g_clear_object (&priv->icon); G_OBJECT_CLASS (ce_polkit_button_parent_class)->dispose (object); } diff --git a/src/connection-editor/ce-polkit-button.h b/src/connection-editor/ce-polkit-button.h index a81963b3..53ad5f51 100644 --- a/src/connection-editor/ce-polkit-button.h +++ b/src/connection-editor/ce-polkit-button.h @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2009 - 2014444 Red Hat, Inc. + * Copyright 2009 - 2017 Red Hat, Inc. */ #ifndef __CE_POLKIT_BUTTON_H__ @@ -52,7 +52,7 @@ GType ce_polkit_button_get_type (void); GtkWidget *ce_polkit_button_new (const char *label, const char *tooltip, const char *auth_tooltip, - const char *stock_icon, + const char *icon_name, NMClient *client, NMClientPermission permission); diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c index 5ec4d046..747e8aa8 100644 --- a/src/connection-editor/connection-helpers.c +++ b/src/connection-editor/connection-helpers.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2012 Red Hat, Inc. + * Copyright 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -305,8 +305,8 @@ vpn_connection_import (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL, dialog = gtk_file_chooser_dialog_new (_("Select file to import"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Open"), GTK_RESPONSE_ACCEPT, NULL); home_folder = g_get_home_dir (); gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), home_folder); @@ -768,8 +768,8 @@ delete_connection (GtkWindow *parent_window, _("Are you sure you wish to delete the connection %s?"), id); gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_DELETE, GTK_RESPONSE_YES, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Delete"), GTK_RESPONSE_YES, NULL); result = gtk_dialog_run (GTK_DIALOG (dialog)); diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c index 7d101e27..3361969d 100644 --- a/src/connection-editor/nm-connection-editor.c +++ b/src/connection-editor/nm-connection-editor.c @@ -19,7 +19,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2007 - 2014 Red Hat, Inc. + * Copyright 2007 - 2017 Red Hat, Inc. * Copyright 2007 - 2008 Novell, Inc. */ @@ -578,7 +578,7 @@ nm_connection_editor_new (GtkWindow *parent_window, editor->ok_button = ce_polkit_button_new (_("_Save"), _("Save any changes made to this connection."), _("Authenticate to save this connection for all users of this machine."), - GTK_STOCK_APPLY, + "emblem-ok-symbolic", client, NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM); gtk_button_set_use_underline (GTK_BUTTON (editor->ok_button), TRUE); diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c index 3ef6f18d..36936e7d 100644 --- a/src/connection-editor/nm-connection-list.c +++ b/src/connection-editor/nm-connection-list.c @@ -18,7 +18,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2007 - 2014 Red Hat, Inc. + * Copyright 2007 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -695,7 +695,7 @@ add_connection_buttons (NMConnectionList *self) button = ce_polkit_button_new (_("_Edit"), _("Edit the selected connection"), _("Authenticate to edit the selected connection"), - GTK_STOCK_EDIT, + "emblem-system-symbolic", self->client, NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM); g_object_set_data (G_OBJECT (button), "NMConnectionList", self); @@ -711,7 +711,7 @@ add_connection_buttons (NMConnectionList *self) button = ce_polkit_button_new (_("_Delete"), _("Delete the selected connection"), _("Authenticate to delete the selected connection"), - GTK_STOCK_DELETE, + "edit-delete-symbolic", self->client, NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM); g_object_set_data (G_OBJECT (button), "NMConnectionList", self); diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c index 17d23b15..e5fdd070 100644 --- a/src/connection-editor/page-bluetooth.c +++ b/src/connection-editor/page-bluetooth.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2014 - 2015 Red Hat, Inc. + * Copyright 2014 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -308,9 +308,9 @@ bluetooth_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL, dialog = gtk_dialog_new_with_buttons (_("Bluetooth Type"), parent, GTK_DIALOG_MODAL, - GTK_STOCK_CANCEL, + _("_Cancel"), GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, + _("_OK"), GTK_RESPONSE_OK, NULL); diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c index f95c26ba..a9d0a922 100644 --- a/src/connection-editor/page-mobile.c +++ b/src/connection-editor/page-mobile.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2008 - 2014 Red Hat, Inc. + * Copyright 2008 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -540,9 +540,9 @@ mobile_connection_new (FUNC_TAG_PAGE_NEW_CONNECTION_IMPL, dialog = gtk_dialog_new_with_buttons (_("Select Mobile Broadband Provider Type"), parent, GTK_DIALOG_MODAL, - GTK_STOCK_CANCEL, + _("_Cancel"), GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, + _("_OK"), GTK_RESPONSE_OK, NULL); g_signal_connect (dialog, "delete-event", G_CALLBACK (cancel_dialog), NULL); diff --git a/src/connection-editor/page-proxy.c b/src/connection-editor/page-proxy.c index 7c1a6e88..1c2febae 100644 --- a/src/connection-editor/page-proxy.c +++ b/src/connection-editor/page-proxy.c @@ -118,8 +118,8 @@ import_button_clicked_cb (GtkWidget *widget, CEPageProxy *self) dialog = gtk_file_chooser_dialog_new (_("Select file to import"), GTK_WINDOW (toplevel), GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Open"), GTK_RESPONSE_ACCEPT, NULL); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); diff --git a/src/connection-editor/page-team-port.c b/src/connection-editor/page-team-port.c index c2b44408..1a1f8e95 100644 --- a/src/connection-editor/page-team-port.c +++ b/src/connection-editor/page-team-port.c @@ -15,7 +15,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright 2013 Jiri Pirko <jiri@resnulli.us> - * Copyright 2013 - 2016 Red Hat, Inc. + * Copyright 2013 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -203,8 +203,8 @@ import_button_clicked_cb (GtkWidget *widget, CEPageTeamPort *self) dialog = gtk_file_chooser_dialog_new (_("Select file to import"), GTK_WINDOW (toplevel), GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Open"), GTK_RESPONSE_ACCEPT, NULL); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); diff --git a/src/connection-editor/page-team.c b/src/connection-editor/page-team.c index 2dc7f269..062f46a7 100644 --- a/src/connection-editor/page-team.c +++ b/src/connection-editor/page-team.c @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright 2013 Jiri Pirko <jiri@resnulli.us> - * Copyright 2013 - 2014 Red Hat, Inc. + * Copyright 2013 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -341,8 +341,8 @@ import_button_clicked_cb (GtkWidget *widget, CEPageTeam *self) dialog = gtk_file_chooser_dialog_new (_("Select file to import"), GTK_WINDOW (toplevel), GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_Open"), GTK_RESPONSE_ACCEPT, NULL); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); diff --git a/src/connection-editor/vpn-helpers.c b/src/connection-editor/vpn-helpers.c index 02bb0683..b28cdbfb 100644 --- a/src/connection-editor/vpn-helpers.c +++ b/src/connection-editor/vpn-helpers.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2008 - 2014 Red Hat, Inc. + * Copyright 2008 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -209,8 +209,8 @@ vpn_export (NMConnection *connection) dialog = gtk_file_chooser_dialog_new (_("Export VPN connection…"), 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); home_folder = g_get_home_dir (); gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), home_folder); diff --git a/src/libnm-gtk/nm-mobile-wizard.c b/src/libnm-gtk/nm-mobile-wizard.c index f490bd62..bb83913d 100644 --- a/src/libnm-gtk/nm-mobile-wizard.c +++ b/src/libnm-gtk/nm-mobile-wizard.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2008 - 2012 Red Hat, Inc. + * (C) Copyright 2008 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -494,7 +494,7 @@ plan_setup (NMAMobileWizard *self) gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); - image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); + image = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); diff --git a/src/libnm-gtk/nm-vpn-password-dialog.c b/src/libnm-gtk/nm-vpn-password-dialog.c index a603d985..e8f96b41 100644 --- a/src/libnm-gtk/nm-vpn-password-dialog.c +++ b/src/libnm-gtk/nm-vpn-password-dialog.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 1999, 2000 Eazel, Inc. - * Copyright (C) 2011, 2013 Red Hat, Inc. + * Copyright (C) 2011, 2017 Red Hat, Inc. * * Authors: Ramiro Estrugo <ramiro@eazel.com> * Dan Williams <dcbw@redhat.com> @@ -195,7 +195,7 @@ nma_vpn_password_dialog_new (const char *title, GtkWidget *vbox; GtkWidget *main_vbox; GtkWidget *dialog_icon; - GtkBox *content, *action_area; + GtkBox *content; dialog = gtk_widget_new (NMA_VPN_TYPE_PASSWORD_DIALOG, NULL); if (!dialog) @@ -206,20 +206,11 @@ nma_vpn_password_dialog_new (const char *title, gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); - content = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))); - action_area = GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))); - - /* Set up the dialog */ - gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); - gtk_box_set_spacing (content, 2); /* 2 * 5 + 2 = 12 */ - gtk_container_set_border_width (GTK_CONTAINER (action_area), 5); - gtk_box_set_spacing (action_area, 6); - gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); @@ -275,7 +266,7 @@ nma_vpn_password_dialog_new (const char *title, /* Adds some eye-candy to the dialog */ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); - dialog_icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG); + dialog_icon = gtk_image_new_from_icon_name ("dialog-password", GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (dialog_icon), 0.5, 0.0); gtk_box_pack_start (GTK_BOX (hbox), dialog_icon, FALSE, FALSE, 0); @@ -296,6 +287,8 @@ nma_vpn_password_dialog_new (const char *title, gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), priv->grid_alignment, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), main_vbox, FALSE, FALSE, 0); + + content = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))); gtk_box_pack_start (content, hbox, FALSE, FALSE, 0); gtk_widget_show_all (GTK_WIDGET (content)); diff --git a/src/libnm-gtk/nm-wifi-dialog.c b/src/libnm-gtk/nm-wifi-dialog.c index 0e5e8cc2..d6786fd7 100644 --- a/src/libnm-gtk/nm-wifi-dialog.c +++ b/src/libnm-gtk/nm-wifi-dialog.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2012 Red Hat, Inc. + * (C) Copyright 2007 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -1064,27 +1064,16 @@ internal_init (NMAWifiDialog *self, gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), 2); - widget = gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - gtk_box_set_child_packing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (self))), widget, - FALSE, TRUE, 0, GTK_PACK_END); + widget = gtk_dialog_add_button (GTK_DIALOG (self), _("_Cancel"), GTK_RESPONSE_CANCEL); /* Connect/Create button */ if (priv->operation == OP_CREATE_ADHOC) { - GtkWidget *image; - - widget = gtk_button_new_with_mnemonic (_("C_reate")); - image = gtk_image_new_from_stock (GTK_STOCK_CONNECT, GTK_ICON_SIZE_BUTTON); - gtk_button_set_image (GTK_BUTTON (widget), image); - - gtk_widget_show (widget); - gtk_dialog_add_action_widget (GTK_DIALOG (self), widget, GTK_RESPONSE_OK); + widget = gtk_dialog_add_button (GTK_DIALOG (self), _("C_reate"), GTK_RESPONSE_OK); } else { - widget = gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CONNECT, GTK_RESPONSE_OK); + widget = gtk_dialog_add_button (GTK_DIALOG (self), _("C_onnect"), GTK_RESPONSE_OK); priv->ok_response_button = widget; } - gtk_box_set_child_packing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (self))), widget, - FALSE, TRUE, 0, GTK_PACK_END); g_object_set (G_OBJECT (widget), "can-default", TRUE, NULL); gtk_widget_grab_default (widget); diff --git a/src/libnma/nma-mobile-wizard.c b/src/libnma/nma-mobile-wizard.c index f103c24b..15332615 100644 --- a/src/libnma/nma-mobile-wizard.c +++ b/src/libnma/nma-mobile-wizard.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2008 - 2012 Red Hat, Inc. + * (C) Copyright 2008 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -493,7 +493,7 @@ plan_setup (NMAMobileWizard *self) gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); - image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); + image = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); diff --git a/src/libnma/nma-vpn-password-dialog.c b/src/libnma/nma-vpn-password-dialog.c index 40ab8601..8b1d33c1 100644 --- a/src/libnma/nma-vpn-password-dialog.c +++ b/src/libnma/nma-vpn-password-dialog.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 1999, 2000 Eazel, Inc. - * Copyright (C) 2011, 2013 Red Hat, Inc. + * Copyright (C) 2011, 2017 Red Hat, Inc. * * Authors: Ramiro Estrugo <ramiro@eazel.com> * Dan Williams <dcbw@redhat.com> @@ -195,7 +195,7 @@ nma_vpn_password_dialog_new (const char *title, GtkWidget *vbox; GtkWidget *main_vbox; GtkWidget *dialog_icon; - GtkBox *content, *action_area; + GtkBox *content; dialog = gtk_widget_new (NMA_VPN_TYPE_PASSWORD_DIALOG, NULL); if (!dialog) @@ -206,20 +206,11 @@ nma_vpn_password_dialog_new (const char *title, gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); - content = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))); - action_area = GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))); - - /* Set up the dialog */ - gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); - gtk_box_set_spacing (content, 2); /* 2 * 5 + 2 = 12 */ - gtk_container_set_border_width (GTK_CONTAINER (action_area), 5); - gtk_box_set_spacing (action_area, 6); - gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); @@ -275,7 +266,7 @@ nma_vpn_password_dialog_new (const char *title, /* Adds some eye-candy to the dialog */ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); - dialog_icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG); + dialog_icon = gtk_image_new_from_icon_name ("dialog-password", GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (dialog_icon), 0.5, 0.0); gtk_box_pack_start (GTK_BOX (hbox), dialog_icon, FALSE, FALSE, 0); @@ -296,6 +287,8 @@ nma_vpn_password_dialog_new (const char *title, gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), priv->grid_alignment, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), main_vbox, FALSE, FALSE, 0); + + content = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))); gtk_box_pack_start (content, hbox, FALSE, FALSE, 0); gtk_widget_show_all (GTK_WIDGET (content)); diff --git a/src/libnma/nma-wifi-dialog.c b/src/libnma/nma-wifi-dialog.c index bc965ec1..72b98a75 100644 --- a/src/libnma/nma-wifi-dialog.c +++ b/src/libnma/nma-wifi-dialog.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2007 - 2014 Red Hat, Inc. + * Copyright 2007 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -1063,27 +1063,16 @@ internal_init (NMAWifiDialog *self, gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), 2); - widget = gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - gtk_box_set_child_packing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (self))), widget, - FALSE, TRUE, 0, GTK_PACK_END); + widget = gtk_dialog_add_button (GTK_DIALOG (self), _("_Cancel"), GTK_RESPONSE_CANCEL); /* Connect/Create button */ if (priv->operation == OP_CREATE_ADHOC) { - GtkWidget *image; - - widget = gtk_button_new_with_mnemonic (_("C_reate")); - image = gtk_image_new_from_stock (GTK_STOCK_CONNECT, GTK_ICON_SIZE_BUTTON); - gtk_button_set_image (GTK_BUTTON (widget), image); - - gtk_widget_show (widget); - gtk_dialog_add_action_widget (GTK_DIALOG (self), widget, GTK_RESPONSE_OK); + widget = gtk_dialog_add_button (GTK_DIALOG (self), _("C_reate"), GTK_RESPONSE_OK); } else { - widget = gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CONNECT, GTK_RESPONSE_OK); + widget = gtk_dialog_add_button (GTK_DIALOG (self), _("C_onnect"), GTK_RESPONSE_OK); priv->ok_response_button = widget; } - gtk_box_set_child_packing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (self))), widget, - FALSE, TRUE, 0, GTK_PACK_END); g_object_set (G_OBJECT (widget), "can-default", TRUE, NULL); gtk_widget_grab_default (widget); diff --git a/src/mobile-helpers.c b/src/mobile-helpers.c index 65a56a31..9c1c965a 100644 --- a/src/mobile-helpers.c +++ b/src/mobile-helpers.c @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2010 - 2014 Red Hat, Inc. + * Copyright 2010 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -462,8 +462,8 @@ ask_for_pin (GtkEntry **out_secret_entry) gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_title (GTK_WINDOW (dialog), _("PIN code required")); - gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT); - ok_button = gtk_dialog_add_button (dialog, GTK_STOCK_OK, GTK_RESPONSE_OK); + gtk_dialog_add_button (dialog, _("_Cancel"), GTK_RESPONSE_REJECT); + ok_button = gtk_dialog_add_button (dialog, _("_OK"), GTK_RESPONSE_OK); gtk_window_set_default (GTK_WINDOW (dialog), ok_button); vbox = GTK_BOX (gtk_dialog_get_content_area (dialog)); |