Commit 38a5fd96 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair
Browse files

Kill NAUTILUS_ICON_SIZE_FOR_MENUS, make icon factory support GTK+ stock

2005-10-17  Christian Neumair  <chris@gnome-de.org>

	* libnautilus-private/nautilus-bookmark.c:
	* libnautilus-private/nautilus-bookmark.h:
	* libnautilus-private/nautilus-icon-container.c:
	* libnautilus-private/nautilus-icon-factory.c:
	* libnautilus-private/nautilus-icon-factory.h:
	* libnautilus-private/nautilus-ui-utilities.c:
	* src/nautilus-bookmarks-window.c:
	* src/nautilus-history-sidebar.c:
	* src/nautilus-places-sidebar.c:
	* src/nautilus-sidebar-title.c:
	* src/nautilus-spatial-window.c:
	* src/nautilus-window-menus.c:
	* src/file-manager/fm-directory-view.c:
	Kill NAUTILUS_ICON_SIZE_FOR_MENUS, make icon factory support GTK+
	stock icon size, use this size in the sidebar, and in menus.
	Fixes #167107 and others.
parent 79c68880
2005-10-17 Christian Neumair <chris@gnome-de.org>
* libnautilus-private/nautilus-bookmark.c:
* libnautilus-private/nautilus-bookmark.h:
* libnautilus-private/nautilus-icon-container.c:
* libnautilus-private/nautilus-icon-factory.c:
* libnautilus-private/nautilus-icon-factory.h:
* libnautilus-private/nautilus-ui-utilities.c:
* src/nautilus-bookmarks-window.c:
* src/nautilus-history-sidebar.c:
* src/nautilus-places-sidebar.c:
* src/nautilus-sidebar-title.c:
* src/nautilus-spatial-window.c:
* src/nautilus-window-menus.c:
* src/file-manager/fm-directory-view.c:
Kill NAUTILUS_ICON_SIZE_FOR_MENUS, make icon factory support GTK+
stock icon size, use this size in the sidebar, and in menus.
Fixes #167107 and others.
2005-10-17 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-directory-view.c (fm_directory_view_class_init):
......
......@@ -217,8 +217,7 @@ nautilus_bookmark_get_has_custom_name (NautilusBookmark *bookmark)
GdkPixbuf *
nautilus_bookmark_get_pixbuf (NautilusBookmark *bookmark,
guint icon_size,
gboolean optimize_for_anti_aliasing)
GtkIconSize icon_size)
{
GdkPixbuf *result;
char *icon;
......@@ -230,7 +229,7 @@ nautilus_bookmark_get_pixbuf (NautilusBookmark *bookmark,
return NULL;
}
result = nautilus_icon_factory_get_pixbuf_for_icon_force_size
result = nautilus_icon_factory_get_pixbuf_for_icon_with_stock_size
(icon, NULL,
icon_size, NULL, NULL,
TRUE, NULL);
......@@ -501,7 +500,7 @@ create_image_widget_for_bookmark (NautilusBookmark *bookmark)
GdkPixbuf *pixbuf;
GtkWidget *widget;
pixbuf = nautilus_bookmark_get_pixbuf (bookmark, NAUTILUS_ICON_SIZE_FOR_MENUS, FALSE);
pixbuf = nautilus_bookmark_get_pixbuf (bookmark, GTK_ICON_SIZE_MENU);
if (pixbuf == NULL) {
return NULL;
}
......
......@@ -25,6 +25,7 @@
#ifndef NAUTILUS_BOOKMARK_H
#define NAUTILUS_BOOKMARK_H
#include <gtk/gtkenums.h>
#include <gtk/gtkwidget.h>
#include <libnautilus-private/nautilus-icon-factory.h>
......@@ -95,8 +96,7 @@ char * nautilus_bookmark_get_scroll_pos (NautilusBookmark
/* Helper functions for displaying bookmarks */
GdkPixbuf * nautilus_bookmark_get_pixbuf (NautilusBookmark *bookmark,
guint icon_size,
gboolean optimize_for_anti_aliasing);
GtkIconSize icon_size);
GtkWidget * nautilus_bookmark_menu_item_new (NautilusBookmark *bookmark);
#endif /* NAUTILUS_BOOKMARK_H */
......@@ -5041,7 +5041,7 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container,
icon_size,
&attach_points,
&embedded_text_rect,
TRUE, NULL);
FALSE, TRUE, NULL);
g_free (icon_name);
......@@ -5063,7 +5063,7 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container,
MIN (icon_size, MAXIMUM_EMBLEM_SIZE),
NULL,
NULL,
FALSE, NULL);
FALSE, FALSE, NULL);
if (emblem_pixbuf != NULL) {
emblem_pixbufs = g_list_prepend
(emblem_pixbufs, emblem_pixbuf);
......
......@@ -48,6 +48,7 @@
#include <eel/eel-vfs-extensions.h>
#include <gtk/gtksettings.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkiconfactory.h>
#include <gtk/gtkicontheme.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
......@@ -836,6 +837,16 @@ get_special_icon_for_file (NautilusFile *file)
return ret;
}
static gint
gtk_icon_size_to_nominal_size (GtkIconSize icon_size)
{
gint ret;
g_assert (gtk_icon_size_lookup (icon_size, &ret, NULL));
return ret;
}
/* key routine to get the icon for a file */
char *
nautilus_icon_factory_get_icon_for_file (NautilusFile *file, gboolean embedd_text)
......@@ -1004,9 +1015,6 @@ nautilus_icon_factory_get_larger_icon_size (guint size)
if (size < NAUTILUS_ICON_SIZE_SMALLEST) {
return NAUTILUS_ICON_SIZE_SMALLEST;
}
if (size < NAUTILUS_ICON_SIZE_FOR_MENUS) {
return NAUTILUS_ICON_SIZE_FOR_MENUS;
}
if (size < NAUTILUS_ICON_SIZE_SMALLER) {
return NAUTILUS_ICON_SIZE_SMALLER;
}
......@@ -1046,9 +1054,6 @@ nautilus_icon_factory_get_smaller_icon_size (guint size)
if (size > NAUTILUS_ICON_SIZE_SMALLER) {
return NAUTILUS_ICON_SIZE_SMALLER;
}
if (size > NAUTILUS_ICON_SIZE_FOR_MENUS) {
return NAUTILUS_ICON_SIZE_FOR_MENUS;
}
return NAUTILUS_ICON_SIZE_SMALLEST;
}
......@@ -1387,15 +1392,15 @@ get_icon_from_cache (const char *icon,
return cached_icon;
}
static GdkPixbuf *
nautilus_icon_factory_get_pixbuf_for_icon_internal (const char *icon,
const char *modifier,
guint nominal_size,
gboolean force_size,
NautilusEmblemAttachPoints *attach_points,
GdkRectangle *embedded_text_rect,
gboolean wants_default,
char **display_name)
GdkPixbuf *
nautilus_icon_factory_get_pixbuf_for_icon (const char *icon,
const char *modifier,
guint nominal_size,
NautilusEmblemAttachPoints *attach_points,
GdkRectangle *embedded_text_rect,
gboolean force_size,
gboolean wants_default,
char **display_name)
{
NautilusIconFactory *factory;
CacheIcon *cached_icon;
......@@ -1448,35 +1453,23 @@ nautilus_icon_factory_get_pixbuf_for_icon_internal (const char
return pixbuf;
}
GdkPixbuf *
nautilus_icon_factory_get_pixbuf_for_icon (const char *icon,
const char *modifier,
guint nominal_size,
NautilusEmblemAttachPoints *attach_points,
GdkRectangle *embedded_text_rect,
gboolean wants_default,
char **display_name)
{
return nautilus_icon_factory_get_pixbuf_for_icon_internal (icon, modifier, nominal_size, FALSE,
attach_points, embedded_text_rect,
wants_default, display_name);
}
GdkPixbuf *
nautilus_icon_factory_get_pixbuf_for_icon_force_size (const char *icon,
const char *modifier,
guint nominal_size,
NautilusEmblemAttachPoints *attach_points,
GdkRectangle *embedded_text_rect,
gboolean wants_default,
char **display_name)
nautilus_icon_factory_get_pixbuf_for_icon_with_stock_size (const char *icon,
const char *modifier,
GtkIconSize stock_size,
NautilusEmblemAttachPoints *attach_points,
GdkRectangle *embedded_text_rect,
gboolean wants_default,
char **display_name)
{
return nautilus_icon_factory_get_pixbuf_for_icon_internal (icon, modifier, nominal_size, TRUE,
attach_points, embedded_text_rect,
wants_default, display_name);
return nautilus_icon_factory_get_pixbuf_for_icon (icon, modifier,
gtk_icon_size_to_nominal_size (stock_size),
attach_points, embedded_text_rect,
TRUE /* force_size*/, wants_default,
display_name);
}
static guint
cache_key_hash (gconstpointer p)
{
......@@ -1548,11 +1541,11 @@ nautilus_get_relative_icon_size_for_zoom_level (NautilusZoomLevel zoom_level)
/* Convenience cover for nautilus_icon_factory_get_icon_for_file
* and nautilus_icon_factory_get_pixbuf_for_icon.
*/
static GdkPixbuf *
nautilus_icon_factory_get_pixbuf_for_file_internal (NautilusFile *file,
const char *modifier,
guint size_in_pixels,
gboolean force_size)
GdkPixbuf *
nautilus_icon_factory_get_pixbuf_for_file (NautilusFile *file,
const char *modifier,
guint size_in_pixels,
gboolean force_size)
{
char *icon;
GdkPixbuf *pixbuf;
......@@ -1564,11 +1557,11 @@ nautilus_icon_factory_get_pixbuf_for_file_internal (NautilusFile *file,
return NULL;
}
pixbuf = nautilus_icon_factory_get_pixbuf_for_icon_internal (icon, modifier,
size_in_pixels,
force_size,
NULL, NULL,
TRUE, NULL);
pixbuf = nautilus_icon_factory_get_pixbuf_for_icon (icon, modifier,
size_in_pixels,
NULL, NULL,
force_size,
TRUE, NULL);
g_free (icon);
......@@ -1576,25 +1569,14 @@ nautilus_icon_factory_get_pixbuf_for_file_internal (NautilusFile *file,
}
GdkPixbuf *
nautilus_icon_factory_get_pixbuf_for_file (NautilusFile *file,
const char *modifier,
guint size_in_pixels)
nautilus_icon_factory_get_pixbuf_for_file_with_stock_size (NautilusFile *file,
const char *modifier,
GtkIconSize stock_size)
{
return nautilus_icon_factory_get_pixbuf_for_file_internal (file,
modifier,
size_in_pixels,
FALSE);
}
return nautilus_icon_factory_get_pixbuf_for_file (file, modifier,
gtk_icon_size_to_nominal_size (stock_size),
TRUE); /* force_size */
GdkPixbuf *
nautilus_icon_factory_get_pixbuf_for_file_force_size (NautilusFile *file,
const char *modifier,
guint size_in_pixels)
{
return nautilus_icon_factory_get_pixbuf_for_file_internal (file,
modifier,
size_in_pixels,
TRUE);
}
/* Convenience routine for getting a pixbuf from an icon name. */
......@@ -1605,12 +1587,25 @@ nautilus_icon_factory_get_pixbuf_from_name (const char *icon_name,
gboolean force_size,
char **display_name)
{
return nautilus_icon_factory_get_pixbuf_for_icon_internal (icon_name, modifier,
size_in_pixels, force_size,
NULL, NULL,
TRUE, display_name);
return nautilus_icon_factory_get_pixbuf_for_icon (icon_name, modifier,
size_in_pixels,
NULL, NULL,
force_size, TRUE,
display_name);
}
GdkPixbuf *
nautilus_icon_factory_get_pixbuf_from_name_with_stock_size (const char *icon_name,
const char *modifier,
GtkIconSize stock_size,
char **display_name)
{
return nautilus_icon_factory_get_pixbuf_from_name (icon_name, modifier,
gtk_icon_size_to_nominal_size (stock_size),
TRUE, display_name);
}
GdkPixbuf *
nautilus_icon_factory_get_thumbnail_frame (void)
{
......
......@@ -77,12 +77,6 @@ typedef enum {
/* Maximum size of an icon that the icon factory will ever produce */
#define NAUTILUS_ICON_MAXIMUM_SIZE 320
/* Icon size to use for menus. NAUTILUS_ICON_SIZE_SMALLEST
* is a little too small and NAUTILUS_ICON_SIZE_SMALLER is
* a little too big.
*/
#define NAUTILUS_ICON_SIZE_FOR_MENUS 20
/* here's a structure to hold the emblem attach points */
#define MAX_ATTACH_POINTS 12
......@@ -133,25 +127,29 @@ GdkPixbuf *nautilus_icon_factory_get_pixbuf_for_icon (const char
guint nominal_size,
NautilusEmblemAttachPoints *attach_points,
GdkRectangle *embedded_text_rect,
gboolean force_size,
gboolean wants_default,
char **display_name);
GdkPixbuf *nautilus_icon_factory_get_pixbuf_for_icon_force_size (const char *icon,
const char *modifier,
guint nominal_size,
NautilusEmblemAttachPoints *attach_points,
GdkRectangle *embedded_text_rect,
gboolean wants_default,
char **display_name);
GdkPixbuf *nautilus_icon_factory_get_pixbuf_for_icon_with_stock_size (const char *icon,
const char *modifier,
GtkIconSize stock_size,
NautilusEmblemAttachPoints *attach_points,
GdkRectangle *embedded_text_rect,
gboolean wants_default,
char **display_name);
/* Convenience functions for the common case where you want to choose
* and render the icon into a pixbuf all at once.
*/
GdkPixbuf *nautilus_icon_factory_get_pixbuf_for_file (NautilusFile *file,
const char *modifer,
guint size_in_pixels);
GdkPixbuf *nautilus_icon_factory_get_pixbuf_for_file_force_size (NautilusFile *file,
const char *modifier,
guint size_in_pixels);
guint size_in_pixels,
gboolean force_size);
GdkPixbuf *nautilus_icon_factory_get_pixbuf_for_file_with_stock_size (NautilusFile *file,
const char *modifier,
GtkIconSize stock_size);
/* Convenience routine for getting a pixbuf from an icon name
*/
......@@ -160,6 +158,10 @@ GdkPixbuf * nautilus_icon_factory_get_pixbuf_from_name (const
guint size_in_pixels,
gboolean force_size,
char **display_name);
GdkPixbuf * nautilus_icon_factory_get_pixbuf_from_name_with_stock_size (const char *icon_name,
const char *modifer,
GtkIconSize stock_size,
char **display_name);
GtkIconTheme * nautilus_icon_factory_get_icon_theme (void);
GnomeThumbnailFactory *nautilus_icon_factory_get_thumbnail_factory (void);
......
......@@ -26,6 +26,7 @@
#include "nautilus-ui-utilities.h"
#include "nautilus-icon-factory.h"
#include <gtk/gtkenums.h>
#include <eel/eel-debug.h>
void
......@@ -135,10 +136,10 @@ nautilus_action_from_menu_item (NautilusMenuItem *item)
/* TODO: This should really use themed icons, but that
doesn't work here yet */
if (icon != NULL) {
pixbuf = nautilus_icon_factory_get_pixbuf_from_name
pixbuf = nautilus_icon_factory_get_pixbuf_from_name_with_stock_size
(icon,
NULL,
NAUTILUS_ICON_SIZE_FOR_MENUS, TRUE,
GTK_ICON_SIZE_MENU,
NULL);
if (pixbuf != NULL) {
g_object_set_data_full (G_OBJECT (action), "menu-icon",
......
......@@ -61,6 +61,7 @@
#include <gtk/gtkhbox.h>
#include <gtk/gtktoggleaction.h>
#include <gtk/gtkentry.h>
#include <gtk/gtkenums.h>
#include <gtk/gtkbindings.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
......@@ -4371,11 +4372,8 @@ add_extension_action_for_files (FMDirectoryView *view,
/* TODO: This should really use themed icons, but that
doesn't work here yet */
if (icon != NULL) {
pixbuf = nautilus_icon_factory_get_pixbuf_from_name
(icon,
NULL,
NAUTILUS_ICON_SIZE_FOR_MENUS, TRUE,
NULL);
pixbuf = nautilus_icon_factory_get_pixbuf_from_name_with_stock_size
(icon, NULL, GTK_ICON_SIZE_MENU, NULL);
if (pixbuf != NULL) {
g_object_set_data_full (G_OBJECT (action), "menu-icon",
pixbuf,
......@@ -4839,8 +4837,8 @@ add_script_to_scripts_menus (FMDirectoryView *directory_view,
tip = g_strdup_printf (_("Run \"%s\" on any selected items"), name);
launch_parameters = script_launch_parameters_new (file, directory_view);
pixbuf = nautilus_icon_factory_get_pixbuf_for_file
(file, NULL, NAUTILUS_ICON_SIZE_FOR_MENUS);
pixbuf = nautilus_icon_factory_get_pixbuf_for_file_with_stock_size
(file, NULL, GTK_ICON_SIZE_MENU);
action_name = escape_action_name (uri, "script_");
escaped_label = eel_str_double_underscores (name);
......@@ -4913,8 +4911,8 @@ add_submenu_to_directory_menus (FMDirectoryView *directory_view,
ui_manager = nautilus_window_info_get_ui_manager (directory_view->details->window);
uri = nautilus_file_get_uri (file);
name = nautilus_file_get_display_name (file);
pixbuf = nautilus_icon_factory_get_pixbuf_for_file
(file, NULL, NAUTILUS_ICON_SIZE_FOR_MENUS);
pixbuf = nautilus_icon_factory_get_pixbuf_for_file_with_stock_size
(file, NULL, GTK_ICON_SIZE_MENU);
add_submenu (ui_manager, action_group, merge_id, menu_path, uri, name, pixbuf);
add_submenu (ui_manager, action_group, merge_id, popup_path, uri, name, pixbuf);
add_submenu (ui_manager, action_group, merge_id, popup_bg_path, uri, name, pixbuf);
......@@ -5093,8 +5091,8 @@ add_template_to_templates_menus (FMDirectoryView *directory_view,
*dot = 0;
}
pixbuf = nautilus_icon_factory_get_pixbuf_for_file
(file, NULL, NAUTILUS_ICON_SIZE_FOR_MENUS);
pixbuf = nautilus_icon_factory_get_pixbuf_for_file_with_stock_size
(file, NULL, GTK_ICON_SIZE_MENU);
action_name = escape_action_name (uri, "template_");
escaped_label = eel_str_double_underscores (name);
......@@ -6267,10 +6265,8 @@ connect_proxy (FMDirectoryView *view,
if (strcmp (gtk_action_get_name (action), FM_ACTION_NEW_EMPTY_FILE) == 0 &&
GTK_IS_IMAGE_MENU_ITEM (proxy)) {
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
"gnome-fs-regular",
NAUTILUS_ICON_SIZE_FOR_MENUS,
0, NULL);
pixbuf = nautilus_icon_factory_get_pixbuf_from_name_with_stock_size
("gnome-fs-regular", NULL, GTK_ICON_SIZE_MENU, NULL);
if (pixbuf != NULL) {
image = gtk_image_new_from_pixbuf (pixbuf);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy), image);
......
......@@ -296,8 +296,8 @@ fm_list_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, int column
modifier = "visiting";
}
icon = nautilus_icon_factory_get_pixbuf_for_file_force_size (file, modifier, icon_size);
icon = nautilus_icon_factory_get_pixbuf_for_file (file, modifier, icon_size, TRUE);
g_value_set_object (value, icon);
g_object_unref (icon);
}
......@@ -326,9 +326,9 @@ fm_list_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, int column
if (emblem_icons != NULL) {
zoom_level = fm_list_model_get_zoom_level_from_emblem_column_id (column);
icon_size = nautilus_get_icon_size_for_zoom_level (zoom_level);
icon = nautilus_icon_factory_get_pixbuf_for_icon_force_size (
icon = nautilus_icon_factory_get_pixbuf_for_icon (
emblem_icons->data, NULL, icon_size,
NULL, NULL, FALSE, NULL);
NULL, NULL, TRUE, FALSE, NULL);
eel_g_list_free_deep (emblem_icons);
g_value_set_object (value, icon);
......
......@@ -410,7 +410,7 @@ get_pixbuf_for_properties_window (FMPropertiesWindow *window)
pixbuf = nautilus_icon_factory_get_pixbuf_for_icon (icon, NULL,
NAUTILUS_ICON_SIZE_STANDARD,
NULL, NULL,
TRUE, NULL);
FALSE, TRUE, NULL);
g_free (icon);
......
......@@ -35,6 +35,7 @@
#include <libnautilus-private/nautilus-file-attributes.h>
#include <libnautilus-private/nautilus-file.h>
#include <libnautilus-private/nautilus-icon-factory.h>
#include <gtk/gtkenums.h>
#include <string.h>
enum {
......@@ -244,12 +245,12 @@ tree_node_get_pixbuf_from_factory (TreeNode *node,
const char *modifier)
{
if (node->parent == NULL) {
return nautilus_icon_factory_get_pixbuf_from_name
return nautilus_icon_factory_get_pixbuf_from_name_with_stock_size
(node->icon_name, NULL,
NAUTILUS_ICON_SIZE_FOR_MENUS, TRUE, NULL);
GTK_ICON_SIZE_MENU, NULL);
}
return nautilus_icon_factory_get_pixbuf_for_file_force_size
(node->file, modifier, NAUTILUS_ICON_SIZE_FOR_MENUS);
return nautilus_icon_factory_get_pixbuf_for_file_with_stock_size
(node->file, modifier, GTK_ICON_SIZE_MENU);
}
static gboolean
......@@ -302,9 +303,9 @@ tree_node_get_emblem_pixbuf_from_factory (TreeNode *node)
eel_string_list_free (emblems_to_ignore);
if (emblem_icons != NULL) {
pixbuf = nautilus_icon_factory_get_pixbuf_for_icon
pixbuf = nautilus_icon_factory_get_pixbuf_for_icon_with_stock_size
(emblem_icons->data, NULL,
NAUTILUS_ICON_SIZE_FOR_MENUS,
GTK_ICON_SIZE_MENU,
NULL, NULL, FALSE, NULL);
} else {
pixbuf = NULL;
......
......@@ -36,6 +36,7 @@
#include <eel/eel-gnome-extensions.h>
#include <libnautilus-private/nautilus-icon-factory.h>
#include <libnautilus-private/nautilus-undo-signal-handlers.h>
#include <gtk/gtkenums.h>
#include <gtk/gtkhbbox.h>
#include <gnome.h>
#include <libgnomeui/gnome-help.h>
......@@ -933,9 +934,7 @@ repopulate (void)
bookmark = nautilus_bookmark_list_item_at (bookmarks, index);
bookmark_name = nautilus_bookmark_get_name (bookmark);
bookmark_pixbuf = nautilus_bookmark_get_pixbuf (bookmark,
NAUTILUS_ICON_SIZE_SMALLER,
TRUE);
bookmark_pixbuf = nautilus_bookmark_get_pixbuf (bookmark, GTK_ICON_SIZE_MENU);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
......
......@@ -33,6 +33,7 @@
#include <eel/eel-preferences.h>
#include <gtk/gtkcellrendererpixbuf.h>
#include <gtk/gtkcellrenderertext.h>
#include <gtk/gtkenums.h>
#include <gtk/gtkliststore.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtktreeselection.h>
......@@ -101,7 +102,7 @@ update_history (NautilusHistorySidebar *sidebar)
for (l = history; l != NULL; l = l->next) {
bookmark = nautilus_bookmark_copy (l->data);
pixbuf = nautilus_bookmark_get_pixbuf (bookmark, NAUTILUS_ICON_SIZE_FOR_MENUS, FALSE);
pixbuf = nautilus_bookmark_get_pixbuf (bookmark, GTK_ICON_SIZE_MENU);
name = nautilus_bookmark_get_name (bookmark);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
......
......@@ -112,7 +112,7 @@ add_place (GtkListStore *store, PlaceType place_type,
GdkPixbuf *pixbuf;
GtkTreeIter iter;
pixbuf = nautilus_icon_factory_get_pixbuf_from_name (icon, NULL, NAUTILUS_ICON_SIZE_FOR_MENUS, TRUE, NULL);
pixbuf = nautilus_icon_factory_get_pixbuf_from_name_with_stock_size (icon, NULL, GTK_ICON_SIZE_MENU, NULL);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
PLACES_SIDEBAR_COLUMN_ICON, pixbuf,
......
......@@ -322,7 +322,8 @@ update_icon (NautilusSidebarTitle *sidebar_title)
} else if (nautilus_icon_factory_is_icon_ready_for_file (sidebar_title->details->file)) {
pixbuf = nautilus_icon_factory_get_pixbuf_for_file (sidebar_title->details->file,
"accept",
sidebar_title->details->best_icon_size);
sidebar_title->details->best_icon_size,
FALSE);
} else if (sidebar_title->details->determined_icon) {
/* We used to know the icon for this file, but now the file says it isn't
* ready. This means that some file info has been invalidated, which
......@@ -511,7 +512,7 @@ update_emblems (NautilusSidebarTitle *sidebar_title)
(p->data, NULL,
NAUTILUS_ICON_SIZE_STANDARD,
NULL, NULL,
FALSE, NULL);
FALSE, FALSE, NULL);
if (pixbuf != NULL) {
add_emblem (sidebar_title, pixbuf);
g_object_unref (pixbuf);
......
......@@ -600,7 +600,7 @@ location_button_drag_begin_callback (GtkWidget *widget,
GdkPixbuf *pixbuf;
pixbuf = nautilus_icon_factory_get_pixbuf_for_file (NAUTILUS_WINDOW (window)->details->viewed_file,
"open", get_dnd_icon_size (window));
"open", get_dnd_icon_size (window), FALSE);
gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0);
......
......@@ -50,6 +50,7 @@
#include <libxml/parser.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkaboutdialog.h>
#include <gtk/gtkenums.h>
#include <libgnome/gnome-help.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
......@@ -168,7 +169,7 @@ nautilus_menus_append_bookmark_to_menu (NautilusWindow *window,