Commit 0e61a2dc authored by Darin Adler's avatar Darin Adler

Do text drawing with Pango for the anti-aliased case. Remove all use of

	* libnautilus-private/nautilus-icon-canvas-item.h:
	* libnautilus-private/nautilus-icon-canvas-item.c:
	(nautilus_icon_canvas_item_init),
	(nautilus_icon_canvas_item_finalize),
	(nautilus_icon_canvas_item_invalidate_label_size),
	(nautilus_icon_canvas_item_set_arg),
	(nautilus_icon_canvas_item_get_arg), (draw_or_measure_label_text),
	(measure_label_text), (create_label_layout), (get_label_layout),
	(draw_label_layout), (draw_or_measure_label_text_aa),
	(draw_label_text_aa), (nautilus_icon_canvas_item_class_init):
	Do text drawing with Pango for the anti-aliased case. Remove all
	use of the non-Pango Eel anti-aliased text drawing code.

	* libnautilus-private/nautilus-icon-container.h:
	* libnautilus-private/nautilus-icon-container.c: (finalize),
	(nautilus_icon_container_init),
	(nautilus_icon_container_update_icon),
	(nautilus_icon_container_set_label_font_for_zoom_level):
	* src/file-manager/fm-icon-view.c: (create_icon_container),
	(fm_icon_view_init):
	Remove the smooth-font stuff. We're going to use a single font
	once we change everything to use Pango.

	* icons/Makefile.am: Remove help-system icons.
	* icons/hyperbola-*: Remove help-system icons.
parent 62b5f12c
2001-12-17 Darin Adler <darin@bentspoon.com>
* libnautilus-private/nautilus-icon-canvas-item.h:
* libnautilus-private/nautilus-icon-canvas-item.c:
(nautilus_icon_canvas_item_init),
(nautilus_icon_canvas_item_finalize),
(nautilus_icon_canvas_item_invalidate_label_size),
(nautilus_icon_canvas_item_set_arg),
(nautilus_icon_canvas_item_get_arg), (draw_or_measure_label_text),
(measure_label_text), (create_label_layout), (get_label_layout),
(draw_label_layout), (draw_or_measure_label_text_aa),
(draw_label_text_aa), (nautilus_icon_canvas_item_class_init):
Do text drawing with Pango for the anti-aliased case. Remove all
use of the non-Pango Eel anti-aliased text drawing code.
* libnautilus-private/nautilus-icon-container.h:
* libnautilus-private/nautilus-icon-container.c: (finalize),
(nautilus_icon_container_init),
(nautilus_icon_container_update_icon),
(nautilus_icon_container_set_label_font_for_zoom_level):
* src/file-manager/fm-icon-view.c: (create_icon_container),
(fm_icon_view_init):
Remove the smooth-font stuff. We're going to use a single font
once we change everything to use Pango.
* icons/Makefile.am: Remove help-system icons.
* icons/hyperbola-*: Remove help-system icons.
2001-12-14 Seth Nickell <snickell@stanford.edu>
The programs:/ URI is now applications:/ to conform with the
......
......@@ -142,12 +142,6 @@ icon_DATA =\
hand-72.png \
hand-96.png \
home.png \
hyperbola-book-closed.png \
hyperbola-book-open.png \
hyperbola-folder-closed.png \
hyperbola-folder-open.png \
hyperbola-section-closed.png \
hyperbola-section-open.png \
i-blockdev.png \
i-bookmark-20.png \
i-bookmark-missing-20.png \
......
......@@ -78,7 +78,6 @@ const char *nautilus_icon_canvas_item_get_editable_text (NautilusIconCanv
void nautilus_icon_canvas_item_set_renaming (NautilusIconCanvasItem *icon_item,
gboolean state);
/* geometry and hit testing */
gboolean nautilus_icon_canvas_item_hit_test_rectangle (NautilusIconCanvasItem *item,
ArtIRect canvas_rect);
......@@ -87,10 +86,6 @@ gboolean nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanv
void nautilus_icon_canvas_item_invalidate_label_size (NautilusIconCanvasItem *item);
ArtDRect nautilus_icon_canvas_item_get_icon_rectangle (const NautilusIconCanvasItem *item);
void nautilus_icon_canvas_item_update_bounds (NautilusIconCanvasItem *item);
void nautilus_icon_canvas_item_set_smooth_font (NautilusIconCanvasItem *item,
EelScalableFont *font);
void nautilus_icon_canvas_item_set_smooth_font_size (NautilusIconCanvasItem *item,
int font_size);
G_END_DECLS
......
......@@ -2337,10 +2337,6 @@ finalize (GObject *object)
gdk_font_unref (details->label_font[i]);
}
if (details->smooth_label_font != NULL) {
g_object_unref (details->smooth_label_font);
}
if (details->highlight_frame != NULL) {
g_object_unref (details->highlight_frame);
}
......@@ -3374,8 +3370,6 @@ nautilus_icon_container_init (NautilusIconContainer *container)
details->label_font[NAUTILUS_ZOOM_LEVEL_LARGEST] = nautilus_font_factory_get_font_by_family ("helvetica", 18);
#endif
details->smooth_label_font = eel_scalable_font_get_default_font ();
/* These are the default font sizes. The font sizes are configurable via
* nautilus_icon_container_set_font_size_table()
*/
......@@ -3759,7 +3753,6 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container,
GList *emblem_scalable_icons, *emblem_pixbufs, *p;
char *editable_text, *additional_text;
GdkFont *font;
int smooth_font_size;
if (icon == NULL) {
return;
......@@ -3854,15 +3847,11 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container,
font = details->label_font[details->zoom_level];
smooth_font_size = details->font_size_table[details->zoom_level];
gnome_canvas_item_set (GNOME_CANVAS_ITEM (icon->item),
"editable_text", editable_text,
"additional_text", additional_text,
"font", font,
"highlighted_for_drop", icon == details->drop_target,
"smooth_font_size", smooth_font_size,
"smooth_font", details->smooth_label_font,
NULL);
nautilus_icon_canvas_item_set_image (icon->item, pixbuf);
......@@ -5027,19 +5016,6 @@ nautilus_icon_container_set_label_font_for_zoom_level (NautilusIconContainer *co
container->details->label_font[zoom_level] = font;
}
void
nautilus_icon_container_set_smooth_label_font (NautilusIconContainer *container,
EelScalableFont *font)
{
g_return_if_fail (NAUTILUS_IS_ICON_CONTAINER (container));
g_return_if_fail (EEL_IS_SCALABLE_FONT (font));
g_object_ref (font);
g_object_unref (container->details->smooth_label_font);
container->details->smooth_label_font = font;
}
void
nautilus_icon_container_set_single_click_mode (NautilusIconContainer *container,
gboolean single_click_mode)
......
......@@ -215,8 +215,6 @@ void nautilus_icon_container_set_anti_aliased_mode (Nautilu
void nautilus_icon_container_set_label_font_for_zoom_level (NautilusIconContainer *container,
int zoom_level,
GdkFont *font);
void nautilus_icon_container_set_smooth_label_font (NautilusIconContainer *container,
EelScalableFont *font);
gboolean nautilus_icon_container_get_is_fixed_size (NautilusIconContainer *container);
void nautilus_icon_container_set_is_fixed_size (NautilusIconContainer *container,
gboolean is_fixed_size);
......
......@@ -128,7 +128,6 @@ static void fm_icon_view_set_zoom_level (
gboolean always_set_level);
gboolean fm_icon_view_supports_auto_layout (FMIconView *view);
static void fm_icon_view_update_icon_container_fonts (FMIconView *icon_view);
static void fm_icon_view_update_icon_container_smooth_font (FMIconView *icon_view);
static void fm_icon_view_update_icon_container_font_size_table (FMIconView *icon_view);
static void fm_icon_view_update_click_mode (FMIconView *icon_view);
static void fm_icon_view_update_smooth_graphics_mode (FMIconView *icon_view);
......@@ -157,7 +156,6 @@ static void default_use_manual_layout_changed_callback (
static void default_zoom_level_changed_callback (gpointer callback_data);
static void default_zoom_level_font_size_changed_callback (gpointer callback_data);
static void font_changed_callback (gpointer callback_data);
static void smooth_font_changed_callback (gpointer callback_data);
static void icon_view_handle_uri_list (NautilusIconContainer *container,
const char *item_uris,
GdkDragAction action,
......@@ -2096,14 +2094,6 @@ font_changed_callback (gpointer callback_data)
fm_icon_view_update_icon_container_fonts (FM_ICON_VIEW (callback_data));
}
static void
smooth_font_changed_callback (gpointer callback_data)
{
g_return_if_fail (FM_IS_ICON_VIEW (callback_data));
fm_icon_view_update_icon_container_smooth_font (FM_ICON_VIEW (callback_data));
}
static void
default_zoom_level_font_size_changed_callback (gpointer callback_data)
{
......@@ -2377,25 +2367,6 @@ fm_icon_view_update_icon_container_font_size_table (FMIconView *icon_view)
nautilus_icon_container_request_update_all (icon_container);
}
static void
fm_icon_view_update_icon_container_smooth_font (FMIconView *icon_view)
{
NautilusIconContainer *icon_container;
EelScalableFont *scalable_font;
icon_container = get_icon_container (icon_view);
g_assert (icon_container != NULL);
scalable_font = nautilus_global_preferences_get_icon_view_smooth_font ();
g_assert (EEL_IS_SCALABLE_FONT (scalable_font));
nautilus_icon_container_set_smooth_label_font (icon_container,
scalable_font);
g_object_unref (scalable_font);
nautilus_icon_container_request_update_all (icon_container);
}
static void
fm_icon_view_update_click_mode (FMIconView *icon_view)
{
......@@ -2534,7 +2505,6 @@ create_icon_container (FMIconView *icon_view)
GTK_WIDGET (icon_container));
fm_icon_view_update_icon_container_fonts (icon_view);
fm_icon_view_update_icon_container_smooth_font (icon_view);
fm_icon_view_update_icon_container_font_size_table (icon_view);
fm_icon_view_update_click_mode (icon_view);
fm_icon_view_update_smooth_graphics_mode (icon_view);
......@@ -2772,10 +2742,6 @@ fm_icon_view_init (FMIconView *icon_view)
font_changed_callback,
icon_view,
G_OBJECT (icon_view));
eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_ICON_VIEW_SMOOTH_FONT,
smooth_font_changed_callback,
icon_view,
G_OBJECT (icon_view));
eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL_FONT_SIZE,
default_zoom_level_font_size_changed_callback,
icon_view,
......
Markdown is supported
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