[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/02: Replace stock enum where possible.
noreply at xfce.org
noreply at xfce.org
Sat Feb 21 14:52:02 CET 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit d6a9cb2c0852cf781cee5e33b71d13024cb756c3
Author: Graeme Gott <graeme at gottcode.org>
Date: Fri Feb 20 19:37:40 2015 -0500
Replace stock enum where possible.
---
panel-plugin/command-edit.cpp | 2 +-
panel-plugin/configuration-dialog.cpp | 6 +++---
panel-plugin/favorites-page.cpp | 4 ++--
panel-plugin/page.cpp | 4 ++--
panel-plugin/recent-page.cpp | 2 +-
panel-plugin/window.cpp | 4 ++--
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/panel-plugin/command-edit.cpp b/panel-plugin/command-edit.cpp
index 1c69dd9..0af8b07 100644
--- a/panel-plugin/command-edit.cpp
+++ b/panel-plugin/command-edit.cpp
@@ -51,7 +51,7 @@ CommandEdit::CommandEdit(Command* command, GtkSizeGroup* label_size_group) :
gtk_box_pack_start(GTK_BOX(m_widget), m_browse_button, false, false, 0);
gtk_widget_show(m_browse_button);
- GtkWidget* image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON);
+ GtkWidget* image = gtk_image_new_from_icon_name("document-open", GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(m_browse_button), image);
gtk_widget_show(image);
g_signal_connect_slot<GtkButton*>(m_browse_button, "clicked", &CommandEdit::browse_clicked, this);
diff --git a/panel-plugin/configuration-dialog.cpp b/panel-plugin/configuration-dialog.cpp
index 176c0c3..fb90f22 100644
--- a/panel-plugin/configuration-dialog.cpp
+++ b/panel-plugin/configuration-dialog.cpp
@@ -73,7 +73,7 @@ ConfigurationDialog::ConfigurationDialog(Plugin* plugin) :
GTK_STOCK_HELP, GTK_RESPONSE_HELP,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL);
- gtk_window_set_icon_name(GTK_WINDOW(m_window), GTK_STOCK_PROPERTIES);
+ gtk_window_set_icon_name(GTK_WINDOW(m_window), "document-properties");
gtk_window_set_position(GTK_WINDOW(m_window), GTK_WIN_POS_CENTER);
g_signal_connect_slot(m_window, "response", &ConfigurationDialog::response, this);
g_signal_connect_swapped(m_window, "destroy", G_CALLBACK(whiskermenu_config_dialog_delete), this);
@@ -782,7 +782,7 @@ GtkWidget* ConfigurationDialog::init_search_actions_tab()
gtk_widget_set_tooltip_text(m_action_add, _("Add action"));
gtk_widget_show(m_action_add);
- GtkWidget* image = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON);
+ GtkWidget* image = gtk_image_new_from_icon_name("list-add", GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(m_action_add), image);
gtk_widget_show(image);
g_signal_connect_slot(m_action_add, "clicked", &ConfigurationDialog::add_action, this);
@@ -791,7 +791,7 @@ GtkWidget* ConfigurationDialog::init_search_actions_tab()
gtk_widget_set_tooltip_text(m_action_remove, _("Remove selected action"));
gtk_widget_show(m_action_remove);
- image = gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_BUTTON);
+ image = gtk_image_new_from_icon_name("list-remove", GTK_ICON_SIZE_BUTTON);
gtk_container_add(GTK_CONTAINER(m_action_remove), image);
gtk_widget_show(image);
g_signal_connect_slot(m_action_remove, "clicked", &ConfigurationDialog::remove_action, this);
diff --git a/panel-plugin/favorites-page.cpp b/panel-plugin/favorites-page.cpp
index 4b21b3b..a682c9a 100644
--- a/panel-plugin/favorites-page.cpp
+++ b/panel-plugin/favorites-page.cpp
@@ -127,13 +127,13 @@ void FavoritesPage::extend_context_menu(GtkWidget* menu)
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
menuitem = gtk_image_menu_item_new_with_label(_("Sort Alphabetically A-Z"));
- GtkWidget* image = gtk_image_new_from_stock(GTK_STOCK_SORT_ASCENDING, GTK_ICON_SIZE_MENU);
+ GtkWidget* image = gtk_image_new_from_icon_name("view-sort-ascending", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
g_signal_connect_slot<GtkMenuItem*>(menuitem, "activate", &FavoritesPage::sort_ascending, this);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
menuitem = gtk_image_menu_item_new_with_label(_("Sort Alphabetically Z-A"));
- image = gtk_image_new_from_stock(GTK_STOCK_SORT_DESCENDING, GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name("view-sort-descending", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
g_signal_connect_slot<GtkMenuItem*>(menuitem, "activate", &FavoritesPage::sort_descending, this);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
diff --git a/panel-plugin/page.cpp b/panel-plugin/page.cpp
index 46cbb59..057fa4d 100644
--- a/panel-plugin/page.cpp
+++ b/panel-plugin/page.cpp
@@ -197,7 +197,7 @@ void Page::create_context_menu(GtkTreeIter* iter, GdkEvent* event)
if (!m_window->get_favorites()->contains(launcher))
{
menuitem = gtk_image_menu_item_new_with_label(_("Add to Favorites"));
- GtkWidget* image = gtk_image_new_from_icon_name("stock_add-bookmark", GTK_ICON_SIZE_MENU);
+ GtkWidget* image = gtk_image_new_from_icon_name("bookmark-new", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
g_signal_connect_slot<GtkMenuItem*>(menuitem, "activate", &Page::add_selected_to_favorites, this);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
@@ -205,7 +205,7 @@ void Page::create_context_menu(GtkTreeIter* iter, GdkEvent* event)
else
{
menuitem = gtk_image_menu_item_new_with_label(_("Remove From Favorites"));
- GtkWidget* image = gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
+ GtkWidget* image = gtk_image_new_from_icon_name("list-remove", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
g_signal_connect_slot<GtkMenuItem*>(menuitem, "activate", &Page::remove_selected_from_favorites, this);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
diff --git a/panel-plugin/recent-page.cpp b/panel-plugin/recent-page.cpp
index cc2fea0..196d1f6 100644
--- a/panel-plugin/recent-page.cpp
+++ b/panel-plugin/recent-page.cpp
@@ -146,7 +146,7 @@ void RecentPage::extend_context_menu(GtkWidget* menu)
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
menuitem = gtk_image_menu_item_new_with_label(_("Clear Recently Used"));
- GtkWidget* image = gtk_image_new_from_stock(GTK_STOCK_CLEAR, GTK_ICON_SIZE_MENU);
+ GtkWidget* image = gtk_image_new_from_icon_name("edit-clear", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image);
g_signal_connect_slot<GtkMenuItem*>(menuitem, "activate", &RecentPage::clear_menu, this);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
diff --git a/panel-plugin/window.cpp b/panel-plugin/window.cpp
index 70e6ab0..fdfdf80 100644
--- a/panel-plugin/window.cpp
+++ b/panel-plugin/window.cpp
@@ -110,7 +110,7 @@ WhiskerMenu::Window::Window() :
// Create search entry
m_search_entry = GTK_ENTRY(gtk_entry_new());
- gtk_entry_set_icon_from_stock(m_search_entry, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_FIND);
+ gtk_entry_set_icon_from_icon_name(m_search_entry, GTK_ENTRY_ICON_SECONDARY, "edit-find");
gtk_entry_set_icon_activatable(m_search_entry, GTK_ENTRY_ICON_SECONDARY, false);
g_signal_connect_slot<GtkEditable*>(m_search_entry, "changed", &Window::search, this);
@@ -917,7 +917,7 @@ void WhiskerMenu::Window::search()
// Update search entry icon
bool visible = text != NULL;
- gtk_entry_set_icon_from_stock(m_search_entry, GTK_ENTRY_ICON_SECONDARY, !visible ? GTK_STOCK_FIND : GTK_STOCK_CLEAR);
+ gtk_entry_set_icon_from_icon_name(m_search_entry, GTK_ENTRY_ICON_SECONDARY, !visible ? "edit-find" : "edit-clear");
gtk_entry_set_icon_activatable(m_search_entry, GTK_ENTRY_ICON_SECONDARY, visible);
if (visible)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list