Commit 2a037d4f authored by Andre Miranda's avatar Andre Miranda
Browse files

Rename icon name macro constants

parent 38265fb7
......@@ -258,8 +258,8 @@ xfce_appfinder_model_init (XfceAppfinderModel *model)
model->bookmarks_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
model->frecencies_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, xfce_appfinder_model_frecency_free);
model->icon_size = XFCE_APPFINDER_ICON_SIZE_DEFAULT_ITEM;
model->command_icon = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_STOCK_EXECUTE, model->icon_size);
model->command_icon_large = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_STOCK_EXECUTE, XFCE_APPFINDER_ICON_SIZE_48);
model->command_icon = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_ICON_NAME_EXECUTE, model->icon_size);
model->command_icon_large = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_ICON_NAME_EXECUTE, XFCE_APPFINDER_ICON_SIZE_48);
model->command_category = xfce_appfinder_model_get_command_category ();
model->collect_cancelled = g_cancellable_new ();
......@@ -2707,11 +2707,11 @@ xfce_appfinder_model_icon_theme_changed (XfceAppfinderModel *model)
/* reload the command icons */
if (model->command_icon != NULL)
g_object_unref (G_OBJECT (model->command_icon));
model->command_icon = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_STOCK_EXECUTE, model->icon_size);
model->command_icon = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_ICON_NAME_EXECUTE, model->icon_size);
if (model->command_icon_large != NULL)
g_object_unref (G_OBJECT (model->command_icon_large));
model->command_icon_large = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_STOCK_EXECUTE, XFCE_APPFINDER_ICON_SIZE_48);
model->command_icon_large = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_ICON_NAME_EXECUTE, XFCE_APPFINDER_ICON_SIZE_48);
/* update the model items */
for (li = model->items, idx = 0; li != NULL; li = li->next, idx++)
......@@ -2882,7 +2882,7 @@ xfce_appfinder_model_get_command_category (void)
{
category = g_object_new (GARCON_TYPE_MENU_DIRECTORY,
"name", _("Commands History"),
"icon-name", XFCE_APPFINDER_STOCK_EXECUTE,
"icon-name", XFCE_APPFINDER_ICON_NAME_EXECUTE,
NULL);
appfinder_refcount_debug_add (G_OBJECT (category), "commands");
g_object_add_weak_pointer (G_OBJECT (category), (gpointer) &category);
......
......@@ -263,7 +263,7 @@ xfce_appfinder_preferences_clear_history (XfceAppfinderPreferences *preferences)
appfinder_return_if_fail (XFCE_IS_APPFINDER_PREFERENCES (preferences));
if (xfce_dialog_confirm (GTK_WINDOW (preferences->dialog), XFCE_APPFINDER_STOCK_CLEAR, _("C_lear"),
if (xfce_dialog_confirm (GTK_WINDOW (preferences->dialog), XFCE_APPFINDER_ICON_NAME_CLEAR, _("C_lear"),
_("This will permanently clear the custom command history."),
_("Are you sure you want to clear the command history?")))
{
......@@ -374,7 +374,7 @@ xfce_appfinder_preferences_action_remove (GtkWidget *button,
-1);
if (xfce_dialog_confirm (GTK_WINDOW (gtk_widget_get_toplevel (button)),
XFCE_APPFINDER_STOCK_DELETE, _("_Delete"),
XFCE_APPFINDER_ICON_NAME_DELETE, _("_Delete"),
_("The custom action will be deleted permanently."),
_("Are you sure you want to delete pattern \"%s\"?"),
pattern))
......
......@@ -52,18 +52,18 @@ void appfinder_refcount_debug_add (GObject *object,
#define appfinder_return_val_if_fail(expr,val) G_STMT_START{ (void)0; }G_STMT_END
#endif
#define XFCE_APPFINDER_STOCK_BOOKMARK_NEW "bookmark-new"
#define XFCE_APPFINDER_STOCK_CLEAR "edit-clear-symbolic"
#define XFCE_APPFINDER_STOCK_DELETE "edit-delete"
#define XFCE_APPFINDER_STOCK_DIALOG_ERROR "dialog-error"
#define XFCE_APPFINDER_STOCK_EDIT "document-properties"
#define XFCE_APPFINDER_STOCK_EXECUTE "system-run"
#define XFCE_APPFINDER_STOCK_FIND "edit-find"
#define XFCE_APPFINDER_STOCK_GO_DOWN "go-down-symbolic"
#define XFCE_APPFINDER_STOCK_GO_UP "go-up-symbolic"
#define XFCE_APPFINDER_STOCK_PREFERENCES "preferences-system"
#define XFCE_APPFINDER_STOCK_REVERT_TO_SAVED "document-revert"
#define XFCE_APPFINDER_STOCK_REMOVE "list-remove"
#define XFCE_APPFINDER_ICON_NAME_BOOKMARK_NEW "bookmark-new"
#define XFCE_APPFINDER_ICON_NAME_CLEAR "edit-clear-symbolic"
#define XFCE_APPFINDER_ICON_NAME_DELETE "edit-delete"
#define XFCE_APPFINDER_ICON_NAME_DIALOG_ERROR "dialog-error"
#define XFCE_APPFINDER_ICON_NAME_EDIT "document-properties"
#define XFCE_APPFINDER_ICON_NAME_EXECUTE "system-run"
#define XFCE_APPFINDER_ICON_NAME_FIND "edit-find"
#define XFCE_APPFINDER_ICON_NAME_GO_DOWN "go-down-symbolic"
#define XFCE_APPFINDER_ICON_NAME_GO_UP "go-up-symbolic"
#define XFCE_APPFINDER_ICON_NAME_PREFERENCES "preferences-system"
#define XFCE_APPFINDER_ICON_NAME_REVERT "document-revert"
#define XFCE_APPFINDER_ICON_NAME_REMOVE "list-remove"
......
......@@ -249,7 +249,7 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
gtk_widget_show (hbox);
window->icon_find = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_STOCK_FIND, XFCE_APPFINDER_ICON_SIZE_48);
window->icon_find = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_ICON_NAME_FIND, XFCE_APPFINDER_ICON_SIZE_48);
window->image = image = gtk_image_new_from_pixbuf (window->icon_find);
gtk_widget_set_size_request (image, 48, 48);
gtk_widget_set_halign(image, GTK_ALIGN_CENTER);
......@@ -273,7 +273,7 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
G_CALLBACK (xfce_appfinder_window_entry_key_press_event), window);
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
GTK_ENTRY_ICON_SECONDARY,
XFCE_APPFINDER_STOCK_GO_DOWN);
XFCE_APPFINDER_ICON_NAME_GO_DOWN);
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry),
GTK_ENTRY_ICON_SECONDARY,
_("Toggle view mode"));
......@@ -363,7 +363,7 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
gtk_button_set_always_show_image(GTK_BUTTON(button), TRUE);
gtk_widget_show (button);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_STOCK_PREFERENCES, GTK_ICON_SIZE_BUTTON);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_ICON_NAME_PREFERENCES, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), image);
window->button_launch = button = gtk_button_new_with_mnemonic (_("La_unch"));
......@@ -374,7 +374,7 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
gtk_button_set_always_show_image(GTK_BUTTON(button), TRUE);
gtk_widget_show (button);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_STOCK_EXECUTE, GTK_ICON_SIZE_BUTTON);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_ICON_NAME_EXECUTE, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), image);
window->icon_theme = gtk_icon_theme_get_for_screen (gtk_window_get_screen (GTK_WINDOW (window)));
......@@ -920,7 +920,7 @@ xfce_appfinder_window_popup_menu_revert (GtkWidget *mi,
if (name == NULL)
return;
if (xfce_dialog_confirm (GTK_WINDOW (window), XFCE_APPFINDER_STOCK_REVERT_TO_SAVED, NULL,
if (xfce_dialog_confirm (GTK_WINDOW (window), XFCE_APPFINDER_ICON_NAME_REVERT, NULL,
_("This will permanently remove the custom desktop file from your home directory."),
_("Are you sure you want to revert \"%s\"?"), name))
{
......@@ -1071,9 +1071,9 @@ xfce_appfinder_window_popup_menu (GtkWidget *view,
G_CALLBACK (xfce_appfinder_window_popup_menu_toggle_bookmark), window);
if (is_bookmark)
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_ICON_NAME_REMOVE, GTK_ICON_SIZE_MENU);
else
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_STOCK_BOOKMARK_NEW, GTK_ICON_SIZE_MENU);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_ICON_NAME_BOOKMARK_NEW, GTK_ICON_SIZE_MENU);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
label = gtk_label_new (is_bookmark ? _("Remove From Bookmarks") : _("Add to Bookmarks"));
......@@ -1095,7 +1095,7 @@ xfce_appfinder_window_popup_menu (GtkWidget *view,
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
label = gtk_label_new_with_mnemonic (_("La_unch"));
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_STOCK_EXECUTE, GTK_ICON_SIZE_MENU);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_ICON_NAME_EXECUTE, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (box), image);
gtk_container_add (GTK_CONTAINER (box), label);
gtk_container_add (GTK_CONTAINER (mi), box);
......@@ -1109,7 +1109,7 @@ xfce_appfinder_window_popup_menu (GtkWidget *view,
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
label = gtk_label_new_with_mnemonic (_("_Edit"));
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_STOCK_EDIT, GTK_ICON_SIZE_MENU);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_ICON_NAME_EDIT, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (box), image);
gtk_container_add (GTK_CONTAINER (box), label);
gtk_container_add (GTK_CONTAINER (mi), box);
......@@ -1126,7 +1126,7 @@ xfce_appfinder_window_popup_menu (GtkWidget *view,
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
label = gtk_label_new_with_mnemonic (_("_Revert"));
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_STOCK_REVERT_TO_SAVED, GTK_ICON_SIZE_MENU);
image = gtk_image_new_from_icon_name (XFCE_APPFINDER_ICON_NAME_REVERT, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (box), image);
gtk_container_add (GTK_CONTAINER (box), label);
gtk_container_add (GTK_CONTAINER (mi), box);
......@@ -1443,7 +1443,7 @@ xfce_appfinder_window_drag_begin (GtkWidget *widget,
}
else
{
gtk_drag_set_icon_name (drag_context, XFCE_APPFINDER_STOCK_DIALOG_ERROR, 0, 0);
gtk_drag_set_icon_name (drag_context, XFCE_APPFINDER_ICON_NAME_DIALOG_ERROR, 0, 0);
}
}
......@@ -1756,7 +1756,7 @@ xfce_appfinder_window_icon_theme_changed (XfceAppfinderWindow *window)
if (window->icon_find != NULL)
g_object_unref (G_OBJECT (window->icon_find));
window->icon_find = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_STOCK_FIND, XFCE_APPFINDER_ICON_SIZE_48);
window->icon_find = xfce_appfinder_model_load_pixbuf (XFCE_APPFINDER_ICON_NAME_FIND, XFCE_APPFINDER_ICON_SIZE_48);
/* drop cached pixbufs */
if (G_LIKELY (window->model != NULL))
......@@ -1922,7 +1922,7 @@ xfce_appfinder_window_execute (XfceAppfinderWindow *window,
if (!only_custom_cmd)
{
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (window->entry), GTK_ENTRY_ICON_PRIMARY,
result ? NULL : XFCE_APPFINDER_STOCK_DIALOG_ERROR);
result ? NULL : XFCE_APPFINDER_ICON_NAME_DIALOG_ERROR);
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (window->entry), GTK_ENTRY_ICON_PRIMARY,
error != NULL ? error->message : NULL);
}
......@@ -1997,7 +1997,7 @@ xfce_appfinder_window_set_expanded (XfceAppfinderWindow *window,
/* toggle icon */
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (window->entry), GTK_ENTRY_ICON_SECONDARY,
expanded ? XFCE_APPFINDER_STOCK_GO_UP : XFCE_APPFINDER_STOCK_GO_DOWN);
expanded ? XFCE_APPFINDER_ICON_NAME_GO_UP : XFCE_APPFINDER_ICON_NAME_GO_DOWN);
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (window->entry), GTK_ENTRY_ICON_PRIMARY, NULL);
/* update completion (remove completed text of restart completion) */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment