mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-19 15:51:40 +00:00
16 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Ramiro Estrugo | 1f39e6b643 |
reviewed by: Mike Fleming <mfleming@eazel.com>
* libnautilus-extensions/nautilus-art-extensions.c: (nautilus_art_irect_align): * libnautilus-extensions/nautilus-art-extensions.h: New function to align a rectangle within another. * libnautilus-extensions/nautilus-image.c: (image_get_pixbuf_bounds): * libnautilus-extensions/nautilus-label.c: (label_get_text_bounds): Share more code between these two widgets by using a common alignment routine. |
||
Ramiro Estrugo | 38f9b0946c |
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. |
||
John Sullivan | a9542b9563 |
reviewed by: Rebecca Schulman <rebecka@eazel.com>
Fixed bug 4899 (Bookmark for nonexistent file can cause infinite loop at startup) Changed NautilusBookmark's internal logic so that it doesn't keep around a file object for known non-existent URIs. The trick is to get it to notice when the URI is no longer non-existent and get a fresh file object then. This is done imperfectly, but the new symptom is very minor and deferrable (wrote it up as bug 4906). * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_connect_file): Don't get a new NautilusFile object if we know the URI doesn't exist; instead just set the missing-bookmark icon. Also made it safe to call this routine when there's already a file object in hand (just bails out early). (nautilus_bookmark_get_icon), (nautilus_bookmark_get_uri): Call nautilus_bookmark_connect_file so that it will connect to a now-existing file if possible (and thus get the right icon). Since callers that try to activate the bookmark will call get_uri, one way to kick a reincarnated bookmark's icon into appearing is to select it in a menu. (nautilus_bookmark_get_pixbuf): Call nautilus_bookmark_get_icon to benefit from its connect_file logic. Fixed bug 3847 (Icon in properties window flashes while folder count increments) * libnautilus-extensions/nautilus-image.c: (nautilus_image_set_pixbuf): Don't call gtk_widget_queue_resize if the pixbuf hasn't changed. Fixed bug 1454 (Properties dialog needs mucho tweaking) Mostly this was changes to match Arlo's design that he gave me ages ago. I also fixed a few other problems. * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_date_as_string): Change format of date strings from "<date> <time>" to "<date> at <time>" to match Arlo's design. * src/file-manager/fm-properties-window.c: (attach_label): Now handles requests for a bold font. (attach_value_label): Renamed from attach_left_aligned_label, use bold font here. (attach_value_field),(attach_directory_contents_value_field): updated for name change. (attach_right_aligned_label): Removed, guts moved to caller. (attach_title_field): Use bold font here. (attach_option_menu): New helper function to share code between attach_group_menu and attach_owner_menu; now uses gtk_alignment to make the menu be minimally-sized and left-aligned. (attach_group_menu), (attach_owner_menu): Use attach_option_menu. (attach_separator): New helper function to install a separator across both columns of a properties window table. (create_basic_page): Use gtk_alignment to make the icon right-aligned; make the blank row above date rows be standard height. (create_emblems_page): Changed layout so name appears below emblem rather than to its right; this matches Customize window and allows the Properties window to be a smaller width, which looks much better for the other panes. Also, the emblems are now layed out lrtb instead of tblr. (add_permissions_column_label): Make these labels bold. (add_special_execution_flags): Attach a separator. (get_adjusted_permissions_row): Helper function to account for the "special flags" rows, which are not always displayed. (create_permissions_page): Deploy get_adjusted_permissions_row wherever a raw row number was used; insert separators. (create_properties_window): Allow window to be stretched, since the emblems don't all fit at initial window height (so user can stretch rather than scrolling if desired). |
||
Andy Hertzfeld | 94ff8a9fb1 |
` * libnautilus-extensions/nautilus-image.h: added
` * libnautilus-extensions/nautilus-image.h: added nautilus_image_new_from_file convenience routine * libnautilus-extensions/nautilus-image.c: (nautilus_image_new_from_file): implemented nautilus_image_new_from_file to make it easy to convert code that used gnome_pixmap_new_from_file to use anti-aliased images * components/hardware/nautilus-hardware-view.c: (setup_form_title), (setup_overview_form): converted the hardware view to use anti-aliased images |
||
Ramiro Estrugo | 1afc129c4f |
Change '=+' to the more common '+=' when adding integers.
* libnautilus-extensions/nautilus-image.c: (render_buffer_pixbuf): Change '=+' to the more common '+=' when adding integers. |
||
Mathieu Lacage | 8b2d11a4d5 |
This is completely useless but I needed a break from "usefull" bugs. Add
2000-11-01 Mathieu Lacage <mathieu@eazel.com> This is completely useless but I needed a break from "usefull" bugs. * applets/launcher/nautilus-launcher-applet.c: (image_leave_event), (image_button_press_event), (image_button_release_event), (main): Add an event handler for release event to make sure we launch nautilus only if you release the cursor without leaving the icon. Add an offset when you click to give the user feedback about what he is doing. * libnautilus-extensions/nautilus-image.c: (render_buffer_pixbuf): Fix offset problem when drawing image: the offset was not taken into account in the calculation of the x and y coordinates. |
||
Ramiro Estrugo | e2312c84db |
Removed. It was a bad try. Stuff is now in eazel-services-extensions.h.
* components/services/nautilus-dependent-shared/eazel-services-constants.h: Removed. It was a bad try. Stuff is now in eazel-services-extensions.h. * components/services/nautilus-dependent-shared/Makefile.am: * components/services/nautilus-dependent-shared/eazel-services-extensions.c: (pixbuf_new_from_name), (eazel_services_image_new), (eazel_services_label_new): * components/services/nautilus-dependent-shared/eazel-services-extensions.h: Add a place to put shared services extensions. * components/services/nautilus-dependent-shared/eazel-services-footer.c: (footer_item_new), (footer_remainder_new), (eazel_services_footer_update): * components/services/nautilus-dependent-shared/eazel-services-header.c: (eazel_services_header_new): * components/services/nautilus-dependent-shared/test-footer-header.c: Remove a bunch of duplicated code and put it in a shared extensions location. Make the footer real. Add an item_clicked signal to the footer. * components/services/summary/nautilus-view/nautilus-summary-view.c: Hook up the footer for item clicks. * libnautilus-extensions/nautilus-image.c: (nautilus_image_new_loaded): * libnautilus-extensions/nautilus-image.h: * libnautilus-extensions/nautilus-label.c: (nautilus_label_new_loaded): * libnautilus-extensions/nautilus-label.h: Add constructors that take a bunch of arguments for the various widgets attributes. Makes the widgets easier to use for callers that need to tweak many attributes (like eazel services). |
||
Darin Adler | 2cd5440e93 |
Fixed bug bug 3264 (Tree view shows no branches for directories,
...HACK... nodes visible), bug 3290 (changing directory or refreshing causes Gdk to assert), bug 2420 (Need to free original key when removing model node), and other assorted problems. * components/tree/nautilus-tree-view.c: (insert_hack_node), (remove_hack_node), (nautilus_tree_view_insert_model_node): Fix problem where the hash table key was neither g_strdup'd on the way in, nor g_free'd on the way out. This caused all the problems with bad nesting in the tree view. * nautilus-installer/src/installer.c: (create_pixmap): * src/file-manager/fm-list-view.c: (install_row_images): * src/nautilus-theme-selector.c: (add_theme): Added more checks for NULL before calling gdk_bitmap_unref. * src/file-manager/fm-directory-view.c: (no_items_showing): Fixed a NautilusDirectory ref. count leak. * libnautilus-extensions/nautilus-font-factory.c: (unref_global_font_factory), (nautilus_get_current_font_factory): Unref the font factory on exit. (nautilus_font_factory_initialize_class), (font_hash_node_free), (free_one_hash_node), (destroy): Added code to actually destroy the font factory. (unref_fixed_font), (nautilus_font_factory_get_fallback_font): Unref the fixed font on exit. * libnautilus-extensions/nautilus-volume-monitor.c: (unref_global_volume_monitor), (nautilus_volume_monitor_get): Unref the volume monitor on exit. * src/nautilus-signaller.c: (unref_global_signaller), (nautilus_signaller_get_current): Unref the signaller on exit. * src/nautilus-component-adapter-factory.c: (nautilus_component_adapter_factory_initialize): Replaced some strange FIXMEs with a simpler one. (nautilus_component_adapter_factory_destroy): Fix a CORBA object reference leak. (nautilus_component_adapter_factory_get): Did a ref/sink. * components/adapter/nautilus-adapter-control-embed-strategy.c: (nautilus_adapter_control_embed_strategy_new): * components/adapter/nautilus-adapter-embeddable-embed-strategy.c: (nautilus_adapter_embeddable_embed_strategy_new): * components/adapter/nautilus-adapter-file-load-strategy.c: (nautilus_adapter_file_load_strategy_new): * components/adapter/nautilus-adapter-progressive-load-strategy.c: (nautilus_adapter_progressive_load_strategy_new): * components/adapter/nautilus-adapter-stream-load-strategy.c: (nautilus_adapter_stream_load_strategy_new): * components/adapter/nautilus-adapter.c: (nautilus_adapter_new): * components/rpmview/nautilus-rpm-verify-window.c: (nautilus_rpm_verify_window_new): * components/services/install/lib/eazel-install-object.c: (eazel_install_new), (eazel_install_new_with_config): * components/services/time/service/trilobite-eazel-time-service.c: (trilobite_eazel_time_service_new): * components/services/trilobite/libtrilobite/trilobite-service-pass wordquery.c: (trilobite_passwordquery_new): * components/services/trilobite/libtrilobite/trilobite-service.c: (trilobite_service_new): * components/tree/nautilus-tree-expansion-state.c: (nautilus_tree_expansion_state_new): * components/tree/nautilus-tree-model.c: (nautilus_tree_model_new): * components/tree/nautilus-tree-node.c: (nautilus_tree_node_new): * cut-n-paste-code/widgets/e-paned/e-hpaned.c: (e_hpaned_new): * cut-n-paste-code/widgets/e-paned/e-vpaned.c: (e_vpaned_new): * libnautilus-extensions/bonobo-stream-vfs.c: (bonobo_stream_create): * libnautilus-extensions/nautilus-any-width-bin.c: (nautilus_any_width_bin_new): * libnautilus-extensions/nautilus-background.c: (nautilus_background_new): * libnautilus-extensions/nautilus-bookmark.c: (nautilus_bookmark_new_with_icon): * libnautilus-extensions/nautilus-caption-table.c: (nautilus_caption_table_new): * libnautilus-extensions/nautilus-caption.c: (nautilus_caption_new): * libnautilus-extensions/nautilus-directory.c: (nautilus_directory_new): * libnautilus-extensions/nautilus-druid-page-eazel.c: (nautilus_druid_page_eazel_new), (nautilus_druid_page_eazel_new_with_vals): * libnautilus-extensions/nautilus-druid.c: (nautilus_druid_new): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_new): * libnautilus-extensions/nautilus-file-operations-progress.c: (nautilus_file_operations_progress_new): * libnautilus-extensions/nautilus-file.c: (nautilus_file_new_from_name), (nautilus_file_new_from_info): * libnautilus-extensions/nautilus-font-picker.c: (nautilus_font_picker_new): * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_new): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_new): * libnautilus-extensions/nautilus-icon-factory.c: (get_icon_factory): * libnautilus-extensions/nautilus-image.c: (nautilus_image_new): * libnautilus-extensions/nautilus-keep-last-vertical-box.c: (nautilus_keep_last_vertical_box_new): * libnautilus-extensions/nautilus-label.c: (nautilus_label_new): * libnautilus-extensions/nautilus-list-column-title.c: (nautilus_list_column_title_new): * libnautilus-extensions/nautilus-list.c: (nautilus_list_new_with_titles): * libnautilus-extensions/nautilus-password-dialog.c: (nautilus_password_dialog_new): * libnautilus-extensions/nautilus-preference.c: (nautilus_preference_new_from_type): * libnautilus-extensions/nautilus-preferences-box.c: (nautilus_preferences_box_new): * libnautilus-extensions/nautilus-preferences-dialog.c: (nautilus_preferences_dialog_new): * libnautilus-extensions/nautilus-preferences-group.c: (nautilus_preferences_group_new): * libnautilus-extensions/nautilus-preferences-item.c: (nautilus_preferences_item_new): * libnautilus-extensions/nautilus-preferences-pane.c: (nautilus_preferences_pane_new): * libnautilus-extensions/nautilus-radio-button-group.c: (nautilus_radio_button_group_new): * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_scalable_font_new): * libnautilus-extensions/nautilus-string-picker.c: (nautilus_string_picker_new): * libnautilus-extensions/nautilus-text-caption.c: (nautilus_text_caption_new): * libnautilus-extensions/nautilus-undo-context.c: (nautilus_undo_context_new): * libnautilus-extensions/nautilus-undo-manager.c: (nautilus_undo_manager_new): * libnautilus-extensions/nautilus-user-level-manager.c: (user_level_manager_new): * libnautilus/nautilus-undo-transaction.c: (nautilus_undo_transaction_new): * libnautilus/nautilus-view.c: (nautilus_view_new_from_bonobo_control): * src/file-manager/nautilus-trash-monitor.c: (nautilus_trash_monitor_get): * src/nautilus-desktop-window.c: (nautilus_desktop_window_new): * src/nautilus-property-browser.c: (nautilus_property_browser_new): * src/nautilus-shell.c: (nautilus_shell_new): * src/nautilus-sidebar-tabs.c: (nautilus_sidebar_tabs_new): * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_new): * src/nautilus-sidebar.c: (nautilus_sidebar_create_context_menu), (nautilus_sidebar_new): * src/nautilus-theme-selector.c: (nautilus_theme_selector_new): * src/nautilus-throbber.c: (nautilus_throbber_new): * src/nautilus-view-frame.c: (nautilus_view_frame_new): * src/nautilus-zoom-control.c: (nautilus_zoom_control_new): * src/nautilus-about.c: (nautilus_about_new): * src/nautilus-application.c: (nautilus_application_new), (nautilus_application_create_window): * src/nautilus-bookmark-list.c: (nautilus_bookmark_list_new): After Tim Janik explained that gtk_type_new is a low-level call to be avoided, changed most uses of gtk_type_new to gtk_object_new or gtk_widget_new. Also, after Owen and Havoc explained that you can't just ignore the floating bit, added ref/sink calls to the functions used to create objects where we don't use the floating scheme. * src/nautilus-zoom-control.c: (nautilus_zoom_control_button_press_event): Take advantage of the fact that the new menu is floating and don't bother with ref'ing. * libnautilus-extensions/nautilus-ctree.c: (nautilus_ctree_new_with_titles): Added a cast. * components/adapter/main.c: (adapter_factory_make_object): * components/hardware/main.c: (hardware_view_make_object): * components/services/install/lib/eazel-install-corba-callback.c: (eazel_install_callback_get_type), (eazel_install_callback_new): * libnautilus-extensions/nautilus-theme.c: (nautilus_theme_get_theme), (nautilus_theme_set_theme), (nautilus_theme_get_theme_data): Whitespace tweaks. |
||
Ramiro Estrugo | db1897b9e9 |
Some dumb renamings and superfluous assertion removal.
* libnautilus-extensions/nautilus-buffered-widget.c: (nautilus_buffered_widget_initialize_class), (nautilus_buffered_widget_realize), (nautilus_buffered_widget_draw), (nautilus_buffered_widget_size_allocate), (nautilus_buffered_widget_expose_event): Some dumb renamings and superfluous assertion removal. * libnautilus-extensions/nautilus-image.c: (nautilus_image_initialize_class), (nautilus_image_draw), (nautilus_image_expose_event), (nautilus_image_paint), (nautilus_image_set_alpha_mode): Add support for two alpha rendering modes: 1) FULL, the pixbuf is composited on top of the widget's background - expensive. 2) THRESHOLD, the pixbuf is drawn with an alpha threshold without any compositing - fast but not as smooth. * libnautilus-extensions/nautilus-label.c: (render_buffer_pixbuf): Remove a dumb printf i left in before. * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_initialize), (update_icon), (nautilus_sidebar_title_hit_test_icon), (sidebar_create_smooth_components_if_needed), (sidebar_create_normal_components_if_needed), (smooth_graphics_mode_changed_callback): Use the new dual alpha support in the image class to simplify things. Create only one icon and change the alpha mode on that when the smooth graphics preference changes. Ill do the same for emblems later. |
||
Ramiro Estrugo | 4284052345 |
Add suport for a vertical and horizontal offset. Pass these on to the
* libnautilus-extensions/nautilus-buffered-widget.c: (nautilus_buffered_widget_initialize), (buffered_widget_update_pixbuf), (nautilus_buffered_widget_set_tile_pixbuf), (nautilus_buffered_get_tile_pixbuf_size), (nautilus_buffered_widget_set_horizontal_offset), (nautilus_buffered_widget_get_horizontal_offset), (nautilus_buffered_widget_set_vertical_offset), (nautilus_buffered_widget_get_vertical_offset): * libnautilus-extensions/nautilus-buffered-widget.h: Add suport for a vertical and horizontal offset. Pass these on to the pixbuf render function so that the subclasses can do stuff with them. * libnautilus-extensions/nautilus-image.c: (nautilus_image_initialize), (nautilus_image_size_request), (render_buffer_pixbuf), (nautilus_image_set_overall_alpha), (nautilus_image_set_alpha_mode), (nautilus_image_get_alpha_mode): * libnautilus-extensions/nautilus-image.h: Use the GtkMisc xpad/ypad into account when computing the requested geometry. Add preliminary support an alpha mode so that the image widget can server as a regular thresholded pixbuf display without doing the full and expensive compositing on the background. Not hooked up yet. Update for vertical/horizontal offset support. * libnautilus-extensions/nautilus-label.c: (nautilus_label_size_request), (render_buffer_pixbuf): Use the GtkMisc xpad/ypad into account when computing the requested geometry. Update for vertical/horizontal offset support. |
||
Ramiro Estrugo | 7050528710 |
Tasks: 1612, 1274, 1511 and 1588.
* libnautilus-extensions/nautilus-scalable-font.c: * libnautilus-extensions/nautilus-scalable-font.h: New GtkObject subclass that provdes a simple interface to raph's librsvg FreeType2 bases anti aliased text rendering. * libnautilus-extensions/nautilus-font-picker.c: * libnautilus-extensions/nautilus-font-picker.h: New font picker class. I will soon use it in the preferences dialog instead of the current one. * libnautilus-extensions/nautilus-buffered-widget.c: * libnautilus-extensions/nautilus-buffered-widget.h: New virtual widget class that encapsulates the details of finding a suitable background for compositing pixbufs. * libnautilus-extensions/nautilus-image.c: * libnautilus-extensions/nautilus-image.h: Rewritten NautilusImage class. Took out all the label stuff, which lives in its own class. Now subclassed from NautilusBufferedWidget so that background the image gets composited on is always correct and groks NautilusBackground. * libnautilus-extensions/nautilus-label.c: * libnautilus-extensions/nautilus-label.h: New NautilusLabel widget class. A label widget that is capable of displaying anti aliased text composited over a complex background. The background can be installed as NautilusBackground on a NautilusLabel widget or any of its ancestors. The best background will automatically be found and used by the widget. * services/nautilus-dependant-shared/shared-service-widgets.c, * services/nautilus-dependant-shared/shared-service-widgets.h, * services/startup/nautilus-view/nautilus-service-startup-view.c: Update for changes in the NautilusImage api. Unfortunately, these components are slightly broken now cause of the NautilusImage changes. I will fix them shortly. * libnautilus-extensions/nautilus-string-map.c: * libnautilus-extensions/nautilus-string-map.h: New simple class to map an arbitrary number of strings to a single string. * libnautilus-extensions/nautilus-lib-self-check-functions.h: Add tests for the new string map class. * libnautilus-extensions/Makefile.am: Build the new widgets. Also add some depedencies on the static libraries we link into this beast. This way, libnautilus-extensions will rebuild of one if its dependency static libs is touched. * test/.cvsignore, * test/Makefile.am, * test/test-nautilus-font-picker.c, * test/test-nautilus-font.c, * test/test-nautilus-image.c, * test/test-nautilus-label.c: Update test programs for new widgets. |
||
Andy Hertzfeld | c29c473271 |
made nautilus_image handle images with an alpha channel better, and
made nautilus_image handle images with an alpha channel better, and started adding "welcome package" download to the druid. Also, moved the first-time-flag setting from nautilus-application to the druid. |
||
Andy Hertzfeld | 24565e89c4 |
added a text color parameter to nautilus_gdk_pixbuf_draw_text
added a text color parameter to nautilus_gdk_pixbuf_draw_text |
||
Andy Hertzfeld | 64e7b04f00 |
fixed embedded icon text clarity (we were using helvetica 9, which wasn't
fixed embedded icon text clarity (we were using helvetica 9, which wasn't installed on many machines, and the scaled version looked hideous). Fixed by using the bigger, more commonly installed helvetica 24 font, then scaling it down using the gdk_pixbuf compositing routines, which exploit the gray-scale. |
||
Ramiro Estrugo | 75a3cb015a |
Subclass from GtkMisc instead of GtkWidget.
* libnautilus-extensions/nautilus-image.c: (nautilus_image_initialize_class), (nautilus_image_realize), (nautilus_image_unrealize), (ensure_buffer_size): * libnautilus-extensions/nautilus-image.h: Subclass from GtkMisc instead of GtkWidget. |
||
Ramiro Estrugo | f7263fbde7 |
Rename NautilusGraphic to NautilusImage everywhere.
* components/services/install/nautilus-view/nautilus-service-install- view.c: (generate_install_form), (create_image_widget), (create_title_widget), (create_middle_title_widget): * components/services/login/nautilus-view/nautilus-login-view.c: (generate_login_form), (create_image_widget), (create_title_widget): * components/services/startup/nautilus-view/nautilus-service-startup- view.c: (generate_startup_form), (create_image_widget), (generate_form_logo): * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-graphic.c: * libnautilus-extensions/nautilus-graphic.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_realize), (nautilus_image_unrealize), (nautilus_image_draw), (nautilus_image_size_allocate), (nautilus_image_size_request), (nautilus_image_map), (nautilus_image_unmap), (nautilus_image_expose), (ensure_buffer_size), (create_child_window), (nautilus_gdk_create_copy_area_gc), (nautilus_gdk_pixbuf_render_to_drawable), (nautilus_gdk_pixbuf_render_to_pixbuf), (nautilus_gdk_pixbuf_render_to_pixbuf_alpha), (gdk_string_dimensions), (nautilus_gdk_pixbuf_set_to_color), (nautilus_gdk_pixbuf_tile), (nautilus_gdk_pixbuf_tile_alpha), (nautilus_image_new), (nautilus_image_set_background_pixbuf), (nautilus_image_get_background_pixbuf), (nautilus_image_set_background_type), (nautilus_image_get_background_type), (nautilus_image_set_background_color), (nautilus_image_get_background_color), (nautilus_image_set_placement_type), (nautilus_image_get_placement_type), (nautilus_image_set_pixbuf), (nautilus_image_get_pixbuf), (nautilus_image_set_overall_alpha), (nautilus_image_set_label_text), (nautilus_image_get_label_text), (nautilus_image_set_label_font), (nautilus_image_get_label_font), (nautilus_image_set_left_offset), (nautilus_image_set_right_offset), (nautilus_image_set_top_offset), (nautilus_image_set_bottom_offset), (nautilus_image_set_extra_width), (nautilus_image_set_extra_height): * libnautilus-extensions/nautilus-image.h: * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-graphic.c: * test/test-nautilus-image.c: (create_background), (create_pixbuf), (create_image), (alpha_scale_value_changed), (red_color_value_changed), (green_color_value_changed), (blue_color_value_changed), (toggle_background_type_callback), (create_color_scale), (main): Rename NautilusGraphic to NautilusImage everywhere. |
Renamed from libnautilus-extensions/nautilus-graphic.c (Browse further)