mirror of
https://github.com/mac-a-r0ni/crux-xfce4.git
synced 2025-02-03 02:52:20 +01:00
217 lines
10 KiB
Diff
217 lines
10 KiB
Diff
From abd4ede639bc8a4f53562d6ee4a33e2c2d2a3e52 Mon Sep 17 00:00:00 2001
|
|
From: Andre Miranda <andreldm@xfce.org>
|
|
Date: Thu, 1 Aug 2019 23:38:34 -0300
|
|
Subject: Replace (some) GtkStock buttons
|
|
|
|
---
|
|
mousepad/mousepad-close-button.c | 2 +-
|
|
mousepad/mousepad-dialogs.c | 8 ++++----
|
|
mousepad/mousepad-dialogs.h | 2 --
|
|
mousepad/mousepad-encoding-dialog.c | 4 ++--
|
|
mousepad/mousepad-print.c | 2 +-
|
|
mousepad/mousepad-replace-dialog.c | 2 +-
|
|
mousepad/mousepad-search-bar.c | 6 +++---
|
|
mousepad/mousepad-util.c | 4 ++--
|
|
mousepad/mousepad-util.h | 2 +-
|
|
mousepad/mousepad-window.c | 4 ++--
|
|
10 files changed, 17 insertions(+), 19 deletions(-)
|
|
|
|
diff --git a/mousepad/mousepad-close-button.c b/mousepad/mousepad-close-button.c
|
|
index 8c52416..4ead284 100644
|
|
--- a/mousepad/mousepad-close-button.c
|
|
+++ b/mousepad/mousepad-close-button.c
|
|
@@ -84,7 +84,7 @@ mousepad_close_button_init (MousepadCloseButton *button)
|
|
gtk_widget_set_name (GTK_WIDGET (button), "mousepad-close-button");
|
|
#endif
|
|
|
|
- image = gtk_image_new_from_icon_name ("gtk-close", GTK_ICON_SIZE_MENU);
|
|
+ image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU);
|
|
gtk_container_add (GTK_CONTAINER (button), image);
|
|
gtk_widget_show (image);
|
|
|
|
diff --git a/mousepad/mousepad-dialogs.c b/mousepad/mousepad-dialogs.c
|
|
index 76745b9..8b03ab2 100644
|
|
--- a/mousepad/mousepad-dialogs.c
|
|
+++ b/mousepad/mousepad-dialogs.c
|
|
@@ -308,7 +308,7 @@ mousepad_dialogs_clear_recent (GtkWindow *parent)
|
|
"remove all currently listed entries."));
|
|
|
|
/* the dialog icon */
|
|
- image = gtk_image_new_from_stock (GTK_STOCK_CLEAR, GTK_ICON_SIZE_DIALOG);
|
|
+ image = gtk_image_new_from_icon_name ("edit-clear", GTK_ICON_SIZE_DIALOG);
|
|
gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image);
|
|
gtk_widget_show (image);
|
|
|
|
@@ -337,19 +337,19 @@ mousepad_dialogs_save_changes (GtkWindow *parent,
|
|
GTK_MESSAGE_OTHER, GTK_BUTTONS_NONE,
|
|
_("Do you want to save the changes before closing?"));
|
|
gtk_window_set_title (GTK_WINDOW (dialog), _("Save Changes"));
|
|
- gtk_dialog_add_action_widget (GTK_DIALOG (dialog), mousepad_util_image_button (GTK_STOCK_DELETE, _("_Don't Save")), MOUSEPAD_RESPONSE_DONT_SAVE);
|
|
+ gtk_dialog_add_action_widget (GTK_DIALOG (dialog), mousepad_util_image_button ("edit-delete", _("_Don't Save")), MOUSEPAD_RESPONSE_DONT_SAVE);
|
|
gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, MOUSEPAD_RESPONSE_CANCEL);
|
|
|
|
/* we show the save as button instead of save for readonly document */
|
|
if (G_UNLIKELY (readonly))
|
|
{
|
|
- image = gtk_image_new_from_stock (GTK_STOCK_SAVE_AS, GTK_ICON_SIZE_DIALOG);
|
|
+ image = gtk_image_new_from_icon_name ("document-save-as", GTK_ICON_SIZE_DIALOG);
|
|
gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_SAVE_AS, MOUSEPAD_RESPONSE_SAVE_AS, NULL);
|
|
gtk_dialog_set_default_response (GTK_DIALOG (dialog), MOUSEPAD_RESPONSE_SAVE_AS);
|
|
}
|
|
else
|
|
{
|
|
- image = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_DIALOG);
|
|
+ image = gtk_image_new_from_icon_name ("document-save", GTK_ICON_SIZE_DIALOG);
|
|
gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_SAVE, MOUSEPAD_RESPONSE_SAVE, NULL);
|
|
gtk_dialog_set_default_response (GTK_DIALOG (dialog), MOUSEPAD_RESPONSE_SAVE);
|
|
}
|
|
diff --git a/mousepad/mousepad-dialogs.h b/mousepad/mousepad-dialogs.h
|
|
index f059ddc..3c94f1a 100644
|
|
--- a/mousepad/mousepad-dialogs.h
|
|
+++ b/mousepad/mousepad-dialogs.h
|
|
@@ -38,8 +38,6 @@ enum {
|
|
MOUSEPAD_RESPONSE_CHECK_ENTRY
|
|
};
|
|
|
|
-GtkWidget *mousepad_dialogs_image_button (const gchar *stock_id,
|
|
- const gchar *label);
|
|
|
|
void mousepad_dialogs_show_about (GtkWindow *parent);
|
|
|
|
diff --git a/mousepad/mousepad-encoding-dialog.c b/mousepad/mousepad-encoding-dialog.c
|
|
index 110a3c9..3d73120 100644
|
|
--- a/mousepad/mousepad-encoding-dialog.c
|
|
+++ b/mousepad/mousepad-encoding-dialog.c
|
|
@@ -129,7 +129,7 @@ mousepad_encoding_dialog_init (MousepadEncodingDialog *dialog)
|
|
|
|
/* create the header */
|
|
mousepad_util_dialog_header (GTK_DIALOG (dialog), _("The document was not UTF-8 valid"),
|
|
- _("Please select an encoding below."), GTK_STOCK_FILE);
|
|
+ _("Please select an encoding below."), "text-x-generic");
|
|
|
|
/* dialog vbox */
|
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
|
@@ -192,7 +192,7 @@ mousepad_encoding_dialog_init (MousepadEncodingDialog *dialog)
|
|
gtk_box_pack_start (GTK_BOX (vbox), dialog->error_box, FALSE, FALSE, 0);
|
|
|
|
/* error icon */
|
|
- icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_BUTTON);
|
|
+ icon = gtk_image_new_from_icon_name ("dialog-error", GTK_ICON_SIZE_BUTTON);
|
|
gtk_box_pack_start (GTK_BOX (dialog->error_box), icon, FALSE, FALSE, 0);
|
|
gtk_widget_show (icon);
|
|
|
|
diff --git a/mousepad/mousepad-print.c b/mousepad/mousepad-print.c
|
|
index 63c470c..0615bae 100644
|
|
--- a/mousepad/mousepad-print.c
|
|
+++ b/mousepad/mousepad-print.c
|
|
@@ -607,7 +607,7 @@ mousepad_print_create_custom_widget (GtkPrintOperation *operation)
|
|
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
|
gtk_widget_show (alignment);
|
|
|
|
- button = mousepad_util_image_button (GTK_STOCK_PROPERTIES, _("_Adjust page size and orientation"));
|
|
+ button = mousepad_util_image_button ("document-properties", _("_Adjust page size and orientation"));
|
|
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (mousepad_print_page_setup_dialog), operation);
|
|
gtk_container_add (GTK_CONTAINER (alignment), button);
|
|
gtk_widget_show (button);
|
|
diff --git a/mousepad/mousepad-replace-dialog.c b/mousepad/mousepad-replace-dialog.c
|
|
index 3ffd6f8..8b4f44c 100644
|
|
--- a/mousepad/mousepad-replace-dialog.c
|
|
+++ b/mousepad/mousepad-replace-dialog.c
|
|
@@ -141,7 +141,7 @@ mousepad_replace_dialog_init (MousepadReplaceDialog *dialog)
|
|
|
|
/* dialog buttons */
|
|
dialog->find_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_FIND, MOUSEPAD_RESPONSE_FIND);
|
|
- dialog->replace_button = mousepad_util_image_button (GTK_STOCK_FIND_AND_REPLACE, _("_Replace"));
|
|
+ dialog->replace_button = mousepad_util_image_button ("edit-find-replace", _("_Replace"));
|
|
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), dialog->replace_button, MOUSEPAD_RESPONSE_REPLACE);
|
|
gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, MOUSEPAD_RESPONSE_CLOSE);
|
|
gtk_dialog_set_default_response (GTK_DIALOG (dialog), MOUSEPAD_RESPONSE_FIND);
|
|
diff --git a/mousepad/mousepad-search-bar.c b/mousepad/mousepad-search-bar.c
|
|
index 6690109..963c32a 100644
|
|
--- a/mousepad/mousepad-search-bar.c
|
|
+++ b/mousepad/mousepad-search-bar.c
|
|
@@ -224,7 +224,7 @@ mousepad_search_bar_init (MousepadSearchBar *bar)
|
|
gtk_widget_show (bar->entry);
|
|
|
|
/* next button */
|
|
- image = gtk_image_new_from_stock (GTK_STOCK_GO_DOWN, TOOL_BAR_ICON_SIZE);
|
|
+ image = gtk_image_new_from_icon_name ("go-down", TOOL_BAR_ICON_SIZE);
|
|
gtk_widget_show (image);
|
|
|
|
item = gtk_tool_button_new (image, _("_Next"));
|
|
@@ -235,7 +235,7 @@ mousepad_search_bar_init (MousepadSearchBar *bar)
|
|
gtk_widget_show (GTK_WIDGET (item));
|
|
|
|
/* previous button */
|
|
- image = gtk_image_new_from_stock (GTK_STOCK_GO_UP, TOOL_BAR_ICON_SIZE);
|
|
+ image = gtk_image_new_from_icon_name ("go-up", TOOL_BAR_ICON_SIZE);
|
|
gtk_widget_show (image);
|
|
|
|
item = gtk_tool_button_new (image, _("_Previous"));
|
|
@@ -248,7 +248,7 @@ mousepad_search_bar_init (MousepadSearchBar *bar)
|
|
/* highlight all */
|
|
item = (GtkToolItem *) gtk_toggle_tool_button_new ();
|
|
g_signal_connect_object (G_OBJECT (bar), "destroy", G_CALLBACK (gtk_widget_destroy), item, G_CONNECT_SWAPPED);
|
|
- gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), GTK_STOCK_SELECT_ALL);
|
|
+ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "edit-select-all");
|
|
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), _("Highlight _All"));
|
|
gtk_tool_item_set_is_important (item, TRUE);
|
|
gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (item), TRUE);
|
|
diff --git a/mousepad/mousepad-util.c b/mousepad/mousepad-util.c
|
|
index 350ee64..4f0893a 100644
|
|
--- a/mousepad/mousepad-util.c
|
|
+++ b/mousepad/mousepad-util.c
|
|
@@ -361,12 +361,12 @@ mousepad_util_escape_underscores (const gchar *str)
|
|
|
|
|
|
GtkWidget *
|
|
-mousepad_util_image_button (const gchar *stock_id,
|
|
+mousepad_util_image_button (const gchar *icon_name,
|
|
const gchar *label)
|
|
{
|
|
GtkWidget *button, *image;
|
|
|
|
- image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
|
|
+ image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
|
|
gtk_widget_show (image);
|
|
|
|
button = gtk_button_new_with_mnemonic (label);
|
|
diff --git a/mousepad/mousepad-util.h b/mousepad/mousepad-util.h
|
|
index c83765a..3923858 100644
|
|
--- a/mousepad/mousepad-util.h
|
|
+++ b/mousepad/mousepad-util.h
|
|
@@ -80,7 +80,7 @@ gchar *mousepad_util_utf8_stropposite (const gchar *
|
|
|
|
gchar *mousepad_util_escape_underscores (const gchar *str);
|
|
|
|
-GtkWidget *mousepad_util_image_button (const gchar *stock_id,
|
|
+GtkWidget *mousepad_util_image_button (const gchar *icon_name,
|
|
const gchar *label);
|
|
|
|
void mousepad_util_entry_error (GtkWidget *widget,
|
|
diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
|
|
index a5231c4..65a2c5d 100644
|
|
--- a/mousepad/mousepad-window.c
|
|
+++ b/mousepad/mousepad-window.c
|
|
@@ -2330,7 +2330,7 @@ mousepad_window_menu_templates_fill (MousepadWindow *window,
|
|
g_free (label);
|
|
|
|
/* set menu image */
|
|
- image = gtk_image_new_from_icon_name (GTK_STOCK_DIRECTORY, GTK_ICON_SIZE_MENU);
|
|
+ image = gtk_image_new_from_icon_name ("folder", GTK_ICON_SIZE_MENU);
|
|
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
|
|
gtk_widget_show (image);
|
|
}
|
|
@@ -2366,7 +2366,7 @@ mousepad_window_menu_templates_fill (MousepadWindow *window,
|
|
gtk_widget_show (item);
|
|
|
|
/* set menu image */
|
|
- image = gtk_image_new_from_icon_name (GTK_STOCK_FILE, GTK_ICON_SIZE_MENU);
|
|
+ image = gtk_image_new_from_icon_name ("text-x-generic", GTK_ICON_SIZE_MENU);
|
|
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
|
|
gtk_widget_show (image);
|
|
|
|
--
|
|
cgit v1.2.1
|
|
|