reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
#include "test.h"
|
|
|
|
|
|
|
|
#include <libart_lgpl/art_rgb.h>
|
2001-05-04 10:19:35 +00:00
|
|
|
#include <eel/eel-preferences.h>
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
test_init (int *argc,
|
|
|
|
char ***argv)
|
|
|
|
{
|
|
|
|
gtk_init (argc, argv);
|
|
|
|
gdk_rgb_init ();
|
|
|
|
gnome_vfs_init ();
|
reviewed by: Pavel Cisler <pavel@eazel.com>
* libnautilus-extensions/Makefile.am:
New files.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_align):
* libnautilus-extensions/nautilus-art-extensions.h:
Make the align function actually work. The previous version was
copied from GtkPixmap and i didnt realize it did not work. Remove
the padding parameters which are not really needed for alignment.
* libnautilus-extensions/nautilus-clickable-image.h:
* libnautilus-extensions/nautilus-clickable-image.c:
New class. A clickable image.
* libnautilus-extensions/nautilus-labeled-image.h:
* libnautilus-extensions/nautilus-labeled-image.c:
New class. A labeled image.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_expose_event), (image_get_pixbuf_bounds),
(image_is_smooth), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_new_solid),
(nautilus_image_set_never_smooth):
Add never smooth attribute to force behavior to match GTK+ for
cases when consistency is most important.
Update for alignment art extensions api change.
Some minor paramter name changes to lose abbreviations.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_size_request), (nautilus_label_expose_event),
(label_get_text_bounds), (label_is_smooth),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_new_solid), (nautilus_label_set_never_smooth):
Add never smooth attribute to force behavior to match GTK+ for
cases when consistency is most important.
Update for alignment art extensions api change.
Update for alignment art extensions api change.
Some minor paramter name changes to lose abbreviations.
* libnautilus-extensions/nautilus-smooth-widget.c:
(smooth_widget_get_tile_origin_point),
(nautilus_smooth_widget_get_preferred_frame):
Add some comments explaining why using 0 for ancestor offsets
works.
Fix a really dumb bug, the paddings where multiplies by 2 twice
instead of once.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-clickable-image.c: (clicked_callback),
(enter_callback), (leave_callback), (clickable_image_new), (main):
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-scrolled.c: (label_window_new_scrolled),
(label_window_new_table):
* test/test-nautilus-label-simple.c: (main):
* test/test-nautilus-label.c: (main):
* test/test-nautilus-labeled-image.c: (labeled_image_new),
(labeled_image_window_new), (labeled_image_button_window_new),
(main):
* test/test-nautilus-pixbuf-tile.c:
(pixbuf_drawing_area_expose_event),
(drawable_drawing_area_expose_event), (main):
* test/test-nautilus-preferences-change.c: (main):
* test/test.c: (test_init):
New tests for clickable and labeled images. Many updates to other
tests.
Also, changed many instances of NautilusFooDetail to
NautilusFooDetails as well as the corresponding members.
2001-02-01 10:24:58 +00:00
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_make_warnings_and_criticals_stop_in_debugger
|
2001-11-21 08:34:57 +00:00
|
|
|
(G_LOG_DOMAIN,
|
reviewed by: Pavel Cisler <pavel@eazel.com>
* libnautilus-extensions/Makefile.am:
New files.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_align):
* libnautilus-extensions/nautilus-art-extensions.h:
Make the align function actually work. The previous version was
copied from GtkPixmap and i didnt realize it did not work. Remove
the padding parameters which are not really needed for alignment.
* libnautilus-extensions/nautilus-clickable-image.h:
* libnautilus-extensions/nautilus-clickable-image.c:
New class. A clickable image.
* libnautilus-extensions/nautilus-labeled-image.h:
* libnautilus-extensions/nautilus-labeled-image.c:
New class. A labeled image.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_expose_event), (image_get_pixbuf_bounds),
(image_is_smooth), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_new_solid),
(nautilus_image_set_never_smooth):
Add never smooth attribute to force behavior to match GTK+ for
cases when consistency is most important.
Update for alignment art extensions api change.
Some minor paramter name changes to lose abbreviations.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_size_request), (nautilus_label_expose_event),
(label_get_text_bounds), (label_is_smooth),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_new_solid), (nautilus_label_set_never_smooth):
Add never smooth attribute to force behavior to match GTK+ for
cases when consistency is most important.
Update for alignment art extensions api change.
Update for alignment art extensions api change.
Some minor paramter name changes to lose abbreviations.
* libnautilus-extensions/nautilus-smooth-widget.c:
(smooth_widget_get_tile_origin_point),
(nautilus_smooth_widget_get_preferred_frame):
Add some comments explaining why using 0 for ancestor offsets
works.
Fix a really dumb bug, the paddings where multiplies by 2 twice
instead of once.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-clickable-image.c: (clicked_callback),
(enter_callback), (leave_callback), (clickable_image_new), (main):
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-scrolled.c: (label_window_new_scrolled),
(label_window_new_table):
* test/test-nautilus-label-simple.c: (main):
* test/test-nautilus-label.c: (main):
* test/test-nautilus-labeled-image.c: (labeled_image_new),
(labeled_image_window_new), (labeled_image_button_window_new),
(main):
* test/test-nautilus-pixbuf-tile.c:
(pixbuf_drawing_area_expose_event),
(drawable_drawing_area_expose_event), (main):
* test/test-nautilus-preferences-change.c: (main):
* test/test.c: (test_init):
New tests for clickable and labeled images. Many updates to other
tests.
Also, changed many instances of NautilusFooDetail to
NautilusFooDetails as well as the corresponding members.
2001-02-01 10:24:58 +00:00
|
|
|
"Bonobo",
|
|
|
|
"Gdk",
|
|
|
|
"GnomeUI",
|
|
|
|
"GnomeVFS",
|
|
|
|
"GnomeVFS-CORBA",
|
|
|
|
"GnomeVFS-pthread",
|
|
|
|
"Gtk",
|
|
|
|
"Nautilus",
|
|
|
|
"Nautilus-Authenticate",
|
|
|
|
"Nautilus-Tree",
|
|
|
|
"ORBit",
|
|
|
|
NULL);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
}
|
|
|
|
|
reviewed by: Eskil Heinous Olsen <eskil@eazel.com>
* libnautilus-extensions/nautilus-string-list.h:
* libnautilus-extensions/nautilus-string-list.c:
(nautilus_string_list_nth_as_integer),
(nautilus_self_check_string_list):
New function to get the nth string as an integer - and checks.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-font-manager.h:
* libnautilus-extensions/nautilus-font-manager.c:
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
New files. Support for collecting information about the scalable
fonts installed on the system. Parts written by Pavel Cisler.
* components/text/nautilus-text-view.c:
(nautilus_text_view_initialize):
Mark a string for translation.
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_by_family):
Take fontsets into account. Patch submitted by
eungkyu@sparcs.kaist.ac.kr.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(nautilus_preferences_item_initialize_class),
(nautilus_preferences_item_initialize), (preferences_item_destroy),
(preferences_item_construct), (preferences_item_update_enum),
(preferences_item_create_enum),
(preferences_item_update_short_enum),
(preferences_item_create_short_enum),
(preferences_item_update_boolean),
(preferences_item_create_boolean),
(preferences_item_update_editable_string),
(preferences_item_create_editable_string),
(preferences_item_update_integer),
(preferences_item_create_integer),
(preferences_item_update_font_family),
(preferences_item_create_font_family),
(nautilus_preferences_item_new),
(enum_radio_group_changed_callback),
(nautilus_preferences_item_update_displayed_value),
(update_text_settings_at_idle):
Clean this up a bit. Follow nautilus coding conventions more.
Remove long unused theme picker.
Remove unused GtkArg stuff.
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_new):
* libnautilus-extensions/nautilus-preferences-pane.h:
Remove unused pane description.
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane):
* libnautilus-extensions/nautilus-preferences-box.h:
Remove unused pane description.
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_install_defaults): Mark font name for
translation.
(global_preferences_create_dialog),
(global_preferences_create_search_pane): Remove unused pane
description.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-glyph-simple.c: (main):
* test/test-nautilus-glyph.c: (main):
* test/test-nautilus-labeled-image.c: (main):
* test/test-nautilus-smooth-text-layout.c: (main):
* test/test-nautilus-font-manager.c: (main):
* test/test.c: (test_quit):
* test/test.h:
Some minor changes. New test for font manager.
2001-03-02 09:48:29 +00:00
|
|
|
int
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
test_quit (int exit_code)
|
|
|
|
{
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Maciej Stachowiak <mjs@eazel.com>
Bugs:
6368 - Multibyte font handling in non smooth mode.
2673 - Need to hook up the new font picker to nautilus
1274 - Add support for picking a custom font
* components/history/Makefile.am:
* components/history/nautilus-history-view.c: (main):
Initialize gettext for the history component so it can display
localized strings.
* components/notes/nautilus-notes.c: (make_notes_view):
Set the notes widget font from preferences so it can be properly
localized.
* components/text/nautilus-text-view.c:
(nautilus_text_view_set_font):
Use the localized font name to make this work in locales other
than the default.
* libnautilus-extensions/Makefile.am:
Add a macro for finding data on the source tree for the situation
when 'make install' has not be run.
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_by_family): Workaround the problem
that fully qualified localized fonts were being processed
incorrectly. We simply leave them alone now.
(nautilus_font_factory_get_font_from_preferences): Use the
localized font string to make this work on more locales.
* libnautilus-extensions/nautilus-font-manager.h:
* libnautilus-extensions/nautilus-font-manager.c:
(font_description_table_find): New function to find a description
in a table.
(font_description_table_for_each): Change the return value to a
boolean to indicate whether to stop the iteration or not. Switch
the order of an assert and assigned.
(collect_fonts_from_directory): Use macros for the mime type
strings.
(font_ignore_directory): Add more directories to ignore.
(font_manager_collect_font_tables): Change prepend to append to
get fonts in a better order (fallback and user fonts first)
, (font_table_list_find),
(free_font_tables), (ensure_global_font_table),
(nautilus_font_manager_for_each_font): Use just one global table
for all fonts instead of 3.
(nautilus_font_manager_get_default_font): Compute the default
dynamically to take user choices into account. Make it work on
non installed nautilus builds.
(nautilus_font_manager_get_default_bold_font): Same as above for a
bold font.
(nautilus_font_manager_file_is_scalable_font): New function to
check that a file is really a scalable font:
(font_list_find_bold_callback), (nautilus_font_manager_get_bold),
(nautilus_font_manager_weight_is_bold): New functions to find a
bold font in the global tables.
(nautilus_self_check_font_manager): Make it work on not installed
nautilus builds and remove the hack where checks would on run for
the "ramiro" user.
* libnautilus-extensions/nautilus-font-picker.c:
(nautilus_font_picker_initialize), (font_list_find),
(font_picker_update_styles), (font_picker_populate),
(font_picker_font_changed_callback),
(font_picker_style_changed_callback), (font_find_style),
(ignore_font), (font_make_name), (font_make_style),
(global_font_list_free), (font_list_count_families),
(global_font_list_get), (global_font_list_populate_callback),
(nautilus_font_picker_get_selected_font),
(nautilus_font_picker_set_selected_font):
Make the font list global and not per widget instance. Use better
labels for the font styles. Use better labels for font names
(foundry and family vs just family depending on how many families
of the same font are found)
* libnautilus-extensions/nautilus-global-preferences.h:
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_install_font_defaults): Add new smooth font
preference for the icon container.
(nautilus_global_preferences_get_smooth_font): New function to
safely get a smooth font out of preferences.
* libnautilus-extensions/nautilus-icon-container.c:
(nautilus_icon_container_initialize): Use the localized version of
the font strings and add a FIXME for the problem of checking these
in many disparate places in nautilus.
* libnautilus-extensions/nautilus-program-chooser.c:
(program_file_pair_get_program_name_for_display): Use the
localized version of the application name strings.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize_class),
(nautilus_scalable_font_initialize),
(nautilus_scalable_font_destroy), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_default_bold_font),
(free_global_font_handle_table),
(initialize_global_stuff_if_needed),
(nautilus_scalable_font_get_rsvg_handle):
Simplify this class a lot by using the font manager. No longer
need to manage font lookup and queries.
* libnautilus-extensions/nautilus-smooth-text-layout-cache.c:
(nautilus_self_check_smooth_text_layout_cache): Fix a comment.
Dont hardcode the font family. Use the default font. Remove the
#ifdef hacker for "before make install fonts broken" problem which
is now fixed.
* src/file-manager/fm-directory-view.h:
* src/file-manager/fm-directory-view.c:
(directory_view_smooth_font_changed_callback),
(fm_directory_view_initialize), (fm_directory_view_destroy):
Add method for responding to changes in the smooth font for AA
mode of the icon container.
* src/file-manager/fm-icon-view.c:
(fm_icon_view_smooth_font_changed),
(fm_icon_view_initialize_class),
(fm_icon_view_update_icon_container_smooth_font),
(create_icon_container):
Add support for responding to change in the smooth font. Update
the icon container's smooth font on such changes.
* src/nautilus-about.c: (nautilus_about_draw_info):
Change the offset of the "Nautilus" title which broken when jsh
make glyphs render properly taking the baseline into account.
* src/nautilus-sidebar-title.c: (update_font):
Use the localized font name.
* src/nautilus-sidebar.c: (nautilus_sidebar_add_panel),
(nautilus_sidebar_remove_panel):
Use the localized sidebar tabs descriptions.
* src/nautilus-window.c: (create_view_as_menu_item):
Use the localized "View as" labels.
* test/test-nautilus-font-manager.c: (font_iterator_callback):
* test/test-nautilus-font-picker.c: (update_font),
(font_changed_update_label_callback),
(font_changed_update_file_name_callback),
(use_defalt_font_callback), (use_defalt_bold_font_callback),
(use_defalt_font_update_picker_callback),
(use_defalt_bold_font_update_picker_callback), (main):
* test/test.c: (test_quit):
Updates for changes in font manager and font picker.
2001-03-05 08:15:06 +00:00
|
|
|
//gnome_vfs_shutdown ();
|
reviewed by: Eskil Heinous Olsen <eskil@eazel.com>
* libnautilus-extensions/nautilus-string-list.h:
* libnautilus-extensions/nautilus-string-list.c:
(nautilus_string_list_nth_as_integer),
(nautilus_self_check_string_list):
New function to get the nth string as an integer - and checks.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-font-manager.h:
* libnautilus-extensions/nautilus-font-manager.c:
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
New files. Support for collecting information about the scalable
fonts installed on the system. Parts written by Pavel Cisler.
* components/text/nautilus-text-view.c:
(nautilus_text_view_initialize):
Mark a string for translation.
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_by_family):
Take fontsets into account. Patch submitted by
eungkyu@sparcs.kaist.ac.kr.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(nautilus_preferences_item_initialize_class),
(nautilus_preferences_item_initialize), (preferences_item_destroy),
(preferences_item_construct), (preferences_item_update_enum),
(preferences_item_create_enum),
(preferences_item_update_short_enum),
(preferences_item_create_short_enum),
(preferences_item_update_boolean),
(preferences_item_create_boolean),
(preferences_item_update_editable_string),
(preferences_item_create_editable_string),
(preferences_item_update_integer),
(preferences_item_create_integer),
(preferences_item_update_font_family),
(preferences_item_create_font_family),
(nautilus_preferences_item_new),
(enum_radio_group_changed_callback),
(nautilus_preferences_item_update_displayed_value),
(update_text_settings_at_idle):
Clean this up a bit. Follow nautilus coding conventions more.
Remove long unused theme picker.
Remove unused GtkArg stuff.
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_new):
* libnautilus-extensions/nautilus-preferences-pane.h:
Remove unused pane description.
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane):
* libnautilus-extensions/nautilus-preferences-box.h:
Remove unused pane description.
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_install_defaults): Mark font name for
translation.
(global_preferences_create_dialog),
(global_preferences_create_search_pane): Remove unused pane
description.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-glyph-simple.c: (main):
* test/test-nautilus-glyph.c: (main):
* test/test-nautilus-labeled-image.c: (main):
* test/test-nautilus-smooth-text-layout.c: (main):
* test/test-nautilus-font-manager.c: (main):
* test/test.c: (test_quit):
* test/test.h:
Some minor changes. New test for font manager.
2001-03-02 09:48:29 +00:00
|
|
|
|
|
|
|
if (gtk_main_level () > 0) {
|
|
|
|
gtk_main_quit ();
|
|
|
|
}
|
|
|
|
|
|
|
|
return exit_code;
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
test_delete_event (GtkWidget *widget,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer callback_data)
|
|
|
|
{
|
|
|
|
test_quit (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
test_window_new (const char *title, guint border_width)
|
|
|
|
{
|
|
|
|
GtkWidget *window;
|
|
|
|
|
|
|
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
|
|
|
|
|
|
if (title != NULL) {
|
|
|
|
gtk_window_set_title (GTK_WINDOW (window), title);
|
|
|
|
}
|
|
|
|
|
2001-11-09 02:05:53 +00:00
|
|
|
g_signal_connect (window,
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
"delete_event",
|
2001-11-06 19:14:33 +00:00
|
|
|
G_CALLBACK (test_delete_event),
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
NULL);
|
|
|
|
|
|
|
|
gtk_window_set_policy (GTK_WINDOW (window), TRUE, TRUE, FALSE);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (window), border_width);
|
|
|
|
|
|
|
|
return window;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
test_gtk_widget_set_background_image (GtkWidget *widget,
|
|
|
|
const char *image_name)
|
|
|
|
{
|
2001-04-04 00:07:15 +00:00
|
|
|
EelBackground *background;
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
char *uri;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
|
|
g_return_if_fail (image_name != NULL);
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
background = eel_get_widget_background (widget);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
|
|
|
|
uri = g_strdup_printf ("file://%s/%s", NAUTILUS_DATADIR, image_name);
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_background_set_image_uri (background, uri);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
|
|
|
|
g_free (uri);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
test_gtk_widget_set_background_color (GtkWidget *widget,
|
|
|
|
const char *color_spec)
|
|
|
|
{
|
2001-04-04 00:07:15 +00:00
|
|
|
EelBackground *background;
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
|
|
|
g_return_if_fail (color_spec != NULL);
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
background = eel_get_widget_background (widget);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_background_set_color (background, color_spec);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GdkPixbuf *
|
|
|
|
test_pixbuf_new_named (const char *name, float scale)
|
|
|
|
{
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
char *path;
|
|
|
|
|
|
|
|
g_return_val_if_fail (name != NULL, NULL);
|
|
|
|
g_return_val_if_fail (scale >= 0.0, NULL);
|
|
|
|
|
|
|
|
if (name[0] == '/') {
|
|
|
|
path = g_strdup (name);
|
|
|
|
} else {
|
|
|
|
path = g_strdup_printf ("%s/%s", NAUTILUS_DATADIR, name);
|
|
|
|
}
|
|
|
|
|
2001-10-28 20:21:52 +00:00
|
|
|
pixbuf = gdk_pixbuf_new_from_file (path, NULL);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
|
|
|
|
g_free (path);
|
|
|
|
|
|
|
|
g_return_val_if_fail (pixbuf != NULL, NULL);
|
|
|
|
|
|
|
|
if (scale != 1.0) {
|
|
|
|
GdkPixbuf *scaled;
|
|
|
|
float width = gdk_pixbuf_get_width (pixbuf) * scale;
|
|
|
|
float height = gdk_pixbuf_get_width (pixbuf) * scale;
|
|
|
|
|
|
|
|
scaled = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
|
|
|
|
|
2001-12-07 00:55:34 +00:00
|
|
|
g_object_unref (pixbuf);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (scaled != NULL, NULL);
|
|
|
|
|
|
|
|
pixbuf = scaled;
|
|
|
|
}
|
|
|
|
|
|
|
|
return pixbuf;
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
test_image_new (const char *pixbuf_name,
|
|
|
|
float scale,
|
|
|
|
gboolean with_background)
|
|
|
|
{
|
|
|
|
GtkWidget *image;
|
|
|
|
|
|
|
|
if (with_background) {
|
2001-04-04 00:07:15 +00:00
|
|
|
image = eel_image_new_with_background (NULL);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
} else {
|
2001-04-04 00:07:15 +00:00
|
|
|
image = eel_image_new (NULL);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (pixbuf_name != NULL) {
|
|
|
|
GdkPixbuf *pixbuf;
|
|
|
|
|
|
|
|
pixbuf = test_pixbuf_new_named (pixbuf_name, scale);
|
|
|
|
|
|
|
|
if (pixbuf != NULL) {
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_image_set_pixbuf (EEL_IMAGE (image), pixbuf);
|
2001-12-07 00:55:34 +00:00
|
|
|
g_object_unref (pixbuf);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return image;
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget *
|
|
|
|
test_label_new (const char *text,
|
|
|
|
gboolean with_background,
|
|
|
|
int num_sizes_larger)
|
|
|
|
{
|
|
|
|
GtkWidget *label;
|
|
|
|
|
|
|
|
if (text == NULL) {
|
|
|
|
text = "Foo";
|
|
|
|
}
|
|
|
|
|
|
|
|
if (with_background) {
|
2001-04-04 00:07:15 +00:00
|
|
|
label = eel_label_new_with_background (text);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
} else {
|
2001-04-04 00:07:15 +00:00
|
|
|
label = eel_label_new (text);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (num_sizes_larger < 0) {
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_label_make_smaller (EEL_LABEL (label), ABS (num_sizes_larger));
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
} else if (num_sizes_larger > 0) {
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_label_make_larger (EEL_LABEL (label), num_sizes_larger);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bugs 4711, 2322, 3778, 4989, 5044, 5166, 5408, 4418, 3779 (parts),
5051, 2783 and maybe other relating to (ab)use of fonts,
backgrounds and other sacred attrbiutes of Gtk themes.
* components/hardware/nautilus-hardware-view.c: (setup_form_title),
(setup_overview_form), (setup_CPU_form), (setup_RAM_form),
(setup_IDE_form):
Fix hard coded fonts.
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize),
(music_view_set_selected_song_title), (reset_playtime),
(play_status_display), (slider_moved_callback),
(add_play_controls):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-verify-window.c:
(nautilus_rpm_verify_window_initialize):
Fix hard coded fonts.
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/install/nautilus-view/nautilus-service-instal
l-view.c: (horizontal_line_new), (install_message_new),
(generate_install_form),
(nautilus_service_install_view_initialize),
(current_progress_bar_complete),
(nautilus_service_install_installing):
Fix hard coded fonts.
* components/services/login/nautilus-view/nautilus-change-password-
view.c: (generate_change_password_form), (authn_succeeded),
(authn_failed), (change_password_button_cb),
(nautilus_change_password_view_initialize):
Fix hard coded fonts. Cleanup header inclusion a bit.
* components/services/nautilus-dependent-shared/Makefile.am:
Retire some crufty code.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.c: (eazel_services_image_new),
(eazel_services_image_new_from_uri):, (eazel_services_label_new):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-exte
nsions.h:
Make the colors opaque. Remove a bunch of hard coded font stuff.
Also remove a bunch of hard coded offsets. We use alignments and
paddings instead.
* components/services/nautilus-dependent-shared/eazel-services-foot
er.c: (label_enter_event), (label_leave_event),
(image_enter_event), (footer_item_new),
(eazel_services_footer_update):
Update for label, image and hard coded font changes.
* components/services/nautilus-dependent-shared/eazel-services-head
er.c: (eazel_services_header_title_new),
(eazel_services_header_middle_new):
* components/services/nautilus-dependent-shared/shared-service-util
ities.c:
* components/services/nautilus-dependent-shared/shared-service-util
ities.h:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.c:
* components/services/nautilus-dependent-shared/shared-service-widg
ets.h:
* components/services/summary/nautilus-view/nautilus-summary-callba
cks.c:
* components/services/summary/nautilus-view/nautilus-summary-dialog
s.c: (generate_login_dialog):
* components/services/summary/nautilus-view/nautilus-summary-footer
.c:
* components/services/summary/nautilus-view/nautilus-summary-menu-i
tems.c:
* components/services/summary/nautilus-view/nautilus-summary-view-p
rivate.h:
* components/services/summary/nautilus-view/nautilus-summary-view.c
: (generate_summary_form), (generate_service_entry_row),
(generate_eazel_news_entry_row), (generate_update_news_entry_row):
Update for label, image and hard coded font changes.
* libnautilus-extensions/Makefile.am:
Add new smooth/label/image widget stuff. Retire buffered widget.
* libnautilus-extensions/nautilus-art-extensions.c:
(nautilus_art_irect_get_width), (nautilus_art_irect_get_height):
* libnautilus-extensions/nautilus-art-extensions.h:
Two new very simple functions to get the width/height of an
ArtIRect.
* libnautilus-extensions/nautilus-art-gtk-extensions.c:
(nautilus_irect_gtk_widget_get_frame):
* libnautilus-extensions/nautilus-art-gtk-extensions.h:
New simple function to get the dimensions of a widget as an
ArtIRect frame.
* libnautilus-extensions/nautilus-buffered-widget.c:
* libnautilus-extensions/nautilus-buffered-widget.h:
Retire. We dont use this no more.
* libnautilus-extensions/nautilus-customization-data.c:
(nautilus_customization_data_get_next_element_for_display):
Update for image and hard coded font changes.
* libnautilus-extensions/nautilus-debug-drawing.c:
(debug_pixbuf_viewer_initialize_class),
(debug_pixbuf_viewer_initialize), (debug_pixbuf_viewer_destroy),
(debug_pixbuf_viewer_size_request),
(debug_pixbuf_viewer_expose_event),
(debug_pixbuf_viewer_set_pixbuf),
(nautilus_debug_draw_rectangle_and_cross), (destroy_debug_window),
(nautilus_debug_show_pixbuf):
* libnautilus-extensions/nautilus-debug-drawing.h:
Back to using a widget to display the debug pixbuf. But since we
cant use NautilusImage (because we want to use this debug stuff to
debug NautilusImage itselft) we need something else. Thus a new
private and simple widget to display the debug pixbuf.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_draw_to_drawable),
(nautilus_gdk_pixbuf_draw_to_pixbuf_alpha): Fix a very dumb typo.
(draw_tile_to_pixbuf_callback),
(nautilus_gdk_pixbuf_draw_to_pixbuf_tiled),
(nautilus_gdk_pixbuf_draw_to_drawable_tiled),
(nautilus_gdk_pixbuf_get_from_window_safe):
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h:
Rename opacity macros to FULLY_OPAQUE and FULLY_TRANSPARENT for
clarity.
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Update opacity macros. Tiny update for change in font constructor.
* libnautilus-extensions/nautilus-image-with-background.h:
* libnautilus-extensions/nautilus-image-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_image_new_with_background):
Create a NautilusImage that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusImage
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-image.h:
* libnautilus-extensions/nautilus-image.c:
(nautilus_image_initialize_class), (nautilus_image_initialize),
(nautilus_image_destroy), (nautilus_image_set_arg),
(nautilus_image_get_arg), (nautilus_image_size_request),
(image_paint_pixbuf_callback), (image_composite_pixbuf_callback),
(nautilus_image_expose_event),
(nautilus_image_set_is_smooth_signal), (image_get_pixbuf_frame),
(image_get_pixbuf_bounds), (image_get_tile_frame),
(nautilus_image_new), (nautilus_image_set_is_smooth),
(nautilus_image_get_is_smooth), (nautilus_image_set_tile_pixbuf),
(nautilus_image_get_tile_pixbuf), (nautilus_image_set_pixbuf),
(nautilus_image_set_pixbuf_from_file_name),
(nautilus_image_get_pixbuf), (nautilus_image_set_pixbuf_opacity),
(nautilus_image_get_pixbuf_opacity),
(nautilus_image_set_tile_opacity),
(nautilus_image_get_tile_opacity), (nautilus_image_set_tile_width),
(nautilus_image_get_tile_width), (nautilus_image_set_tile_height),
(nautilus_image_get_tile_height),
(nautilus_image_set_tile_mode_vertical),
(nautilus_image_get_tile_mode_vertical),
(nautilus_image_set_tile_mode_horizontal),
(nautilus_image_get_tile_mode_horizontal),
(nautilus_image_set_tile_pixbuf_from_file_name),
(nautilus_image_set_background_mode),
(nautilus_image_get_background_mode),
(nautilus_image_set_solid_background_color),
(nautilus_image_get_solid_background_color),
(nautilus_image_new_solid):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honrts the the GtkMisc superclass attrbutes for alignment
and padding. The widget is a lot simpler now.
* libnautilus-extensions/nautilus-label-with-background.h:
* libnautilus-extensions/nautilus-label-with-background.c:
(find_background_ancestor), (draw_background_callback),
(nautilus_label_new_with_background):
Create a NautilusLabel that uses NautilusBackground to
draw the background. We put this in a separate file to avoid the
ugly dependency chain in NautilusBackground so that NautilusLabel
can be used by standalone components in the future.
* libnautilus-extensions/nautilus-label.h:
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_initialize_class), (nautilus_label_initialize),
(nautilus_label_destroy), (nautilus_label_set_arg),
(nautilus_label_get_arg), (nautilus_label_size_request),
(label_paint_pixbuf_callback), (label_composite_pixbuf_callback),
(nautilus_label_expose_event),
(nautilus_label_set_is_smooth_signal), (label_draw_text_to_pixbuf),
(label_get_default_line_wrap_width), (label_get_text_frame),
(label_get_text_bounds), (label_get_tile_frame), (label_peek_text),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_line_geometries_clear), (label_line_geometries_recompute),
(nautilus_label_new), (nautilus_label_set_smooth_font),
(nautilus_label_get_smooth_font),
(nautilus_label_set_smooth_font_size),
(nautilus_label_get_smooth_font_size),
(nautilus_label_set_is_smooth), (nautilus_label_get_is_smooth),
(nautilus_label_set_tile_pixbuf), (nautilus_label_get_tile_pixbuf),
(nautilus_label_set_text_opacity),
(nautilus_label_get_text_opacity),
(nautilus_label_set_tile_opacity),
(nautilus_label_get_tile_opacity), (nautilus_label_set_tile_width),
(nautilus_label_get_tile_width), (nautilus_label_set_tile_height),
(nautilus_label_get_tile_height),
(nautilus_label_set_tile_mode_vertical),
(nautilus_label_get_tile_mode_vertical),
(nautilus_label_set_tile_mode_horizontal),
(nautilus_label_get_tile_mode_horizontal),
(nautilus_label_set_tile_pixbuf_from_file_name),
(nautilus_label_set_background_mode),
(nautilus_label_get_background_mode),
(nautilus_label_set_solid_background_color),
(nautilus_label_get_solid_background_color),
(nautilus_label_set_smooth_line_wrap_width),
(nautilus_label_get_smooth_line_wrap_width),
(nautilus_label_set_text_color), (nautilus_label_get_text_color),
(nautilus_label_set_smooth_drop_shadow_offset),
(nautilus_label_get_smooth_drop_shadow_offset),
(nautilus_label_set_smooth_drop_shadow_color),
(nautilus_label_get_smooth_drop_shadow_color),
(nautilus_label_set_justify), (nautilus_label_get_text_justify),
(nautilus_label_set_text), (nautilus_label_get_text),
(nautilus_label_set_wrap), (nautilus_label_get_wrap),
(nautilus_label_new_solid), (nautilus_label_make_bold),
(nautilus_label_make_larger), (nautilus_label_make_smaller):
Fixed many problems. Properly handles rendering
on top of arbitrary Gtk backgrounds. Does not allocate a buffer
the size of the widget anymore. All rendering occurs on exposure
events. Honors the the GtkMisc superclass attrbutes for alignment
and padding. NautilusLabel is now subclassed from GtkLabel
itself. That means that the is_smooth attribute can be toggled to
make both religions happy. Support for making the label larger,
smaller and/or bold based on the current font. Renamed a lot of
methods to make it obvious that they apply only to the smooth case.
Also made the api match GtkLabel more closely. So many functions
got renamed.
* libnautilus-extensions/nautilus-radio-button-group.c:
(nautilus_radio_button_group_set_entry_pixbuf):
Tiny update for changes in the NautilusImage constructor.
* libnautilus-extensions/nautilus-scalable-font-private.h:
New file. Some private font stuff lives here. I need this
changed for a checkin that I will make later regarding improvement
of performance in the icon container smooth fonts.
* libnautilus-extensions/nautilus-scalable-font.h:
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_initialize), (font_entry_new),
(font_entry_free), (nautilus_scalable_font_new),
(nautilus_scalable_font_make_bold),
(nautilus_scalable_font_draw_text),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines),
(nautilus_scalable_font_get_default_font),
(nautilus_scalable_font_get_rsvg_handle),
(nautilus_scalable_font_get_rsvg_context),
(nautilus_text_layout_paint):
Change the constructor to return the type itself instead of
GtkObject. Some minor style tweaks. Keep track of the font entry
that was used to allocate the font. New private functions for
accessing the rsvg context and font handles. Remove an unsed
function.
* libnautilus-extensions/nautilus-smooth-widget.h:
* libnautilus-extensions/nautilus-smooth-widget.c:
(widget_is_smooth), (smooth_widget_set_is_smooth),
(preferences_get_is_smooth), (smooth_widget_destroy),
(smooth_graphics_mode_changed_callback),
(nautilus_smooth_widget_register),
(smooth_widget_get_tile_origin_point),
(smooth_widget_get_gtk_background), (smooth_widget_get_background),
(smooth_widget_paint_tile_opaque),
(smooth_widget_paint_tile_transparent),
(smooth_widget_paint_content_opaque),
(smooth_widget_paint_content_transparent),
(smooth_widget_paint_tile_and_content_transparent),
(nautilus_smooth_widget_paint),
(nautilus_smooth_widget_get_tile_bounds),
(nautilus_smooth_widget_get_preferred_frame):
Shared code between NautilusLabel and NautilusImage. ALl the code
to support smooth toggable widgets lives here. Also, keep track
of smooth widgets and toggle their is_smooth attribute in response
to nautilus smooth graphics preferences changes.
* libnautilus-extensions/nautilus-tabs.c:
(nautilus_tabs_initialize), (draw_tab_label):
Tiny update for change in font constructor. Add a FIXME for a
hard coded font issue im going to fix later. Opacity macro
update.
* src/file-manager/fm-properties-window.c:
(create_image_widget_for_file):
Using the new image widget makes this code a lot simpler. No
longer need to check smooth preference. It all happens
automatically.
* src/file-manager/nautilus-indexing-info.c:
(update_progress_display), (show_reindex_request_information),
(show_index_progress_bar), (show_indexing_info_dialog):
Fix a bunch of hard coded font issues.
* src/nautilus-about.c: (draw_aa_string),
(nautilus_about_draw_info), (nautilus_about_update_authors):
Tiny update for change in font constructor. Opacity macro
update.
* src/nautilus-first-time-druid.c: (label_new_left_justified),
(make_hbox_user_level_radio_button), (set_up_user_level_page),
(set_up_service_signup_page), (set_up_update_page),
(set_up_proxy_config_page), (set_up_update_feedback_page),
(nautilus_first_time_druid_show):
Fix a bunch of hard coded font issues. Also fix the rendering
problems with image usage inside selectable buttons.
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(set_emblem_image_from_file), (make_property_tile),
(make_properties_from_directories), (add_reset_property),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Fix hard coded fonts. Update for NautilusImage and NautilusLabel
changes.
* src/nautilus-search-bar-criterion.c:
Remove unused #include.
* src/nautilus-shell.c: (display_caveat):
Fix hard coded fonts.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data), (draw_one_tab_plain),
(draw_one_tab_themed):
Fix hard coded fonts. Opacity macros update.
* src/nautilus-sidebar-title.c:
(nautilus_sidebar_title_initialize),
(nautilus_sidebar_title_select_text_color), (update_icon),
(update_font), (update_title), (update_more_info), (add_emblem),
(sidebar_title_create_title_label),
(sidebar_title_create_more_info_label),
(smooth_graphics_mode_changed_callback):
Update for NautilusImage and NautilusLabel changes. Made the
widget a lot simpler.
We no longer need to keep track of smooth changes in the sidebar
title. They are taked care automatically by the widgets.
We no longer need to create 2 labels to honor smoothness.
NautilusLabel does it all now.
Removed a set_background() function that already
exists in nautilus-extensions.
* src/nautilus-theme-selector.c:
(nautilus_theme_selector_initialize), (set_help_label),
(exit_remove_mode):
Fix hard coded fonts.
* test/font-test.sh:
Retire. Not needed.
* test/.cvsignore:
* test/Makefile.am:
Add a bunch of tests.
* test/test.h:
* test/test.c:
Put shared test code here.
* test/test-nautilus-font-simple.c:
* test/test-nautilus-font.c:
* test/test-nautilus-image-background.c:
* test/test-nautilus-image-scrolled.c:
* test/test-nautilus-image-simple.c:
* test/test-nautilus-image-tile.c:
* test/test-nautilus-image.c:
* test/test-nautilus-label-background.c:
* test/test-nautilus-label-flavorful.c:
* test/test-nautilus-label-scrolled.c:
* test/test-nautilus-label-simple.c:
* test/test-nautilus-label-wrapped.c:
* test/test-nautilus-label.c:
* test/test-nautilus-pixbuf-tile.c:
* test/test-nautilus-smooth-graphics.c:
* test/test-nautilus-wrapped-label.c:
Some new tests. Many updates to old label and image tests.
2001-01-11 23:16:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return label;
|
|
|
|
}
|
|
|
|
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
/* Preferences hacks */
|
|
|
|
void
|
2001-04-04 00:07:15 +00:00
|
|
|
test_text_caption_set_text_for_int_preferences (EelTextCaption *text_caption,
|
2001-04-30 11:39:30 +00:00
|
|
|
const char *name)
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
{
|
|
|
|
int int_value;
|
|
|
|
char *text;
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
g_return_if_fail (EEL_IS_TEXT_CAPTION (text_caption));
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
g_return_if_fail (name != NULL);
|
|
|
|
|
2001-05-04 10:19:35 +00:00
|
|
|
int_value = eel_preferences_get_integer (name);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
|
|
|
text = g_strdup_printf ("%d", int_value);
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_text_caption_set_text (EEL_TEXT_CAPTION (text_caption), text);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
|
|
|
g_free (text);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-04-04 00:07:15 +00:00
|
|
|
test_text_caption_set_text_for_string_preferences (EelTextCaption *text_caption,
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
const char *name)
|
|
|
|
{
|
|
|
|
char *text;
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
g_return_if_fail (EEL_IS_TEXT_CAPTION (text_caption));
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
g_return_if_fail (name != NULL);
|
|
|
|
|
2001-05-04 10:19:35 +00:00
|
|
|
text = eel_preferences_get (name);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_text_caption_set_text (EEL_TEXT_CAPTION (text_caption), text);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
|
|
|
g_free (text);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-04-04 00:07:15 +00:00
|
|
|
test_text_caption_set_text_for_default_int_preferences (EelTextCaption *text_caption,
|
2001-02-12 05:55:52 +00:00
|
|
|
const char *name)
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
{
|
|
|
|
int int_value;
|
|
|
|
char *text;
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
g_return_if_fail (EEL_IS_TEXT_CAPTION (text_caption));
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
g_return_if_fail (name != NULL);
|
|
|
|
|
2001-02-12 05:55:52 +00:00
|
|
|
int_value = 0;
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
|
|
|
text = g_strdup_printf ("%d", int_value);
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_text_caption_set_text (EEL_TEXT_CAPTION (text_caption), text);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
|
|
|
g_free (text);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-04-04 00:07:15 +00:00
|
|
|
test_text_caption_set_text_for_default_string_preferences (EelTextCaption *text_caption,
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
const char *name)
|
|
|
|
{
|
|
|
|
char *text;
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
g_return_if_fail (EEL_IS_TEXT_CAPTION (text_caption));
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
g_return_if_fail (name != NULL);
|
|
|
|
|
2001-02-12 05:55:52 +00:00
|
|
|
text = g_strdup ("");
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_text_caption_set_text (EEL_TEXT_CAPTION (text_caption), text);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
|
|
|
g_free (text);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2001-04-04 00:07:15 +00:00
|
|
|
test_text_caption_get_text_as_int (const EelTextCaption *text_caption)
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
{
|
|
|
|
int result = 0;
|
|
|
|
char *text;
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
g_return_val_if_fail (EEL_IS_TEXT_CAPTION (text_caption), 0);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
text = eel_text_caption_get_text (text_caption);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_eat_str_to_int (text, &result);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
test_window_set_title_with_pid (GtkWindow *window,
|
|
|
|
const char *title)
|
|
|
|
{
|
|
|
|
char *tmp;
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_WINDOW (window));
|
|
|
|
|
Fix code that was using <ctype.h> functions and passing char's rather than
* components/help/converters/gnome-info2html2/html.c:
(write_menu_entry_html):
* components/help/converters/gnome-man2html2/gnome-man2html.c:
(add_links), (scan_escape), (scan_format), (scan_table),
(scan_expression), (scan_request), (scan_troff),
(scan_troff_mandoc), (main):
* src/nautilus-first-time-druid.c: (load_netscape_proxy_settings):
* src/nautilus-property-browser.c: (emblem_keyword_valid):
Fix code that was using <ctype.h> functions and passing char's
rather than int's (using the standard "cast to unsigned char"
trick).
* libnautilus-private/nautilus-file.c:
(nautilus_file_denies_access_permission),
(nautilus_file_can_set_permissions), (nautilus_file_set_owner),
(nautilus_file_get_group_name), (nautilus_file_can_set_group),
(nautilus_file_get_settable_group_names),
(nautilus_file_set_group):
Get rid of the assumption that GnomeVFSFileInfo field types match
the platform-specific uid_t and gid_t. This involves doing a few
more type casts.
(nautilus_extract_top_left_text): Fix a use of isprint on a char
rather than an int.
* libnautilus-private/nautilus-volume-monitor.c: Added ifdefs so
this file can compile for Solaris without warnings.
* test/test.c: (test_window_set_title_with_pid): Don't assume that
getpid() returns an int. Instead cast it to unsigned long for
printing.
2001-07-11 21:31:55 +00:00
|
|
|
tmp = g_strdup_printf ("%lu: %s", (gulong) getpid (), title);
|
reviewed by: Pavel Cisler <pavel@eazel.com>
Lots of bug fixes:
2848 - User level agnostic config settings have nowhere to live.
2654 - Need default values even for non user level preferences.
3414 - Show more preferences at higher user levels.
3415 - Make preference the same for all levels at which it is not visible
3416 - Make preference changes affect all levels at which they are visible
4357 - Web search URL setting should be reset upon Nautilus update
5160 - Tree view doesnt exist when starting nautilus as a beginner
5234 - Sidebar panel preferences are not properly separated among user levels
* components/mozilla/mozilla-preferences.cpp:
Update for gnome vfs proxy changes. Proxy host and port are now
stored in separate gconf settings.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-enumeration.h:
* libnautilus-extensions/nautilus-enumeration.c:
(nautilus_enumeration_new), (nautilus_enumeration_free),
(nautilus_enumeration_insert),
(nautilus_enumeration_get_nth_entry),
(nautilus_enumeration_get_nth_description),
(nautilus_enumeration_get_nth_value),
(nautilus_enumeration_get_num_entries),
(nautilus_self_check_enumeration):
New files. An enumeration data structure.
* components/tree/nautilus-tree-expansion-state.c:
No longer need to give the full path to a gconf setting.
* components/tree/nautilus-tree-view.c:
(filtering_changed_callback), (nautilus_tree_view_initialize):
* libnautilus-extensions/nautilus-directory-async.c:
(can_use_public_metafile),
(get_filter_options_for_directory_count):
* libnautilus-extensions/nautilus-file-operations.c:
(confirm_empty_trash):
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_should_get_top_left_text):
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_font_factory_get_font_from_preferences):
Update for preferences api changes.
* libnautilus-extensions/nautilus-gconf-extensions.h:
* libnautilus-extensions/nautilus-gconf-extensions.c:
(global_client_free), (nautilus_gconf_client_get_global),
(nautilus_gconf_handle_error), (nautilus_gconf_set_boolean),
(nautilus_gconf_get_boolean), (nautilus_gconf_set_int),
(nautilus_gconf_get_int), (nautilus_gconf_set_string),
(nautilus_gconf_get_string), (nautilus_gconf_set_string_list),
(nautilus_gconf_get_string_list), (nautilus_gconf_is_default),
(nautilus_gconf_monitor_directory):
New files. Useful gconf extensions; make peeking and poking
settings a little easier.
* libnautilus-extensions/nautilus-icon-container.c:
(button_press_event):
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(in_single_click_mode):
Update for preferences api changes.
* libnautilus-extensions/nautilus-icon-factory.c:
(icon_theme_changed_callback),
(should_display_image_file_as_itself):
Update for preferences api changes. Also no longer need to define
a default theme.
* libnautilus-extensions/nautilus-lib-self-check-functions.h:
Add entries for enumeration and preferences. Remove preference
entry. Note plural vs not.
* libnautilus-extensions/nautilus-preference.c:
* libnautilus-extensions/nautilus-preference.h:
Retire these 2. No longer use a GtkObject to store each
preference. We simply use the string name instead.
* libnautilus-extensions/nautilus-preferences-box.h:
* libnautilus-extensions/nautilus-preferences-box.c:
(nautilus_preferences_box_add_pane),
(nautilus_preferences_box_update):
New function. Should be called when user level changes so that
the box updates its panes.
* libnautilus-extensions/nautilus-preferences-dialog.h:
* libnautilus-extensions/nautilus-preferences-dialog.c:
(nautilus_preferences_dialog_initialize),
(nautilus_preferences_dialog_destroy),
(nautilus_preferences_dialog_get_prefs_box),
(nautilus_preferences_dialog_update),
(user_level_changed_callback):
Keep track of user level changes.
New function to update the dialog when user level changes.
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-group.c:
(nautilus_preferences_group_initialize),
(nautilus_preferences_group_destroy),
(nautilus_preferences_group_add_item): Collect the group's items
in a list. Update to user a string to represent a preference
instead of a GtkObject.
(nautilus_preferences_group_update): New function. Updates the
group's items to respect preferences visibility based on the user
level.
(nautilus_preferences_get_num_visible_items): New function.
Return the number of currently visible items.
Collect the group's items in a list. Update to user a string to
represent a preference instead of a GtkObject.
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-preferences-item.c:
(preferences_item_construct), (preferences_item_create_enum),
(preferences_item_create_short_enum),
(preferences_item_create_boolean),
(preferences_item_create_editable_string),
(preferences_item_create_integer),
(preferences_item_create_font_family),
(preferences_item_create_theme),
(enum_radio_group_changed_callback),
(editable_string_changed_callback), (integer_changed_callback),
(nautilus_preferences_item_get_name):
New function to fetch the item's preference name.
Add a new kind of preference - INTEGER. Update for string
vs. GtkObject preferences representation changes.
* libnautilus-extensions/nautilus-preferences-pane.h:
* libnautilus-extensions/nautilus-preferences-pane.c:
(nautilus_preferences_pane_update):
New function. Updates the pane's groups to respect preferences
visibility based on the user level.
* libnautilus-extensions/nautilus-preferences.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_get_path), (preferences_get_defaults_path),
(preferences_get_visibility_path),
(preferences_get_user_level_key),
(preferences_preference_is_internal),
(preferences_preference_is_user_level), (preferences_key_make),
(preferences_key_make_for_default),
(preferences_key_make_for_default_getter),
(preferences_key_make_for_visibility),
(preferences_global_client_remove_notification),
(preferences_global_client_get),
(preferences_preference_is_default),
(preferences_make_user_level_filtered_key),
(nautilus_preferences_get_visible_user_level),
(nautilus_preferences_set_visible_user_level),
(nautilus_preferences_set_boolean),
(preferences_key_make_for_getter),
(nautilus_preferences_get_boolean), (nautilus_preferences_set_int),
(nautilus_preferences_get_int), (nautilus_preferences_set),
(nautilus_preferences_get), (nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_get_user_level),
(nautilus_preferences_set_user_level),
(nautilus_preferences_default_set_int),
(nautilus_preferences_default_get_int),
(nautilus_preferences_default_set_boolean),
(nautilus_preferences_default_get_boolean),
(nautilus_preferences_default_set_string),
(nautilus_preferences_default_get_string),
(nautilus_preferences_default_set_string_list),
(nautilus_preferences_default_get_string_list),
(preferences_callback_entry_invoke_function),
(preferences_something_changed_notice),
(preferences_global_table_check_changes_function),
(preferences_user_level_changed_notice),
(preferences_entry_add_callback),
(preferences_entry_remove_callback),
(preferences_callback_entry_free),
(preferences_callback_entry_free_func), (preferences_entry_free),
(preferences_entry_free_func), (preferences_global_table_free),
(preferences_global_table_get_global),
(preferences_global_table_lookup),
(preferences_global_table_insert),
(preferences_global_table_lookup_or_insert),
(nautilus_preferences_add_callback),
(preferences_while_alive_disconnector),
(nautilus_preferences_add_callback_while_alive),
(nautilus_preferences_remove_callback),
(nautilus_preferences_enumeration_insert),
(nautilus_preferences_enumeration_get_nth_entry),
(nautilus_preferences_enumeration_get_nth_description),
(nautilus_preferences_enumeration_get_nth_value),
(nautilus_preferences_enumeration_get_num_entries),
(nautilus_preferences_set_description),
(nautilus_preferences_get_description),
(nautilus_preferences_get_user_level_name_for_display),
(nautilus_preferences_get_user_level_name_for_storage),
(preferences_user_level_check_range),
(nautilus_preferences_monitor_directory),
(nautilus_preferences_is_visible),
(nautilus_self_check_preferences):
Many changes. Redid to support the preferences system described
in bugs 3414, 3415 and 3416.
* libnautilus-extensions/nautilus-smooth-widget.c:
(preferences_get_is_smooth):
* libnautilus-extensions/nautilus-sound.c:
(kill_sound_if_necessary), (nautilus_sound_initialize),
(nautilus_sound_kill_sound), (nautilus_sound_register_sound),
(nautilus_sound_can_play_sound):
* libnautilus-extensions/nautilus-theme.c:
(nautilus_theme_get_theme), (nautilus_theme_get_theme_data),
(nautilus_theme_get_image_path):
Update for preferences api changes.
* libnautilus-extensions/nautilus-user-level-manager.c:
* libnautilus-extensions/nautilus-user-level-manager.h:
Retire. No longer needed. User level things are handled in
nautilus-preferences.[ch] now. The current user level design is
much simpler and does no require its own GtkObject.
* src/file-manager/fm-desktop-icon-view.c:
(update_home_link_and_delete_copies), (real_update_menus):
* src/file-manager/fm-directory-view.c: (open_location),
(confirm_delete_from_trash), (real_update_menus),
(fm_directory_view_activate_files), (filtering_changed_callback):
* src/file-manager/fm-icon-text-window.c:
(changed_attributes_option_menu_callback),
(fm_get_text_attribute_names_preference_or_default):
* src/file-manager/fm-icon-view.c: (should_preview_sound),
(fm_icon_view_update_click_mode),
(fm_icon_view_update_smooth_graphics_mode):
* src/file-manager/fm-list-view.c:
(fm_list_view_update_click_mode):
* src/file-manager/fm-properties-window.c:
(create_permissions_page):
* src/nautilus-application.c: (desktop_changed_callback):
* src/nautilus-complex-search-bar.c:
(nautilus_complex_search_bar_get_location):
* src/nautilus-first-time-druid.c: (user_level_selection_changed),
(make_hbox_user_level_radio_button), (set_up_user_level_page):
* src/nautilus-main.c: (main):
* src/nautilus-property-browser.c:
(nautilus_property_browser_update_contents):
* src/nautilus-sidebar.c: (nautilus_sidebar_sidebar_panel_enabled),
(toggle_sidebar_panel), (nautilus_sidebar_size_allocate):
* src/nautilus-switchable-search-bar.c:
(nautilus_switchable_search_bar_new),
(nautilus_search_uri_to_search_bar_mode):
Update for preferences api changes.
* src/nautilus-window-manage-views.c:
(position_and_show_window_callback),
(nautilus_window_end_location_change_callback):
Update for preferences api changes. Also, no longer need to pass
in a default location to the preferences getter.
* src/nautilus-window-menus.c: (user_level_customize_callback),
(switch_to_user_level), (refresh_bookmarks_menu),
(user_level_changed_callback), (add_user_level_menu_item),
(nautilus_window_initialize_menus), (update_user_level_menu_items),
(convert_user_level_to_path):
A lot of simplification. The "Edit Settings..." menu item no
longer changes it wording based on the user level. We know allow
it to edit settings on all user levels, since we have the ability
to hide preferences at higher user levels. No longer need to
update the preferences dialog or its title.
* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_close), (nautilus_window_go_web_search),
(nautilus_window_go_home), (nautilus_window_show):
Update for preferences api changes.
* libnautilus-extensions/nautilus-global-preferences.h:
Update all the preferences defines to not include a full gconf
path. We dont need to do this anymore to get non user level
coupled prefernces.
* libnautilus-extensions/nautilus-global-preferences.c:
(compare_view_identifiers), (global_preferences_create_dialog),
(nautilus_global_preferences_get_enabled_sidebar_panel_view_identif
iers), (global_preferences_install_sidebar_panel_defaults),
(global_preferences_is_sidebar_panel_enabled),
(global_preferences_install_speed_tradeoff_descriptions),
(register_proxy_preferences), (global_preferences_register),
(global_preferences_install_defaults),
(nautilus_global_preferences_set_dialog_title):
Lots of changes to support new preferences design.
Set the WM_CLASS here once instead of everytime the dialog title
is changed. This was causing criticals.
No longer need to create parallel proxy preferences and map them
to the gconf ones. We can use the gconf ones directly now.
* test/.cvsignore:
* test/Makefile.am:
* test/test-nautilus-preferences-change.c:
(user_level_changed_callback), (fruits_changed_callback),
(int_picker_changed_callback),
(user_level_picker_changed_callback), (picker_new),
(user_level_picker_new), (main):
* test/test-nautilus-preferences-display.c: (text_caption_update),
(user_level_caption_update), (user_level_changed_callback),
(green_changed_callback), (yellow_changed_callback),
(red_changed_callback), (apple_changed_callback),
(orange_changed_callback), (pear_changed_callback), (entry_new),
(user_level_frame_new), (colors_frame_new), (fruits_frame_new),
(main):
* test/test.c: (test_pixbuf_draw_rectangle_tiled),
(test_text_caption_set_text_for_int_preferences),
(test_text_caption_set_text_for_string_preferences),
(test_text_caption_set_text_for_default_int_preferences),
(test_text_caption_set_text_for_default_string_preferences),
(test_text_caption_get_text_as_int),
(test_window_set_title_with_pid):
* test/test.h:
New tests for preferences changes.
* test/test-nautilus-preferences.c:
Retire old prefs test which didnt really work.
* test/test-nautilus-smooth-graphics.c:
(smooth_graphics_mode_changed_callback), (main):
Update for preferences api changes.
2001-01-18 08:52:40 +00:00
|
|
|
gtk_window_set_title (GTK_WINDOW (window), tmp);
|
|
|
|
g_free (tmp);
|
|
|
|
}
|
2001-02-13 12:01:16 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
test_pixbuf_draw_rectangle_tiled (GdkPixbuf *pixbuf,
|
|
|
|
const char *tile_name,
|
|
|
|
int x0,
|
|
|
|
int y0,
|
|
|
|
int x1,
|
|
|
|
int y1,
|
|
|
|
int opacity)
|
|
|
|
{
|
|
|
|
ArtIRect area;
|
|
|
|
GdkPixbuf *tile_pixbuf;
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
g_return_if_fail (eel_gdk_pixbuf_is_valid (pixbuf));
|
2001-02-13 12:01:16 +00:00
|
|
|
g_return_if_fail (tile_name != NULL);
|
2001-04-04 00:07:15 +00:00
|
|
|
g_return_if_fail (opacity > EEL_OPACITY_FULLY_TRANSPARENT);
|
|
|
|
g_return_if_fail (opacity <= EEL_OPACITY_FULLY_OPAQUE);
|
2001-02-13 12:01:16 +00:00
|
|
|
|
|
|
|
tile_pixbuf = test_pixbuf_new_named (tile_name, 1.0);
|
|
|
|
|
|
|
|
g_return_if_fail (tile_pixbuf != NULL);
|
|
|
|
|
|
|
|
if (x0 == -1 && y0 == -1 && x1 == -1 && y1 == -1) {
|
2001-04-04 00:07:15 +00:00
|
|
|
EelDimensions dimensions;
|
|
|
|
dimensions = eel_gdk_pixbuf_get_dimensions (pixbuf);
|
2001-04-30 11:39:30 +00:00
|
|
|
area = eel_art_irect_assign_dimensions (0, 0, dimensions);
|
2001-02-13 12:01:16 +00:00
|
|
|
} else {
|
|
|
|
g_return_if_fail (x0 >= 0);
|
|
|
|
g_return_if_fail (y0 >= 0);
|
|
|
|
g_return_if_fail (x1 > x0);
|
|
|
|
g_return_if_fail (y1 > y0);
|
|
|
|
|
|
|
|
area.x0 = x0;
|
|
|
|
area.y0 = y0;
|
|
|
|
area.x1 = x1;
|
|
|
|
area.y1 = y1;
|
|
|
|
}
|
|
|
|
|
2001-04-04 00:07:15 +00:00
|
|
|
eel_gdk_pixbuf_draw_to_pixbuf_tiled (tile_pixbuf,
|
2001-04-30 11:39:30 +00:00
|
|
|
pixbuf,
|
|
|
|
area,
|
|
|
|
gdk_pixbuf_get_width (tile_pixbuf),
|
|
|
|
gdk_pixbuf_get_height (tile_pixbuf),
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
opacity,
|
|
|
|
GDK_INTERP_NEAREST);
|
2001-02-13 12:01:16 +00:00
|
|
|
|
2001-12-07 00:55:34 +00:00
|
|
|
g_object_unref (tile_pixbuf);
|
2001-02-13 12:01:16 +00:00
|
|
|
}
|