summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* reviewed by: Arik Devens <arik@eazel.com>Ramiro Estrugo2001-02-141-0/+1
| | | | | | | | | | | * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-label.c: * libnautilus-extensions/nautilus-scalable-font.c: * libnautilus-extensions/nautilus-scalable-font.h: * libnautilus-extensions/nautilus-text-layout.c: * libnautilus-extensions/nautilus-text-layout.h: * test/test-nautilus-font.c: Move the text layout code to its own place. No real code changes.
* reviewed by: Maciej Stachowiak <mjs@eazel.com>Ramiro Estrugo2001-02-138-298/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-glyph.h: * libnautilus-extensions/nautilus-glyph.c: New class. A wrapper on RsvgGlyph that makes it simple and fast to draw smooth text on pixbufs * libnautilus-extensions/nautilus-clickable-image.c: (nautilus_clickable_image_initialize_class), (nautilus_clickable_image_realize): Remove unrealize() method that was a noop. * libnautilus-extensions/nautilus-debug-drawing.c: (nautilus_debug_pixbuf_draw_point), (nautilus_debug_pixbuf_draw_rectangle), (nautilus_debug_pixbuf_draw_rectangle_inset): * libnautilus-extensions/nautilus-debug-drawing.h: Add some pixbuf drawing functions to debug clip areas in pixbufs. * libnautilus-extensions/nautilus-image-table.c: (nautilus_image_table_initialize_class), (nautilus_image_table_remove): Remove add() method that was a noop. * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-font-simple.c: (main): * test/test-nautilus-font.c: (main): * test/test-nautilus-glyph-simple.c: (glyph_new), (main): * test/test-nautilus-glyph.c: (glyph_new), (main): * test/test.c: (test_window_set_title_with_pid), (test_pixbuf_draw_rectangle_tiled): * test/test.h: New NautilusGlyph tests. Also remove the broken pixbuf drawing debug code. Use the debugging code in nautilus-debug-drawing.[ch] instead.
* reviewed by: Darin Adler <darin@eazel.com>Ramiro Estrugo2001-02-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (while_realized_disconnecter), (nautilus_gtk_signal_connect_while_realized): New function to connect to a signal of an object while a widget is realized. (while_realized_disconnecter): Changed signature to be void - no need to return a value here. As such, the GTK_SIGNAL_FUNC casts are no longer needed. * libnautilus-extensions/nautilus-clickable-image.c: (nautilus_clickable_image_realize), (nautilus_clickable_image_unrealize): Use nautilus_gtk_signal_connect_while_realized so that we dont have to keep track of the signal ids and ancestor widget. * libnautilus-extensions/nautilus-image-table.c: (nautilus_image_table_realize), (nautilus_image_table_unrealize): Use nautilus_gtk_signal_connect_while_realized so that we dont have to keep track of the signal ids and ancestor widget. * test/test-nautilus-clickable-image.c: (main): Add a windowed ancestor inbetween in order to test nautilus_gtk_signal_connect_while_realized.
* New NautilusWrapTable test.Ramiro Estrugo2001-02-123-4/+104
| | | | | | | * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-wrap-table.c: (main): New NautilusWrapTable test.
* A tiny bit more debug code.Ramiro Estrugo2001-02-123-9/+31
| | | | | | | * test/test-nautilus-clickable-image.c: (main): * test/test-nautilus-labeled-image.c: (button_callback), (labeled_image_button_window_new): A tiny bit more debug code.
* reviewed by: Robey Pointer <robey@eazel.com>Ramiro Estrugo2001-02-101-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-region.c: * libnautilus-extensions/nautilus-region.h: New class for super easy region management using rectangle. * libnautilus-extensions/nautilus-art-gtk-extensions.h: * libnautilus-extensions/nautilus-art-gtk-extensions.c: (nautilus_gdk_rectangle_assign_irect): New function to convert ArtIRect to GdkRectangles. * libnautilus-extensions/nautilus-customization-data.h: * libnautilus-extensions/nautilus-customization-data.c: (nautilus_customization_data_get_next_element_for_display): Return pixbufs and labels for the object instead of widgets. This is so that the caller can use the widget that best suits its display needs. * libnautilus-extensions/nautilus-image-table.h: * libnautilus-extensions/nautilus-image-table.c: (nautilus_image_table_initialize_class), (nautilus_image_table_initialize), (nautilus_image_table_expose_event), (nautilus_image_table_realize), (nautilus_image_table_unrealize), (nautilus_image_table_set_is_smooth_signal), (image_table_foreach_child_subtract_content), (image_table_clear_dirty_areas), (image_table_peek_clear_gc), (image_table_emit_signal), (image_table_handle_motion), (ancestor_button_press_event), (ancestor_button_release_event), (nautilus_image_table_new), (nautilus_image_table_set_is_smooth), (nautilus_image_table_set_smooth_background_color): Add support for smoothnes. Register widget as a possible smooth widget. When smoothness changes, we modify our background drawing behavior such that in smooth mode we dont flicker at all. Remove grab/ungrab pair that could screw up operations. Turns out these are not needed. Change event signal emissions to include more data from the raw gdk events without exposing these. * libnautilus-extensions/nautilus-image.c: (nautilus_image_initialize_class): Update for new smooth widget class registration scheme. * libnautilus-extensions/nautilus-label.c: (nautilus_label_initialize_class): Update for new smooth widget class registration scheme. * libnautilus-extensions/nautilus-labeled-image.h: * libnautilus-extensions/nautilus-labeled-image.c: (nautilus_labeled_image_size_allocate), (nautilus_labeled_image_get_image_bounds), (nautilus_labeled_image_get_label_bounds): Make these two functions public. * libnautilus-extensions/nautilus-smooth-widget.h: * libnautilus-extensions/nautilus-smooth-widget.c: (smooth_widget_type_list_free), (smooth_widget_list_free), (widget_is_smooth), (nautilus_smooth_widget_register), (nautilus_smooth_widget_register_type): Add mechanism for registering types that are meant to be smooth. That way we dont need to hardcode the list of smooth widget classes. Also made sure to free the static lists at exit time. * libnautilus-extensions/nautilus-viewport.h: * libnautilus-extensions/nautilus-viewport.c: (nautilus_viewport_initialize_class), (nautilus_viewport_initialize), (nautilus_viewport_destroy), (nautilus_viewport_draw), (nautilus_viewport_expose_event), (nautilus_viewport_realize), (nautilus_viewport_paint), (nautilus_viewport_set_is_smooth_signal), (nautilus_viewport_new), (nautilus_viewport_set_is_smooth), (nautilus_viewport_get_scroll_offset): Add support for smoothness. When the is_smooth attribute changes, the viewport will not clear the background on resize - and so its content will not flicker. Add function for querying the scroll offset. * libnautilus-extensions/nautilus-wrap-table.h: * libnautilus-extensions/nautilus-wrap-table.c: (wrap_table_get_content_frame), (wrap_table_get_scroll_offset), (nautilus_wrap_table_get_homogeneous), (nautilus_wrap_table_reorder_child): Fix a mod by zero error. Add support for reordering children. * src/file-manager/fm-properties-window.c: (create_emblems_page): Simplify a bit by using NautilusWrapTable instead of a GtkTable with a hard coded number of columns. The emblems now wrap to fit the available space. Also use NautilusLabeledImages instead of boxes. Update for changes in customization data api. Remove check box painting workaround. Its taken care of in NautilusLabeledImage now. * src/nautilus-property-browser.c: (nautilus_property_browser_initialize_class), (nautilus_property_browser_initialize), (element_clicked_callback), (nautilus_property_browser_preferences_changed), (make_property_tile), (make_properties_from_directories), (add_reset_property), (make_properties_from_xml_node), (property_browser_category_button_new), (make_category_link), (nautilus_property_browser_update_contents), (emit_emblems_changed_signal): Use a NautilusImageTable instead of a GtkTable to make things wrap propertly and thus not have to recreate the whole property box each time its resized. Remove a lot of hard coded dimensions. Simplified a bit by using NautilusLabeledImages. * src/nautilus-search-bar-criterion.c: (make_emblem_value_menu): Update for changes in customization data api. * test/test-nautilus-image-table.c: (labeled_image_new), (foo_timeout), (image_table_size_allocate), (image_table_new_scrolled): Update for new image table features.
* reviewed by: Mike Fleming <mfleming@eazel.com>Ramiro Estrugo2001-02-083-0/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minus the 2 new widgets. * libnautilus-extensions/Makefile.am: New files. * libnautilus-extensions/nautilus-labeled-image.h: * libnautilus-extensions/nautilus-labeled-image.c: (button_leave_callback), (button_focus_out_event_callback), (nautilus_labeled_image_check_button_new): Add workaround for rendering problems with GtkCheckButton. (nautilus_labeled_image_set_label_never_smooth): New function to make the label part possibly never smooth. * libnautilus-extensions/nautilus-clickable-image.h: * libnautilus-extensions/nautilus-clickable-image.c: (ancestor_button_press_event), (ancestor_button_release_event), (nautilus_clickable_image_new), (nautilus_clickable_image_new_from_file_name): New function to create clickable images from image files. Add grab/ungrab calls to match the logic in GtkButton. * libnautilus-extensions/nautilus-wrap-table.h: * libnautilus-extensions/nautilus-wrap-table.c: New class. * libnautilus-extensions/nautilus-image-table.c: * libnautilus-extensions/nautilus-image-table.h: New class. * test/test-nautilus-image-table.c: * test/.cvsignore: * test/Makefile.am: Image table test.
* reviewed by: Maciej Stachowiak <mjs@eazel.com>Ramiro Estrugo2001-02-021-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug 6131 - NautilusLabel does not support proper line wrap. Its fixed for smooth mode. Theres a bug (6243) for the more complicated issue of wrapping in non smooth mode. * libnautilus-extensions/nautilus-label.h: * libnautilus-extensions/nautilus-label.c: (nautilus_label_initialize_class), (nautilus_label_set_arg), (nautilus_label_get_arg), (nautilus_label_size_allocate), (nautilus_label_set_never_smooth), (nautilus_label_set_adjust_wrap_on_resize), (nautilus_label_get_adjust_wrap_on_resize): Add a boolean attribute 'adjust_wrap_on_resize' that controls whether the label will automatically update its line wrap width when its resized. * components/services/summary/nautilus-view/nautilus-summary-view.c : (summary_view_item_label_new), (summary_load_location_callback): No longer need size_allocate hack. Use NautilusLabel's 'adjust_wrap_on_resize' attribute instead. * test/test-nautilus-label-wrapped.c: (create_nautilus_label), (create_gtk_label_window), (create_nautilus_label_window), (main): Update for 'adjust_wrap_on_resize'.
* reviewed by: Maciej Stachowiak <mjs@eazel.com>Ramiro Estrugo2001-02-021-3/+3
| | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_install_defaults), (global_preferences_install_visibility), (global_preferences_install_sidebar_panel_defaults): * libnautilus-extensions/nautilus-preferences.c: (nautilus_preferences_get_user_level): * libnautilus-extensions/nautilus-preferences.h: * src/nautilus-first-time-druid.c: (set_up_user_level_page): * src/nautilus-window-menus.c: (get_user_level_icon_name), (nautilus_window_initialize_menus), (convert_verb_to_user_level), (convert_user_level_to_path): * test/test-nautilus-preferences-change.c: (main): Change 'hacker' to 'advanced' for the advanced user level so that the names used for storage match those used for display.
* reviewed by: Darin Adler <darin@eazel.com> andMaciej Stachowiak2001-02-022-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Robey Pointer <robey@eazel.com> Fix bugs 5528 (oaf command-line options show up in main program section, not a separate section) and 5510 (descriptions of OAF-specific options in --help are not translated). To do this I had to change the way the oaf popt options are processed in all the places that do so. * components/adapter/main.c: (main): * components/hardware/main.c: (main): * components/help/hyperbola-main.c: (main): * components/image-viewer/Nautilus_View_image.oaf.in: * components/image-viewer/nautilus-image-view.c: (init_server_factory): * components/loser/content/main.c: (main): * components/loser/sidebar/main.c: (main): * components/mozilla/main.c: (main): * components/music/main.c: (main): * components/notes/nautilus-notes.c: (main): * components/rpmview/main.c: (main): * components/services/install/command-line/eazel-alt-install-corba. c: (main): * components/services/install/nautilus-view/main.c: (main): * components/services/login/nautilus-view/main.c: (main): * components/services/summary/nautilus-view/main.c: (main): * components/services/time/command-line/main.c: (main): * components/services/time/nautilus-view/main.c: (main): * components/services/trilobite/libtrilobite/trilobite-core-utils.c : (trilobite_init): * components/shell/shell.c: * components/text/Nautilus_View_text.oaf.in: * components/text/main.c: (main): * components/throbber/main.c: (main): * components/tree/main.c: (main): * libnautilus/nautilus-view-standard-main.c: (nautilus_view_standard_main_multi): * src/Nautilus_shell.oaf.in: * src/nautilus-main.c: (main): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Register oaf options with gnomelib_register_popt_options and move oaf_init call to before gnome_init to fix the aforementioned bugs.
* reviewed by: Pavel Cisler <pavel@eazel.com>Ramiro Estrugo2001-02-0111-414/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Add an example of how to do dynamic wrapping.Ramiro Estrugo2001-01-301-1/+17
| | | | | | * test/test-nautilus-label-wrapped.c: (size_allocate_callback), (create_nautilus_label): Add an example of how to do dynamic wrapping.
* Fix bugs 4094, 4425, 5201 and 4106 about inappopriate applications beingRebecca Schulman2001-01-261-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-27 Rebecca Schulman <rebecka@eazel.com> Fix bugs 4094, 4425, 5201 and 4106 about inappopriate applications being offered to view remote files. This change filters applications that don't support a uri scheme from a file's short list. reviewed by: Pavel Cisler <pavel@eazel.com> * libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_actions_get_minimum_file_attributes), (nautilus_mime_get_short_list_applications_for_file), (application_supports_uri_scheme): Filter out applications from the short list that do not support the uri scheme for the file in question. * libnautilus-extensions/nautilus-program-choosing.c: (nautilus_launch_application): Change "can_open_uris" to "expects_uris" to go along with the gnome vfs change * test/test-nautilus-mime-actions.c: (append_comma_and_scheme), (format_supported_uri_schemes_for_display), (print_application): update the tests similarly to the way the gnome-vfs tests were updated, so that all of the fields of the GnomeVFSMimeApplication structure are correctly printed. * libnautilus-extensions/nautilus-glib-extensions.c: Correct spelling and naming error in a comment
* reviewed by: John Sullivan <sullivan@eazel.com>Darin Adler2001-01-261-25/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some preparation work for doing async. activation. This amounts to another pass cleaning up the legendary "state machine" as well as some other cleanups in the async. activation code. * libnautilus-extensions/nautilus-bonobo-extensions.h: * libnautilus-extensions/nautilus-bonobo-extensions.c: (oaf_activation_callback), (nautilus_bonobo_activate_from_id), (nautilus_bonobo_activate_cancel): Fix interface of activation to be cleaner. Also handle case where callback is called right away. Add queuing to NautilusView so that all incoming CORBA calls are dispatched at idle time. This can fix some otherwise-difficult re-entrancy problems. The widget destroy call can still come in at any time though. Also this same fix may be needed for the NautilusViewFrame side. * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (execute_queued_calls): Function to dequeue and execute calls. (dequeue_calls_at_idle): Cover to call it at idle time. (discard_queued_calls): Discard calls without executing them, for use at destroy time. (queue_incoming_call): Simple cover to queue and schedule an idle-time dequeue pass. (nautilus_g_list_from_uri_list): Need to make a full copy, not a shallow copy, now that we are queuing things for a hile. (call_load_location), (call_stop_loading), (call_selection_changed), (call_title_changed), (call_history_changed): Simple functions that get queued. (list_deep_free_cover): GDestroyNotify-compatible function for one destroy case. (history_dup): Function to copy the history list, since that is now queued instead of used right away. (impl_Nautilus_View_load_location), (impl_Nautilus_View_stop_loading), (impl_Nautilus_View_selection_changed), (impl_Nautilus_View_title_changed), (impl_Nautilus_View_history_changed): Change these all to queue the incoming call instead of doing work right away. (nautilus_view_destroy): Discard the queue. * src/nautilus-view-frame-corba.c: (impl_Nautilus_ViewFrame_open_location_force_new_window), (impl_Nautilus_ViewFrame_report_selection_change): These calls now use the deep copy, since the shallow one is no longer available. This is good since we probably will be doing queuing here later, so we'll need the deep copy. * src/nautilus-view-frame.h: * src/nautilus-view-frame.c: (nautilus_view_frame_initialize_class): Set up a map default signal handler to activate the control. This is better than the old way, where we had an explicit call to do it. (nautilus_view_frame_destroy_client): Remove unused CORBA_Environment. (view_frame_activated): Remove unneeded ACTIVATING state. Also send the client_loaded signal in here, so you can't "forget". (view_frame_wait), (view_frame_underway), (view_frame_wait_is_over), (view_frame_loaded), (view_frame_failed): Remove unneeded ACTIVATING state. (check_if_view_is_gone): Simplify logic and make sure to check the value of the exception and not just the function result. (attach_client): Fix CORBA_Exception that was allocated twice and that could also be allocated and not freed in some cases. (activation_callback), (nautilus_view_frame_load_client_async): Better names, use new API, still not tested. (nautilus_view_frame_load_client): Get rid of function result and use unified interface for telling about success and failure so that sync. and async. interfaces will be the same. (nautilus_view_frame_stop): Renamed this single function, which will soon stop either activation that's in process or loading that's in process with a single call. For now it's just the same as the old stop_loading call. (nautilus_view_frame_map): New override to activate the control. This replaces the old explicit activate call. (send_history), (nautilus_view_frame_get_is_underway): Remove unneeded ACTIVATING state. * src/nautilus-window.h: * src/nautilus-window-manage-views.c: (location_has_really_changed): Assume that new_content_view is not NULL. The old code was trying to be inappropriately "general". (disconnect_destroy_unref_view): Remove now-unused function. (load_content_view): Don't use a return value any more, since it's important to set up new_content_view before any signals happen. Get rid of code that handles failure right at the start, since we now get all failures through the signal handler. (handle_view_failure): Add FIXME comments. Minor refactoring. (cancel_location_change): Eliminated now-uneeded views_shown and view_bombed_out booleans. (load_view_for_new_location): New load_content_view doesn't return a value any more. (update_state): Changed this to be a loop instead of returning a boolean and always being called in a loop. Also simplified logic so that views_shown and view_bombed_out aren't needed any more. (nautilus_window_end_location_change_callback): Use update_state directly instead of calling the old clunky change_state cover. (nautilus_window_begin_location_change): Use update_state directly instead of calling the old clunky change_state cover. (stop_loading): Call the new simple nautilus_view_frame_stop instead of nautilus_view_frame_stop_loading. (natuilus_window_stop_loading): Use update_state directly instead of calling the old clunky change_state cover. (nautilus_window_set_content_view): Use update_state directly instead of calling the old clunky change_state cover. (nautilus_window_set_sidebar_panels): Handle failures with callback instead of looking at return value (which no longer exists). (client_loaded_callback): Add this new callback that's done when the view is activated and ready to go. (failed_callback): Use update_state directly instead of calling the old clunky change_state cover. (load_underway_callback): Use update_state directly instead of calling the old clunky change_state cover. (load_complete_callback): Use update_state directly instead of calling the old clunky change_state cover. * src/nautilus-window.c: (nautilus_window_set_content_view_widget): Get rid of explicit activation, no longer needed now that NautilusViewFrame handles it directly. * test/test-nautilus-async-activation.c: (activation_callback), (main): Change to use new async. API. * user-guide/gnufdl/.cvsignore: Add to ignore some missing files.
* reviewed by: Pavel Cisler <pavel@eazel.com>Darin Adler2001-01-191-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | (only the first 2 changes, others unreviewed) * libnautilus-extensions/nautilus-trash-directory.c: (trash_destroy): Fix problem that might be what's killing the Tinderbox. We need to disconnect the signal handlers we add to the trash monitor. * src/file-manager/fm-directory-view.c: (load_location_callback): Always reload when navigating. This smooths over many anomalies, and hopefully will fix the nasty problems described in bug 4873 (files created in home directory (outside Nautilus) don't show up when I navigate there) and bug 4963 (starting the search service while running nautilus doesn't let you run searches). * configure.in: Fix gnome-http check that was previously just checking whether gnome-config was there or not! * src/nautilus-application.c: (nautilus_application_startup): Replace incorrect references to nautilus.oafinfo to instead mention Nautilus_Shell.oaf. * test/.cvsignore: Add a generated file.
* reviewed by: Pavel Cisler <pavel@eazel.com>Ramiro Estrugo2001-01-188-167/+658
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* reviewed by: Gene Ragan <gzr@eazel.com>Darin Adler2001-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-file-operations.c: (get_label_font): It's illegal to unref a new widget since you don't own a ref to it. Sink it instead. (ellipsize_string_for_dialog): New function. (format_and_ellipsize_uri_for_dialog): Rename this function and change it to use nautilus_format_uri_for_display. Also add FIXME about where the ellipsis goes. (extract_and_ellipsize_file_name_for_dialog): Added a seprate function for the case where we want to extract the file name part only. The old code mixed the URI and file name cases in a way that would lead to anomalies with unusual names. (handle_transfer_vfs_error): Fixed storage leak. (is_special_link): Rewrote this function and also made it take a URI in text form, not a GnomeVFSURI. (handle_transfer_overwrite): Use is_special_link instead of duplicate its test. Removed incorrect use of NautilusFile (without waiting for results). Added quotes around file name in message. Use extract_and_ellipsize_file_name_for_dialog instead of our own ad-hoc functions. (make_next_duplicate_name): Get rid of bizarre buffer/sprintf that was used by someone who didn't know you can use printf formatting with g_warning. (vfs_uri_is_special_link): Created cover for one remaining caller of is_special_link that needs to pass a GnomeVFSURI. (nautilus_file_operations_copy_move): Use the new is_special_link (nautilus_file_operations_move_to_trash): Use extract_and_ellipsize_file_name_for_dialog instead of an old strange combination of calls. * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_regular_file): Fix obsolete comment and rearrange code now that plain text special case is gone.
* Add a test for debugging bug 5608.Ramiro Estrugo2001-01-124-0/+83
| | | | | | | | | * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-label-offset.c: (main): * test/test.h: Add a test for debugging bug 5608.
* added test/test.h to EXTRA_DISTRobin Slomkowski2001-01-121-0/+4
| | | | * test/Makefile.am: added test/test.h to EXTRA_DIST
* reviewed by: Pavel Cisler <pavel@eazel.com>Ramiro Estrugo2001-01-1120-339/+2289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* reviewed by: Pavel Cisler <pavel@eazel.com>Ramiro Estrugo2000-12-221-27/+3
| | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-icon-canvas-item.c: (draw_or_measure_label_text_aa): * libnautilus-extensions/nautilus-icon-factory.c: (embed_text): * libnautilus-extensions/nautilus-label.c: (render_buffer_pixbuf): * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_scalable_font_draw_text), (nautilus_scalable_font_draw_text_lines_with_dimensions), (nautilus_scalable_font_draw_text_lines), (nautilus_text_layout_paint), (nautilus_gdk_pixbuf_new_from_text): * libnautilus-extensions/nautilus-scalable-font.h: * libnautilus-extensions/nautilus-tabs.c: (draw_tab_label): * src/nautilus-about.c: (draw_aa_string): * src/nautilus-sidebar-tabs.c: (draw_one_tab_plain), (draw_one_tab_themed): * test/test-nautilus-font.c: (main): Lost the "inverted" feature of smooth text drawing. It wasnt used anywhere except a test program. It never looked well and the nautilus icon container does something unrelated to select text. Also replace some hard coded 255 opacity values to use the NAUTILUS_OPACITY_NONE define.
* reviewed by: <delete if not using a buddy>Ramiro Estrugo2000-12-201-1/+3
| | | | | | | | | | | | | | | | * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-debug-drawing.h: * libnautilus-extensions/nautilus-debug-drawing.c: (nautilus_debug_draw_rectangle_and_cross), (nautilus_debug_show_pixbuf_in_eog): New files. Put drawing debugging functions here. * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: Move drawing debugging functions to nautilus-debug-drawing.[ch]. * test/test-nautilus-font.c: (main): Update for debug drawing functions location change.
* reviewed by: Pavel Cisler <pavel@eazel.com>Ramiro Estrugo2000-12-201-31/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-art-extensions.h: * libnautilus-extensions/nautilus-art-extensions.c: (nautilus_art_irect_assign), Convenience function to assign x,y,width,height values to an ArtIRect. * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h: * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: (nautilus_gdk_pixbuf_is_valid), A simple private function that returns whether a pixbuf is "valid" or not. Vailidy is meassured as not null, with valid pixel data and non zero dimensions. (nautilus_gdk_pixbuf_get_frame), Private function to return the frame of a GdkPixbuf in a stucture for better readability. (nautilus_gdk_pixbuf_fill_rectangle_with_color), Changed it to use ArtIRect's instead of GdkRectangles to avoid using unsigned and short integers. Also, use art_irect_interset() to do clipping. (nautilus_gdk_pixbuf_save_to_file), Changed the pixbuf parameter to be const. (nautilus_gdk_pixbuf_unref_if_not_null), (nautilus_gdk_window_get_frame), Private function to return the frame of a GdkWindow in a stucture for better readability. (nautilus_gdk_pixbuf_draw_to_drawable), Renamed function to be consitent with the other pixbuf drawing functions. Also made it use ArtIRect's instead of GdkRectangles to avoid using unsigned and short integers. Rewrote the clipping operations using art_irect_intersect() for better readability. (nautilus_gdk_pixbuf_draw_to_pixbuf), Renamed function to be consitent with the other pixbuf drawing functions. Also made it use ArtIRect's instead of GdkRectangles to avoid using unsigned and short integers. Rewrote the clipping operations using art_irect_intersect() for better readability. (nautilus_gdk_pixbuf_draw_to_pixbuf_alpha), Renamed function to be consitent with the other pixbuf drawing functions. Also made it use ArtIRect's instead of GdkRectangles to avoid using unsigned and short integers. Changed the implementation to honor all parameters including the source_x and source_y. This is needed to work around limitation in gdk_pixbuf_composite(). Rewrote the clipping operations using art_irect_intersect() for better readability. (nautilus_gdk_pixbuf_new_from_pixbuf_sub_area), (pixbuf_destroy_callback), New function to create pixbuf from a sub area. The pixel data is shared an all memory bookeeping is taken care of for the caller by simply unreffing the resulting pixbuf. (nautilus_gdk_pixbuf_draw_to_pixbuf_tiled), Renamed function to be consitent with the other pixbuf drawing functions. Made the implementation work and honor all its parameters including the origin. Rewrote the clipping operations using art_irect_intersect() for better readability. There was a bug (5077) about this function claiming it was not used except in test code. This was true, but now that it works im planning on using it in NautilusImage shortly. I have marked that bug fixed. (nautilus_gdk_pixbuf_show_in_eog): New function to show a pixbuf externally in eog. Useful for debugging pixbuf stuff. * libnautilus-extensions/nautilus-buffered-widget.c: (nautilus_buffered_widget_draw), (nautilus_gdk_pixbuf_tile_alpha): Use new gdk-pixbuf extension functions. * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_text_layout_paint): Update for changes in fill_rectangle_with_color() api. * src/nautilus-about.c: (nautilus_about_update_authors): Update for changes in fill_rectangle_with_color() api. * test/test-nautilus-font.c: (main): Update for changes in pixbuf extensions.
* reviewed by: Darin Adler <darin@eazel.com>John Sullivan2000-12-113-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Terminology change -- the window & menu item formerly known as "Customization" are now known as "Backgrounds and Emblems"; the swatches of image formerly known as "backgrounds" are now known as "patterns". After 1.0 if this window acquires more varied content we will have to redo the menu item & window label, though we will continue to distinguish between "backgrounds" and "patterns", since "backgrounds" encompasses colors as well as images. Note that this change will only appear in full (and your "Backgrounds and Emblems" window work in full) after you've deleted your ~/.nautilus directory and let Nautilus make you a new one. * libnautilus-extensions/nautilus-gdk-pixbuf-extensions.c: (file_opened_callback): Set vfs_handle to NULL on failure. (load_done): Don't try to close pixbuf loader if it's NULL. These two bugs were flushed out by a temporary state on my machine where the theme was using a non-existent file for its background image. * data/backgrounds/Makefile.am: removed this file, as well as all the image files in this directory. * data/patterns/.cvsignore: * data/patterns/Makefile.am: New files, copied from data/backgrounds. Also copied over all image files from data/backgrounds, which is now obsolete. * data/Makefile.am: Changed "backgrounds" subdir to "patterns" * configure.in: changed data/backgrounds/Makefile to data/patterns/Makefile * nautilus.spec.in: Changed regular expressions with "backgrounds" to use "patterns" * data/browser.xml: Changed "background" to "pattern" in the terminology in this file, which gets installed into ~/.nautilus. You have to remove your ~/.nautilus to get a fresh one of these; without doing so the "Backgrounds and Emblems" window will be confused (won't crash, will use wrong terminology and sometimes have blank content). * icons/ardmore/ardmore.xml: * icons/arlo/arlo.xml: * icons/default.xml: * icons/eazel/eazel.xml: * icons/gnome/gnome.xml: * icons/vector/vector.xml: * icons/villanova/villanova.xml: Changed "backgrounds" directory references to "patterns" * libnautilus-extensions/nautilus-customization-data.h: * libnautilus-extensions/nautilus-customization-data.c: (nautilus_customization_data_new), (nautilus_customization_data_get_next_element_for_display), (nautilus_customization_data_destroy), (nautilus_customization_make_pattern_chit): Change "background" to "pattern" in many places, including one public function name. * src/nautilus-property-browser.c: (nautilus_property_browser_initialize), (nautilus_property_browser_drag_data_get), (make_drag_image), (make_color_drag_image), (remove_pattern), (remove_emblem), (nautilus_property_browser_remove_element), (add_pattern_to_browser), (add_new_pattern), (add_new_button_callback), (element_clicked_callback), (make_properties_from_directories), (add_reset_property), (nautilus_property_browser_update_contents), (nautilus_property_browser_set_category): Change "background" to "pattern" in many places. Also change window title from "Customization Options" to "Backgrounds and Emblems". * src/nautilus-shell-ui.xml: Change "Customization..." to "Backgrounds and Emblems...". * test/test-nautilus-background.c: (main): * test/test-nautilus-font.c: (create_named_background): * test/test-nautilus-label.c: (widget_set_nautilus_background_image): Changed test code that was using sample images from backgrounds directory to look in patterns directory instead.
* Added bug numbers to FIXMEs for the src subdirectory. If I can stomach it,Rebecca Schulman2000-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-07 Rebecca Schulman <rebecka@eazel.com> Added bug numbers to FIXMEs for the src subdirectory. If I can stomach it, I'll try and do a few more today. * src/file-manager/fm-directory-view.c: (duplicate_callback), (check_for_directory_hard_limit), (load_directory): * src/file-manager/fm-icon-view.c: (fm_icon_view_begin_loading): * src/file-manager/fm-search-list-view.c: (load_error_callback), (real_adding_file): * src/nautilus-about.c: (nautilus_about_draw_info): * src/nautilus-first-time-druid.c: (druid_cancel), (druid_finished), (make_anti_aliased_label), (make_hbox_user_level_radio_button), (set_up_user_level_page), (next_update_page_callback), (initiate_file_download): * src/nautilus-link-set-window.c: (get_link_set_names): * src/nautilus-location-bar.c: (nautilus_location_bar_update_label): * src/nautilus-property-browser.c: (nautilus_property_browser_initialize), (add_reset_property), (make_properties_from_xml_node), (nautilus_property_browser_update_contents): * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_background), (update_icon): * src/nautilus-view-frame.c: (nautilus_view_frame_set_to_component): * src/nautilus-window-manage-views.c: (window_set_title_with_timestamp), (viewed_file_changed_callback), (load_content_view), (change_state): * src/nautilus-window-service-ui.c: (goto_online_storage), (goto_software_catalog): * src/nautilus-window-toolbars.c: (set_up_throbber_frame_type): * src/nautilus-window.c: (nautilus_window_realize): * test/test-nautilus-font.c:
* Worked on getting rid of wait_until_ready.Darin Adler2000-11-082-62/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-directory.c: Got rid of include of nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-file.c: Got rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.c: (wait_until_ready_callback), (nautilus_mime_actions_wait_for_full_file_attributes): Reimplemented so the wait is in here so we can get rid of nautilus_file_wait_until_ready. * libnautilus-extensions/nautilus-mime-actions.h: Moved nautilus_mime_actions_wait_for_full_file_attributes into nautilus-wait-until-ready.h. * libnautilus-extensions/nautilus-program-chooser.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-program-choosing.c: Added include of nautilus-wait-until-ready.h since this is one of the two files that still uses the thing. * libnautilus-extensions/nautilus-wait-until-ready.h: Removed nautilsu_file_wait_until_ready and added nautilus_mime_actions_wait_for_full_file_attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view): Get rid of code that waits for attributes, because the code guarantees they will already be read at this point. (fm_directory_view_destroy): Stop monitoring the file for the open with menu. (files_changed_callback): Update the menus whenever a file changes or our knowledge about it changes. (create_open_with_gtk_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (reset_bonobo_open_with_menu): Use the new monitor call to arrange to get the information about the single selected file that we need. (activate_callback): Remove the hack to work around the wait_until_ready calls. Also remove the wait_until_ready in here because we now request all the attributes we will be needing in the call_when_ready call (that already existed). (fm_directory_view_activate_file): Request all the attributes needed for determining MIME actions. (monitor_file_for_open_with): New function to monitor the stuff we need to know for the Open with menu. * test/test-nautilus-mime-actions-set.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * test/test-nautilus-mime-actions.c: (ready_callback), (main): Use call_when_ready instead of wait_until_ready. * po/ui-extract.pl: Checked in new version from Kenneth. * po/update.pl: Kenneth wanted me to update the license.
* chuuutMathieu Lacage2000-11-071-0/+1
|
* small fix: replace NULL with CORBA_OBJECT_NIL add new test.Mathieu Lacage2000-11-072-0/+88
| | | | | | | | | | 2000-11-06 Mathieu Lacage <mathieu@eazel.com> * libnautilus-extensions/nautilus-bonobo-extensions.c: (oaf_activation_callback): small fix: replace NULL with CORBA_OBJECT_NIL * test/Makefile.am: add new test. * test/test-nautilus-async-activation.{c|h}
* Un-revert my changes from before, fixing the bugs in the process.Maciej Stachowiak2000-11-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_actions_check_if_minimum_attributes_ready), (nautilus_mime_actions_check_if_full_attributes_ready), (nautilus_mime_actions_get_minimum_file_attributes), (nautilus_mime_actions_get_full_file_attributes), (nautilus_mime_actions_wait_for_full_file_attributes), (nautilus_mime_get_default_action_type_for_file), (nautilus_mime_get_default_action_for_file), (nautilus_mime_get_default_application_for_file_internal), (nautilus_mime_get_default_application_for_file), (nautilus_mime_is_default_application_for_file_user_chosen), (nautilus_mime_get_default_component_sort_conditions), (nautilus_mime_get_default_component_for_file_internal), (nautilus_mime_get_short_list_applications_for_file), (nautilus_mime_get_short_list_components_for_file), (nautilus_mime_get_short_list_methods_for_file), (nautilus_mime_get_all_applications_for_file), (nautilus_mime_get_all_components_for_file), (nautilus_mime_set_default_application_for_file), (nautilus_mime_set_default_component_for_file), (nautilus_mime_set_short_list_applications_for_file), (nautilus_mime_set_short_list_components_for_file), (nautilus_mime_add_application_to_short_list_for_file), (nautilus_mime_remove_application_from_short_list_for_file), (nautilus_mime_add_component_to_short_list_for_file), (nautilus_mime_remove_component_from_short_list_for_file), (nautilus_mime_extend_all_applications_for_file), (nautilus_mime_remove_from_all_applications_for_file), (nautilus_do_component_query): * libnautilus-extensions/nautilus-mime-actions.h: * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list), (is_component_default_for_file), (program_file_pair_is_default_for_file), (program_file_pair_is_in_short_list_for_file), (add_to_short_list_for_file), (remove_from_short_list_for_file), (remove_default_for_item), (set_default_for_item): * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): * libnautilus/nautilus-clipboard-ui.xml.h: * src/file-manager/fm-directory-view.c: (switch_location_and_view), (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), (activate_callback): * src/file-manager/nautilus-directory-view-ui.xml.h: * src/file-manager/nautilus-icon-view-ui.xml.h: * src/file-manager/nautilus-search-list-view-ui.xml.h: * src/nautilus-applicable-views.c: (nautilus_navigation_info_new): * src/nautilus-shell-ui.xml.h: * src/nautilus-sidebar.c: (nautilus_sidebar_update_all), (nautilus_sidebar_set_uri): * src/nautilus-window.c: (nautilus_window_load_content_view_menu): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Un-revert my changes from before, fixing the bugs in the process.
* backing out changes that caused a seroius regression in services.J Shane Culpepper2000-10-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-31 J Shane Culpepper <pepper@eazel.com> * libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_actions_check_if_required_attributes_ready), (nautilus_mime_actions_get_required_file_attributes), (nautilus_mime_actions_wait_for_required_file_attributes), (nautilus_mime_get_default_action_type_for_file), (nautilus_mime_get_default_action_for_file), (nautilus_mime_get_default_application_for_file_internal), (nautilus_mime_get_default_application_for_file), (nautilus_mime_is_default_application_for_file_user_chosen), (nautilus_mime_get_default_component_for_file_internal), (nautilus_mime_get_short_list_applications_for_file), (nautilus_mime_get_short_list_components_for_file), (nautilus_mime_get_short_list_methods_for_file), (nautilus_mime_get_all_applications_for_file), (nautilus_mime_get_all_components_for_file), (nautilus_mime_set_default_application_for_file), (nautilus_mime_set_default_component_for_file), (nautilus_mime_set_short_list_applications_for_file), (nautilus_mime_set_short_list_components_for_file), (nautilus_mime_add_application_to_short_list_for_file), (nautilus_mime_remove_application_from_short_list_for_file), (nautilus_mime_add_component_to_short_list_for_file), (nautilus_mime_remove_component_from_short_list_for_file), (nautilus_mime_extend_all_applications_for_file), (nautilus_mime_remove_from_all_applications_for_file), (nautilus_do_component_query): * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list), (is_component_default_for_file), (program_file_pair_is_default_for_file), (program_file_pair_is_in_short_list_for_file), (add_to_short_list_for_file), (remove_from_short_list_for_file), (remove_default_for_item), (set_default_for_item): * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): * src/file-manager/fm-directory-view.c: (switch_location_and_view), (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), (activate_callback): * src/nautilus-window.c: (nautilus_window_load_content_view_menu): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): backing out changes that caused a seroius regression in services.
* Portions of the fix for 2379 (the parts that don't make it crash).Maciej Stachowiak2000-10-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_actions_check_if_minimum_attributes_ready), (nautilus_mime_actions_check_if_full_attributes_ready), (nautilus_mime_actions_get_minimum_file_attributes), (nautilus_mime_actions_get_full_file_attributes), (nautilus_mime_actions_wait_for_full_file_attributes), (nautilus_mime_get_default_action_type_for_file), (nautilus_mime_get_default_action_for_file), (nautilus_mime_get_default_application_for_file_internal), (nautilus_mime_get_default_application_for_file), (nautilus_mime_is_default_application_for_file_user_chosen), (nautilus_mime_get_default_component_sort_conditions), (nautilus_mime_get_default_component_for_file_internal), (nautilus_mime_get_short_list_applications_for_file), (nautilus_mime_get_short_list_components_for_file), (nautilus_mime_get_short_list_methods_for_file), (nautilus_mime_get_all_applications_for_file), (nautilus_mime_get_all_components_for_file), (nautilus_mime_set_default_application_for_file), (nautilus_mime_set_default_component_for_file), (nautilus_mime_set_short_list_applications_for_file), (nautilus_mime_set_short_list_components_for_file), (nautilus_mime_add_application_to_short_list_for_file), (nautilus_mime_remove_application_from_short_list_for_file), (nautilus_mime_add_component_to_short_list_for_file), (nautilus_mime_remove_component_from_short_list_for_file), (nautilus_mime_extend_all_applications_for_file), (nautilus_mime_remove_from_all_applications_for_file), (nautilus_do_component_query): * libnautilus-extensions/nautilus-mime-actions.h: * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list), (is_component_default_for_file), (program_file_pair_is_default_for_file), (program_file_pair_is_in_short_list_for_file), (add_to_short_list_for_file), (remove_from_short_list_for_file), (remove_default_for_item), (set_default_for_item): * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): * src/file-manager/fm-directory-view.c: (switch_location_and_view), (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), (activate_callback): * src/nautilus-applicable-views.c: (nautilus_navigation_info_new): * src/nautilus-sidebar.c: (nautilus_sidebar_update_all), (nautilus_sidebar_set_uri): * src/nautilus-window.c: (nautilus_window_load_content_view_menu): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Portions of the fix for 2379 (the parts that don't make it crash).
* Make sure text layout honors the vertical and horizontal offsets.Ramiro Estrugo2000-10-251-85/+169
| | | | | | | | | | | | | * libnautilus-extensions/nautilus-label.c: (nautilus_label_size_request), (render_buffer_pixbuf): Make sure text layout honors the vertical and horizontal offsets. (nautilus_scalable_font_draw_text): * test/test-nautilus-image.c: (label_new), (label_enter_event), (label_leave_event), (label_free_data), (buffered_widget_add_prelighting), (header_new), (footer_item_new), (footer_remainder_new), (footer_new), (main): More work on prelighting footers.
* Rename one of the icons.Ramiro Estrugo2000-10-251-545/+244
| | | | | | | | | | | * components/services/nautilus-dependent-shared/icons/Makefile.am: Rename one of the icons. * test/test-nautilus-image.c: (delete_event), (icon_get_path), (pixbuf_new_from_name), (label_new), (label_enter_event), (label_leave_event), (label_new_with_prelight), (image_new), (image_new_from_name), (header_new), (footer_new), (main): Add better test for image and label widgets.
* Fixed bugzilla.eazel.com bugs 2222, 3177, 3468, 3650, 3788Maciej Stachowiak2000-10-182-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (some vestiges of wait_until_ready remain in the farther reaches of the UI). * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_mime_actions_check_if_required_attributes_ready, nautilus_mime_actions_get_required_file_attributes, nautilus_mime_actions_wait_for_required_file_attributes): New functions to help with monitoring or waiting for required attributes for the nautilus mime API. (nautilus_mime_get_default_action_type_for_file, nautilus_mime_get_default_action_for_file, nautilus_mime_get_default_application_for_file_internal, nautilus_mime_get_default_application_for_file, nautilus_mime_is_default_application_for_file_user_chosen, nautilus_mime_get_default_component_for_file_internal, nautilus_mime_get_default_component_for_file, nautilus_mime_is_default_component_for_file_user_chosen, nautilus_mime_get_short_list_applications_for_file, nautilus_mime_get_short_list_components_for_file, nautilus_mime_get_short_list_methods_for_file, nautilus_mime_get_all_applications_for_file, nautilus_mime_has_any_applications_for_file, nautilus_mime_get_all_components_for_file, nautilus_mime_has_any_components_for_file, nautilus_mime_set_default_action_type_for_file, nautilus_mime_set_default_application_for_file, nautilus_mime_set_default_component_for_file, nautilus_mime_set_short_list_applications_for_file, nautilus_mime_set_short_list_components_for_file, nautilus_mime_add_application_to_short_list_for_file, nautilus_mime_remove_application_from_short_list_for_file, nautilus_mime_add_component_to_short_list_for_file, nautilus_mime_remove_component_from_short_list_for_file, nautilus_mime_extend_all_applications_for_file, nautilus_mime_remove_from_all_applications_for_file, mime_type_get_supertype): Don't `nautilus_file_wait_until_ready' for the required attributes; instead assert (Well, return_if_fail) that they are available using `nautilus_file_check_if_ready'. Also, use `nautilus_file_get_uri_scheme' where possible. * libnautilus-extensions/nautilus-directory-async.c (mime_list_callback): Correct some coding mistakes. * libnautilus-extensions/nautilus-wait-until-ready.h, libnautilus-extensions/nautilus-directory.c: Remove `nautilus_directory_wait_until_ready'. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c (nautilus_file_get_uri_scheme): new convenience function. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_file, is_component_default_for_file, is_component_in_short_list_for_file, is_application_in_short_list_for_file, program_file_pair_is_default_for_file, program_file_pair_is_in_short_list_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): wait_until_ready for required file attributes. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): wait_until_ready for required file attributes. * src/file-manager/fm-directory-view.c: (switch_location_and_view, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Wait for the right file attributes. * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-sidebar.c: (nautilus_sidebar_destroy, nautilus_sidebar_update_buttons, nautilus_sidebar_update_all), nautilus_sidebar_set_uri): Monitor the file the sidebar is displaying, and update when it's attributes change. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Wait for the right file attributes. (no wait_until_ready). * src/nautilus-window.c: (nautilus_window_destroy, view_menu_choose_view_callback, view_menu_vfs_method_callback, nautilus_window_real_load_content_view_menu, nautilus_window_load_content_view_menu): Wait for the right attributes. (no wait_until_ready in this chain). * test/test-nautilus-mime-actions-set.c (main): Wait for the right attributes. * test/test-nautilus-mime-actions.c (main): Wait for the right attributes.
* Fix assorted bugs which made NautilusFile think the list was neverMaciej Stachowiak2000-10-172-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-directory-async.c: (cancel_mime_list, set_up_request_by_file_attributes, lacks_mime_list, nautilus_directory_invalidate_counts, mime_list_callback, mime_list_start): Fix assorted bugs which made NautilusFile think the list was never complete. * libnautilus-extensions/nautilus-wait-until-ready.h: Include <libnautilus-extensions/nautilus-directory.h> and <libnautilus-extensions/nautilus-file.h>. * libnautilus-extensions/nautilus-file-attributes.h: Rename MIME_LIST attroibute to DIRECTORY_ITEM_MIME_TYPES. * libnautilus-extensions/nautilus-file.h, libnautilus-extensions/nautilus-file.c: (nautilus_file_get_directory_item_mime_types): Renamed from nautilus_file_get_mime_list. * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c (nautilus_file_wait_for_metadata, nautilus_file_wait_for_mime_action_attributes, nautilus_mime_get_default_action_type_for_uri, nautilus_mime_get_default_action_for_uri, nautilus_mime_get_default_application_for_uri_internal, nautilus_mime_get_default_application_for_uri, nautilus_mime_is_default_application_for_uri_user_chosen, nautilus_mime_get_default_component_for_uri_internal, nautilus_mime_get_default_component_for_uri, nautilus_mime_is_default_component_for_uri_user_chosen, nautilus_mime_get_short_list_applications_for_uri, nautilus_mime_get_short_list_components_for_uri, nautilus_mime_get_short_list_methods_for_uri, nautilus_mime_get_all_applications_for_uri, nautilus_mime_has_any_applications_for_uri, nautilus_mime_get_all_components_for_uri, nautilus_mime_has_any_components_for_uri, nautilus_mime_set_default_action_type_for_uri, nautilus_mime_set_default_application_for_uri, nautilus_mime_set_default_component_for_uri, nautilus_mime_set_short_list_applications_for_uri, nautilus_mime_set_short_list_components_for_uri, nautilus_mime_add_application_to_short_list_for_uri, nautilus_mime_remove_application_from_short_list_for_uri, nautilus_mime_add_component_to_short_list_for_uri, nautilus_mime_remove_component_from_short_list_for_uri, nautilus_mime_extend_all_applications_for_uri, nautilus_mime_remove_from_all_applications_for_uri, mime_type_list_to_hash_table, nautilus_do_component_query): Use all the new NautilusFile APIs and stop using NautilusDirectory. No longer take NautilusDirectory as a parameter in addition to NautilusFile. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list, is_application_default_for_uri, is_component_default_for_uri, is_component_in_short_list_for_uri, is_application_in_short_list_for_uri, program_file_pair_is_default_for_file, add_to_short_list_for_file, remove_from_short_list_for_file, remove_default_for_item, set_default_for_item): Stop passing NautilusDirectory to nautilus-mime-actions functions. * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): Likewise. * src/file-manager/fm-directory-view.c (switch_location_and_view, files_added_callback, files_changed_callback, create_open_with_gtk_menu, reset_bonobo_open_with_menu, activate_callback): Likewise. * src/nautilus-applicable-views.c (got_file_info_callback): Likewise. * src/nautilus-sidebar.c (nautilus_sidebar_update_buttons): Likewise. * src/nautilus-window-manage-views.c (nautilus_window_set_content_view): Likewise. * src/nautilus-window.c (nautilus_window_load_content_view_menu): Likewise. * test/test-nautilus-mime-actions-set.c (main): Likewise. * test/test-nautilus-mime-actions.c (main): Likewise.
* Add support for line wrappping.Ramiro Estrugo2000-10-164-1/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-label.c: (nautilus_label_initialize), (nautilus_label_destroy), (render_buffer_pixbuf), (label_recompute_line_geometries), (nautilus_label_set_line_offset), (nautilus_label_get_drop_shadow_color), (nautilus_label_set_line_wrap), (nautilus_label_get_line_wrap), (nautilus_label_set_line_wrap_width), (nautilus_label_get_line_wrap_width), (nautilus_label_set_line_wrap_separators), (nautilus_label_get_line_wrap_separators): * libnautilus-extensions/nautilus-label.h: Add support for line wrappping. * src/nautilus-shell.c: (display_caveat): Change the caveat text to not use hard coded new lines and use the new NautilusLabel text wrapping feature instead. * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-label.c: (main): * test/test-nautilus-wrapped-label.c: (delete_event), (create_gtk_label), (create_nautilus_label), (create_gtk_label_window), (create_nautilus_label_window), (main): Add a test for the NautilusLabel line wrapping feature.
* Cut over to HEAD of Bonobo. This check-in includes all the changesDarin Adler2000-10-055-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | needed to compile and run, but there are many things wrong visually that may take a while to get fixed. * src/nautilus-window-menus.c: (file_menu_new_window_callback), (file_menu_close_window_callback), (file_menu_close_all_windows_callback), (file_menu_toggle_find_mode_callback), (file_menu_web_search_callback), (edit_menu_undo_callback), (edit_menu_cut_callback), (edit_menu_copy_callback), (edit_menu_paste_callback), (edit_menu_clear_callback), (go_menu_back_callback), (go_menu_forward_callback), (go_menu_up_callback), (go_menu_home_callback), (go_menu_forget_history_callback), (view_menu_reload_callback), (view_menu_show_hide_sidebar_callback), (view_menu_show_hide_tool_bar_callback), (view_menu_show_hide_location_bar_callback), (view_menu_show_hide_status_bar_callback), (nautilus_window_update_show_hide_menu_items), (view_menu_zoom_in_callback), (view_menu_zoom_out_callback), (view_menu_zoom_normal_callback), (bookmarks_menu_add_bookmark_callback), (bookmarks_menu_edit_bookmarks_callback), (user_level_customize_callback), (customize_callback), (change_appearance_callback), (help_menu_about_nautilus_callback), (help_menu_nautilus_feedback_callback), (switch_to_user_level), (user_level_menu_item_callback), (append_placeholder), (append_separator), (append_bookmark_to_menu), (create_menu_item_from_node), (remove_bookmarks_after), (remove_underline_accelerator_from_menu_title), (new_top_level_menu), (add_user_level_menu_item), (nautilus_window_initialize_menus), (nautilus_window_update_find_menu_item), (update_user_level_menu_items), (convert_verb_to_user_level), (convert_user_level_to_verb), (update_preferences_dialog_title): * src/nautilus-window.c: (nautilus_window_clear_status), (nautilus_window_set_status), (install_status_bar), (nautilus_window_constructed), (nautilus_window_set_arg), (nautilus_window_get_arg), (nautilus_window_destroy), (nautilus_window_allow_back), (nautilus_window_allow_forward), (nautilus_window_allow_up), (nautilus_window_allow_reload), (nautilus_window_zoom_level_changed_callback), (nautilus_window_set_content_view_widget), (show_dock_item), (hide_dock_item), (dock_item_showing), (nautilus_window_hide_tool_bar), (nautilus_window_show_tool_bar), (nautilus_window_tool_bar_showing), (nautilus_window_hide_status_bar), (nautilus_window_show_status_bar), (nautilus_window_status_bar_showing): Convert to new API. Some is disabled with #ifdef UIH. * Makefile.am: * configure.in: Turned off build of the idl directory, build components after src. * components/adapter/main.c: * components/notes/nautilus-notes.c: * components/sample/main.c: * libnautilus-extensions/nautilus-font-picker.c: * libnautilus-extensions/nautilus-global-preferences.c: * libnautilus-extensions/nautilus-password-dialog.c: * libnautilus-extensions/nautilus-preferences-item.c: * libnautilus/nautilus-undo-transaction.c: * libnautilus/nautilus-undo.c: * src/nautilus-application.c: * src/nautilus-history-frame.c: * src/nautilus-link-set-window.c: * src/nautilus-main.c: * src/nautilus-shell.c: * src/nautilus-sidebar.c: * src/nautilus-view-frame-corba.c: * src/nautilus-zoomable-frame-corba.c: * test/test-nautilus-font-picker.c: * test/test-nautilus-image.c: (create_font_picker_frame): * test/test-nautilus-label.c: (create_font_picker_frame): * test/test-nautilus-preferences.c: * test/test-nautilus-widgets.c: (radio_group_load_it_up): Fixed includes. * test/test-nautilus-image.c: (create_font_picker_frame): * test/test-nautilus-label.c: (create_font_picker_frame): * test/test-nautilus-widgets.c: (radio_group_load_it_up): Turned off localization of some strings in tests. * components/adapter/nautilus-adapter-control-embed-strategy.c: (nautilus_adapter_control_embed_strategy_new): * components/adapter/nautilus-adapter-control-embed-strategy.h: * components/adapter/nautilus-adapter-embed-strategy.c: (nautilus_adapter_embed_strategy_get): * components/adapter/nautilus-adapter-embed-strategy.h: * components/adapter/nautilus-adapter-embeddable-embed-strategy.c: (nautilus_adapter_embeddable_embed_strategy_new): * components/adapter/nautilus-adapter-embeddable-embed-strategy.h: Embedding code now deals with Bonobo_UIContainer, not Bonobo_UIHandler. * components/adapter/nautilus-adapter.c: (nautilus_adapter_new): This code not only had to be changed to deal with the Bonobo_UIContainer instead of Bonobo_UIHandler, but it also needed to deal with the containing item (was remote_ui_handler), not the local component. * components/adapter/nautilus-adapter-embeddable-embed-strategy.c: (nautilus_adapter_embeddable_embed_strategy_new): * components/adapter/nautilus-adapter.c: BonoboContainer was renamed BonoboItemContainer. * components/history/nautilus-history-view.c: Remove unused BonoboUIHandler * field. * components/loser/content/Makefile.am: * components/loser/sidebar/Makefile.am: * components/mozilla/Makefile.am: * components/sample/Makefile.am: * src/Makefile.am: * src/file-manager/Makefile.am: Added the necessary defines and build rules to install ui.xml files and locate them from the C code. * src/file-manager/nautilus-directory-view-ui.xml: * src/file-manager/nautilus-icon-view-ui.xml: * src/file-manager/nautilus-search-list-view-ui.xml: * src/nautilus-shell-ui.xml: Added definitions of user interface. * components/loser/content/nautilus-content-loser-ui.xml: * components/loser/sidebar/nautilus-sidebar-loser-ui.xml: * components/mozilla/nautilus-mozilla-ui.xml: * components/sample/nautilus-sample-content-view-ui.xml: Added empty placeholders for user interface. * components/loser/content/nautilus-content-loser.c: (loser_merge_bonobo_items_callback): * components/loser/sidebar/nautilus-sidebar-loser.c: (loser_merge_bonobo_items_callback): * components/mozilla/nautilus-mozilla-content-view.c: (mozilla_merge_bonobo_items_callback): * components/sample/nautilus-sample-content-view.c: (sample_merge_bonobo_items_callback): Use nautilus_view_set_up_ui to get the user interface from a ui.xml file. Put #ifdef UIH around old code to make the items work that still needs to be visited. * libnautilus-extensions/nautilus-bonobo-extensions.c: * libnautilus-extensions/nautilus-bonobo-extensions.h: * libnautilus-extensions/nautilus-undo-manager.c: * libnautilus-extensions/nautilus-undo-manager.h: * libnautilus/nautilus-clipboard.c: (add_menu_items_callback), (remove_menu_items_callback), (nautilus_clipboard_set_up_editable_from_bonobo_control): * libnautilus/nautilus-clipboard.h: Wrapped code in ifdef UIH to disable it until it can be converted to the new Bonobo. * libnautilus-extensions/nautilus-caption-table.h: * libnautilus-extensions/nautilus-caption.h: * libnautilus-extensions/nautilus-font-picker.h: * libnautilus-extensions/nautilus-preferences-group.h: * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-radio-button-group.h: * src/nautilus-about.h: Got rid of any cases where headers include the omnibus header <gnome.h>. These made the conversion process harder, which is why we fixed them. * libnautilus/libnautilus.h: Got rid of cases where headers include the omnibus header <bonobo.h>. * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (nautilus_view_set_up_ui): Added a helper function to make it easy for Nautilus components to load their UI and get it attached to the Nautilus:View object. * nautilus.spec.in: Install the nautilus-*-ui.xml files too. * src/file-manager/fm-directory-view.h: * src/file-manager/fm-directory-view.c: (bonobo_menu_select_all_callback), (bonobo_menu_empty_trash_callback), (bonobo_control_activate_callback): Convert to new API. (fm_directory_view_get_bonobo_ui_container): Name and purpose changed slightly for new API. (fm_directory_view_real_merge_menus): Merge with new API. (fm_directory_view_real_update_menus): Disabled this code for now. * src/file-manager/fm-icon-view.c: (fm_icon_view_destroy): Destroy icon view's own component at destroy time. (context_menu_layout_radio_item_callback), (append_one_context_menu_layout_item), (fm_icon_view_create_background_context_menu_items), (update_layout_menus): Convert to new API, disable some with #ifdef UIH. (get_sort_criterion_by_verb), (set_sort_criterion_by_verb), (sort_callback): Convert to new API. (fm_icon_view_merge_menus): Merge with new API, creating our own UI component separate from the directory view's. (fm_icon_view_update_menus): Disable with #ifdef UIH. * src/file-manager/fm-search-list-view.h: * src/file-manager/fm-search-list-view.c: (fm_search_list_view_initialize_class), (fm_search_list_view_initialize), (real_destroy), (indexing_info_callback), (real_merge_menus), (real_update_menus): Add code necessary to use a separate UI component, and disabled the actual menu set-up code with #ifdef UIH. This required adding a details struct. * src/nautilus-desktop-window.c: (realize): Turned off the code that hides the desktop elements. * src/nautilus-window-private.h: * src/nautilus-view-frame.h: * src/nautilus-view-frame.c: (nautilus_view_frame_destroy), (nautilus_view_frame_new), (nautilus_view_frame_load_client): * src/nautilus-window-manage-views.c: (load_content_view), (nautilus_window_set_sidebar_panels): Change to use Bonobo_UIContainer instead of Bonobo_UIHandler. * src/nautilus-window-toolbars.c: (remember_buttons), (nautilus_window_initialize_toolbars): Leave this code around and change it enough to compile and run, even though it's creating a second, invisible toolbar. * src/nautilus-window.h: Change to be a BonoboWin subclass instead of a GnomeApp subclass.
* Make the test program exit when its window is closed, so it can beRamiro Estrugo2000-10-031-0/+7
| | | | | | * test/test-nautilus-label.c: (delete_event), (main): Make the test program exit when its window is closed, so it can be profiled properly.
* More work on whittling the state machine down to size.Darin Adler2000-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * README: libunicode, libglade, and eog are no longer required. * components/history/nautilus-history-view.c: (history_title_changed): * libnautilus/nautilus-view-component.idl: * libnautilus/nautilus-view.c: (impl_Nautilus_View_title_changed), (nautilus_view_initialize_class): * libnautilus/nautilus-view.h: * src/nautilus-view-frame.c: (nautilus_view_frame_title_changed): * src/nautilus-view-frame.h: Added title parameter for the title_changed function. * src/nautilus-view-frame.c: (nautilus_view_frame_report_load_complete): Got rid of extra emission of report_load_complete, which is handled by view_frame_loaded now. * libnautilus-extensions/nautilus-background.c: (nautilus_background_initialize_class): * libnautilus-extensions/nautilus-entry.c: (nautilus_entry_initialize_class): * libnautilus-extensions/nautilus-icon-text-item.c: (iti_class_init): * libnautilus-extensions/nautilus-list.c: (nautilus_list_initialize_class): * src/nautilus-bookmark-list.c: (nautilus_bookmark_list_initialize_class): * src/nautilus-navigation-bar.c: (nautilus_navigation_bar_initialize_class): * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_initialize_class): * src/nautilus-sidebar.c: (nautilus_sidebar_initialize_class): * src/nautilus-switchable-navigation-bar.c: (nautilus_switchable_navigation_bar_initialize_class): Use GTK_RUN_LAST instead of GTK_RUN_FIRST. * libnautilus-extensions/nautilus-directory-background.c: * libnautilus-extensions/nautilus-link-set.c: * libnautilus-extensions/nautilus-link.c: * src/file-manager/fm-icon-text-window.c: * src/file-manager/fm-icon-view.c: * src/file-manager/fm-properties-window.c: * src/nautilus-complex-search-bar.c: * src/nautilus-link-set-window.c: * src/nautilus-simple-search-bar.c: * src/nautilus-switchable-search-bar.c: Add includes needed now that the #include <gnome.h> was removed from nautilus-global-preferences.h. * libnautilus-extensions/nautilus-string.h: * libnautilus-extensions/nautilus-string.c: (nautilus_strcmp_case_breaks_ties): Added function, like g_strcasecmp, but falls back on strcmp for strings that match case-insensitive-wise. (nautilus_istr_compare): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcasecmp. * libnautilus-extensions/nautilus-file.c: (nautilus_file_compare_by_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_compare_by_directory_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (get_automatic_emblems_as_integer): Convert automatic emblems to integer form for simple sorting. (prepend_automatic_emblem_names): Separate out the code that puts on automatic emblem names, and make it put them first, before any keyword-based emblems. (nautilus_file_compare_by_emblems): Compare the automatic emblems first, using the integer form. (nautilus_file_compare_by_type): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcmp. (nautilus_file_compare_for_sort): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_compare_name): Use nautilus_strcmp_case_breaks_ties instead of g_strcasecmp. (nautilus_file_is_mime_type): Use nautilus_strcasecmp instead of nautilus_strcmp. (nautilus_file_get_emblem_names): Use prepend_automatic_emblem_names. (sort_keyword_list_and_remove_duplicates): Sort with nautilus_strcmp_case_breaks_ties instead of compare_emblem_names. Automatic emblem names are now dealt with elsewhere. * libnautilus-extensions/nautilus-icon-container.c: (compare_icons_by_name): Use nautilus_strcmp_case_breaks_ties instead of nautilus_strcasecmp. * libnautilus-extensions/nautilus-glib-extensions.c: (nautilus_g_str_list_sort): Use nautilus_str_compare. (nautilus_g_str_list_sort_case_insensitive): Use nautilus_istr_compare. * components/services/vault/command-line/main.c: (main): * test/test-nautilus-mime-actions-set.c: (str_to_action_type): Use g_strcasecmp, not strcasecmp, for portability. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: Removed _get_disabled_sidebar_panel_view_identifiers since the logic now removes any not in the enabled list instead. * libnautilus-extensions/nautilus-view-identifier.h: * libnautilus-extensions/nautilus-view-identifier.c: (nautilus_view_identifier_list_copy): New function. (nautilus_view_identifier_compare): Now sorts properly instead of returning 1 for any two identifiers that are !=. * nautilus-clean.sh: Removed unadorned gconfd now that it's ancient history and because it makes the script seem to fail all the time. * src/nautilus-window-manage-views.h: * src/nautilus-window-manage-views.c: (compute_title): Renamed to a shorter name since it's a local function. (update_title): Renamed to a shorter name since it's a local function and made it do nothing if the title is already correct. (nautilus_window_update_internals): Simplified code by using the new cached title. (nautilus_window_has_really_changed): Removed sidebar panel logic that is no longer needed. (nautilus_window_free_load_info): Remove some unused fields. (nautilus_window_open_location): Removed unused parameter. (nautilus_window_open_location_in_new_window): Removed unused parameter. (load_content_view): Renamed to shorter name since it's a local function. (handle_view_failure), (cancel_location_change), (load_view_for_new_location), (set_view_location_and_selection): Broke out big pieces of code used by the state machine. Soon we won't have a state machine at all, but we'll still need functions like these. (nautilus_window_update_state): Removed a lot of the code and broke the remaining bits into the above functions. (nautilus_window_set_state_info): Removed sidebar management code and some now-unused state variables. (nautilus_window_stop_loading): Moved this function in here and renamed it so the whole state machine is in one place. (nautilus_window_set_content_view): Moved this function in here and renamed it so the whole state machine is in one place. (compare_view_identifier_with_iid), (nautilus_window_set_sidebar_panels): Wrote new code to set up the sidebar panels based on a list of view identifiers, based on the code that was used before when preferences change. Moved here so the whole state machine is in one place. * src/nautilus-window-toolbars.c: (toolbar_stop_callback): Call the new function nautilus_window_stop_loading. * src/nautilus-window-private.h: * src/nautilus-window.h: * src/nautilus-window.c: (nautilus_window_initialize_class): Removed the "content_view" argument. (nautilus_window_goto_uri): Removed the view frame parameter from the open_location call. (nautilus_window_constructed): Set up sidebars based on preferences when the window is created. (nautilus_window_set_arg): Removed the "content_view" argument. (nautilus_window_get_arg): Removed the "content_view" argument. (view_menu_switch_views_callback): Call the new function nautilus_window_set_content_view. (chose_component_callback), Call the new function nautilus_window_set_content_view. (nautilus_window_open_location_callback): Removed the view frame parameter from the open_location call. (nautilus_window_open_location_in_new_window_callback): Removed the view frame parameter from the open_location_in_new_window call. (nautilus_window_connect_view): Don't connect to report_load_progress any more. The view frame now handles this for us. (nautilus_window_set_content_view_widget): Renamed this to avoid confusion with the new nautilus_window_set_content_view which is used to change content views, given a new view identifier. (update_sidebar_panels_from_preferences): Renamed and changed to use the new nautilus_window_set_sidebar_panels call.
* Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE toMaciej Stachowiak2000-09-272-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-file-attributes.h: Rename NAUTILUS_FILE_ATTRIBUTE_FAST_MIME_TYPE to NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE; add NAUTILUS_FILE_ATTRIBUTE_SLOW_MIME_TYPE, for now just a synonym for NAUTILUS_FILE_ATTRIBUTE_MIME_TYPE. * libnautilus-extensions/nautilus-directory-async.c: (set_up_request_by_file_attributes): Handle the new file attributes. * libnautilus-extensions/nautilus-directory.h: move nautilus_directory_wait_until_ready call to nautilus-wait-until-ready.h * libnautilus-extensions/nautilus-directory.c: (nautilus_self_check_directory): Include nautilus-wait-until-ready.h, use new attributes. * libnautilus-extensions/nautilus-wait-until-ready.h: New header for the deprecated wait_until_ready calls. * libnautilus-extensions/nautilus-file.c: (nautilus_file_wait_until_ready): file equivalent of nautilus_directory_wait_until_ready; temporary to help me refactor. (file_wait_until_ready_callback): helper function. * libnautilus-extensions/Makefile.am: Add nautilus-wait-until-ready.h * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_required_file_attributes): Use new attribute for mime type. * libnautilus-extensions/nautilus-mime-actions.h, libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_get_default_action_type_for_uri), (nautilus_mime_get_default_action_for_uri), (nautilus_mime_get_default_application_for_uri_internal), (nautilus_mime_get_default_application_for_uri), (nautilus_mime_is_default_application_for_uri_user_chosen), (nautilus_mime_get_default_component_for_uri_internal), (nautilus_mime_get_default_component_for_uri), (nautilus_mime_is_default_component_for_uri_user_chosen), (nautilus_mime_get_short_list_applications_for_uri), (nautilus_mime_get_short_list_components_for_uri), (nautilus_mime_get_short_list_methods_for_uri), (nautilus_mime_get_all_applications_for_uri), (nautilus_mime_has_any_applications_for_uri), (nautilus_mime_get_all_components_for_uri), (nautilus_mime_has_any_components_for_uri), (nautilus_mime_set_default_action_type_for_uri), (nautilus_mime_set_default_application_for_uri), (nautilus_mime_set_default_component_for_uri), (nautilus_mime_set_short_list_applications_for_uri), (nautilus_mime_set_short_list_components_for_uri), (nautilus_mime_add_application_to_short_list_for_uri), (nautilus_mime_remove_application_from_short_list_for_uri), (nautilus_mime_add_component_to_short_list_for_uri), (nautilus_mime_remove_component_from_short_list_for_uri), (nautilus_mime_extend_all_applications_for_uri), (nautilus_mime_remove_from_all_applications_for_uri): All these functions now take a NautilusDirectory and a NautilusFile, rather than a URI. (gnome_vfs_mime_application_has_id), (gnome_vfs_mime_id_matches_application), (gnome_vfs_mime_application_has_id_not_in_list), (string_not_in_list), (extract_prefix_add_suffix), (make_oaf_query_with_known_mime_type), (make_oaf_query_with_uri_scheme_only), (free_key), (server_matches_content_requirements), (nautilus_do_component_query), (str_list_difference), (strv_concat): Reformatted. (get_mime_type_from_file): Changed from get_mime_type_from_uri; uses nautilus_file_wait_until_ready instead of synchronous I/O. * libnautilus-extensions/nautilus-program-chooser.c: (repopulate_program_list), (is_application_default_for_uri), (is_component_default_for_uri), (is_component_in_short_list_for_uri), (is_application_in_short_list_for_uri), (program_file_pair_is_default_for_file), (add_to_short_list_for_file), (remove_from_short_list_for_file), (remove_default_for_item), (set_default_for_item): * libnautilus-extensions/nautilus-program-choosing.c: (any_programs_available_for_file): * libnautilus-extensions/nautilus-wait-until-ready.h: * src/file-manager/fm-directory-view.c: (switch_location_and_view), (create_open_with_gtk_menu), (reset_bonobo_open_with_menu), (activate_callback): * src/nautilus-applicable-views.c: (got_file_info_callback), (nautilus_navigation_info_new), (nautilus_navigation_info_free): * src/nautilus-applicable-views.h: * src/nautilus-sidebar.c: (nautilus_sidebar_update_buttons): * src/nautilus-theme-selector.c: (add_theme_to_icons): * src/nautilus-window.c: (nautilus_window_switch_views), (nautilus_window_load_content_view_menu): * test/test-nautilus-mime-actions-set.c: (main): * test/test-nautilus-mime-actions.c: (main): Deal with above API changes.
* Fixed bug 640 (icon cache never frees images (awaiting GdkPixbufDarin Adler2000-09-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix)). Also took care of bug 3145 (zillions of 'main_loops != NULL' assertion failures when quitting) and bug 3138 (Some code in the icon factory is cut and pasted from elsewhere). And a few unrelated things that came up while I was busy working on these. * configure.in: Applied patch from Dan Winship to fix handling of CFLAGS and LDFLAGS. Fixes some missing quoting and other mistakes. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-icon-factory-private.h: * libnautilus-extensions/nautilus-thumbnails.c: * libnautilus-extensions/nautilus-thumbnails.h: Broke out the thumbnailing code into its own source file for clarity. * libnautilus-extensions/nautilus-directory.c: * libnautilus-extensions/nautilus-file-utilities.h: * libnautilus-extensions/nautilus-file-utilities.c: (nautilus_make_directory_and_parents): Moved nautilus_make_directory_and_parents into a place where the thumbnail code can share it instead of requiring its own copy. * libnautilus-extensions/nautilus-global-preferences.h: * libnautilus-extensions/nautilus-global-preferences.c: (destroy_global_prefs_dialog), (global_preferences_get_dialog), (nautilus_global_preferences_dialog_update), (nautilus_global_preferences_initialize): * libnautilus-extensions/nautilus-preferences.h: * libnautilus-extensions/nautilus-preferences.c: (preferences_initialize_if_needed), (preferences_shutdown): * src/nautilus-application.c: (nautilus_application_destroy): Changed code so that it cleans up with g_atexit instead of with an explicit shutdown call. This makes it sequence correctly with other atexit code. * libnautilus-extensions/nautilus-icon-canvas-item.h: * libnautilus-extensions/nautilus-icon-canvas-item.c: (nautilus_icon_canvas_item_destroy), (nautilus_icon_canvas_item_set_attach_points), (emblem_layout_next): * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_update_icon): Added a Nautilus prefix to the EmblemAttachPoints typedef, since it's public. * libnautilus-extensions/nautilus-icon-factory.h: * libnautilus-extensions/nautilus-icon-factory.c: Changed the icon factory structure so that it will actually free pixbufs when done with them. Made some other small fixes to the icon factory in passing, including removing some redundant code and fixing the logic for getting custom icons and deleting the icon factory and g_atexit time. * src/file-manager/fm-icon-view.c: (play_file), (preview_sound): Restructured the logic for playing sound previews a little to get rid of compiler warnings and close some loopholes in the old code. * src/nautilus-main.c: (is_event_loop_needed), (quit_if_in_main_loop), (nautilus_gtk_main_quit_all), (event_loop_unregister), (nautilus_main_event_loop_register), (nautilus_main_is_event_loop_mainstay), (nautilus_main_event_loop_quit), (main): Fixed the main loop quitting logic so that it is a bit simpler and works with the gnome-vfs code that runs event handling after the last main loop is gone.
* make it check if a target is begin copied into itself before doing theMathieu Lacage2000-09-182-29/+78
| | | | | | | | | | | | 2000-09-17 Mathieu Lacage <mathieu@eazel.com> * src/file-manager/fm-list-view.c: (fm_list_receive_dropped_icons): make it check if a target is begin copied into itself before doing the actual file operation. ie: bug 3085 * test/Makefile.am: add brand new test I used in my quest for bug 1963 * test/test-nautilus-background.c: (main): the actual test :) run and you will see beautiful background.
* Add function to create a GdkPixbuf from a string. Also fixed a debugginRamiro Estrugo2000-09-071-59/+205
| | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-scalable-font.h: * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_scalable_font_draw_text), (nautilus_text_layout_paint), (nautilus_gdk_pixbuf_new_from_text): Add function to create a GdkPixbuf from a string. Also fixed a debuggin typo from before. * test/test-nautilus-font.c: (create_named_background), (rgba_run_alpha), (pixbuf_draw_rectangle), (pixbuf_draw_rectangle_around), (main): Add text to GdkPixbuf to GdkPixbuf compositing test. Also add a bunch of hacks to make the tests more useful.
* Add support for drawing underlined text. I also added a FIXME for theRamiro Estrugo2000-09-071-7/+48
| | | | | | | | | | | | | * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_text_layout_free), (nautilus_text_layout_new), (nautilus_text_layout_paint): * libnautilus-extensions/nautilus-scalable-font.h: Add support for drawing underlined text. I also added a FIXME for the issue of hard coding the underline baseline rather than fetching the information from the rendred string. * test/test-nautilus-font.c: (main): Add underlined text test.
* Add support for drawint inverted text. Also cleanup the rendering functionRamiro Estrugo2000-09-071-19/+44
| | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_scalable_font_measure_text), (invert_glyph), (nautilus_scalable_font_draw_text), (nautilus_scalable_font_draw_text_lines_with_dimensions), (nautilus_scalable_font_draw_text_lines), (nautilus_text_layout_paint): * libnautilus-extensions/nautilus-scalable-font.h: Add support for drawint inverted text. Also cleanup the rendering function a bit. * libnautilus-extensions/nautilus-icon-factory.c: (embed_text): * libnautilus-extensions/nautilus-label.c: (render_buffer_pixbuf): * src/nautilus-about.c: (draw_aa_string): * src/nautilus-sidebar-tabs.c: (draw_one_tab_plain), (draw_one_tab_themed): Update all these for the new inverted scalable font api. * test/test-nautilus-font.c: (main): Add a inverted text test.
* Add text layout functions copied from libgnomeui/gnome-icon-text.[ch] andRamiro Estrugo2000-09-071-8/+58
| | | | | | | | | | | | | | * libnautilus-extensions/nautilus-scalable-font.c: (text_layout_free_row), (nautilus_text_layout_free), (nautilus_text_layout_new), (nautilus_text_layout_paint): * libnautilus-extensions/nautilus-scalable-font.h: Add text layout functions copied from libgnomeui/gnome-icon-text.[ch] and modified to work with NautilusScalalbleFont and GdkPixbuf instead of GdkFont and GdkDrawable. * test/test-nautilus-font.c: (main): Add text layout test.
* Make the empty line height 1/2 of the font size to cram more stuff intoRamiro Estrugo2000-09-071-18/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-icon-factory.c: (embed_text): Make the empty line height 1/2 of the font size to cram more stuff into the embedded text. * libnautilus-extensions/nautilus-label.c: (nautilus_label_size_request), (render_buffer_pixbuf), (label_get_empty_line_height), (label_get_total_text_and_line_offset_height), (label_recompute_line_geometries): Update for scalable font changes. * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_scalable_font_measure_text_lines), (nautilus_scalable_font_draw_text_lines_with_dimensions), (nautilus_scalable_font_draw_text_lines): * libnautilus-extensions/nautilus-scalable-font.h: Add empty_line_height argument to text line measuring and drawing functions. Use this in both measure and drawing computations. * test/test-nautilus-font.c: (gdk_pixbuf_draw_rectangle), (draw_rectangle_around), (main): Update for scalable font changes. Also draw a box around area that is being clipped (or measured) to determine whether things work precisely.
* Add support for rendering text on pixbufs without alpha channels.Ramiro Estrugo2000-09-061-0/+2
| | | | | | | | | | | | | | | * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_scalable_font_draw_text), (nautilus_scalable_font_draw_text_lines_with_dimensions), (nautilus_scalable_font_draw_text_lines), (initialize_global_stuff_if_needed): Add support for rendering text on pixbufs without alpha channels. * libnautilus-extensions/nautilus-icon-factory.c: (embed_text): No longer need to create a pixbuf with alpha channel duplicate. * test/test-nautilus-font.c: (main): Paint the pixbuf white before drawing stuff to it.
* Add a dumb script to make it easy to run the font test.Ramiro Estrugo2000-09-063-1/+10
| | | | | | | | | | * test/Makefile.am: * test/font-test.sh: Add a dumb script to make it easy to run the font test. * test/test-nautilus-font.c: (main): Make the clipping test better; clip both vertically and horizontally.
* Fix all the warnings -Wuninitialized found. Quite a number of them werePavel Cisler2000-09-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-05 Pavel Cisler <pavel@eazel.com> * components/help/converters/gnome-db2html2/gdb3html.c: (xml_parse_document): * components/help/hyperbola-nav-index.c: (end_element): * components/services/summary/nautilus-view/nautilus-summary-view.c : (logout_button_cb): * components/services/time/service/trilobite-eazel-time-service.c: (trilobite_eazel_time_service_do_http_request): * components/tree/nautilus-tree-view.c: * configure.in: * libnautilus-extensions/bonobo-stream-vfs.c: (bonobo_stream_vfs_open): * libnautilus-extensions/nautilus-background.c: (nautilus_background_draw), (nautilus_background_draw_aa): * libnautilus-extensions/nautilus-customization-data.c: (nautilus_customization_data_new): * libnautilus-extensions/nautilus-directory-background.c: (nautilus_directory_background_write_desktop_settings): * libnautilus-extensions/nautilus-file-operations.c: (nautilus_file_operations_move_to_trash), (do_empty_trash): * libnautilus-extensions/nautilus-file.c: (nautilus_file_dump): * libnautilus-extensions/nautilus-icon-canvas-item.c: (draw_or_measure_label_text), (emblem_layout_next): * libnautilus-extensions/nautilus-icon-factory.c: (get_image_from_cache): * libnautilus-extensions/nautilus-icon-text-item.c: (iti_paint_text): * libnautilus-extensions/nautilus-list.c: (draw_cell), (draw_row): * libnautilus-extensions/nautilus-mime-actions.c: (nautilus_mime_add_application_to_short_list_for_uri): * libnautilus-extensions/nautilus-program-chooser.c: (program_file_pair_get_short_status_text), (program_file_pair_get_long_status_text): * libnautilus-extensions/nautilus-program-choosing.c: (nautilus_choose_component_for_file), (nautilus_choose_application_for_file): * libnautilus-extensions/nautilus-scalable-font.c: (nautilus_scalable_font_draw_text_lines_with_dimensions): * libnautilus-extensions/nautilus-theme.c: (nautilus_theme_make_selector): * librsvg/rsvg-ft.c: (rsvg_ft_get_glyph): * librsvg/test-ft-gtk.c: (set_text): * librsvg/test-ft.c: (save_pixbuf_to_file_internal), (save_pixbuf_to_file): * librsvg/test-rsvg.c: (save_pixbuf_to_file_internal), (save_pixbuf_to_file): * src/file-manager/fm-directory-view.c: (display_pending_files), (compute_menu_item_info): * src/file-manager/fm-icon-view.c: (compute_menu_item_info): * src/file-manager/fm-list-view.c: (get_column_from_attribute): * src/nautilus-application.c: (nautilus_application_startup): * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_next_new), (nautilus_search_bar_criterion_get_location), (get_date_modified_location_for): * src/nautilus-sidebar-tabs.c: (draw_one_tab_themed), (draw_or_layout_all_tabs): * src/nautilus-toolbar.c: (nautilus_toolbar_size_allocate): * src/nautilus-window-manage-views.c: (nautilus_window_get_current_location_title): * test/test-nautilus-label.c: (justification_changed_callback): Fix all the warnings -Wuninitialized found. Quite a number of them were actual bugs. Turn on -Wuninitialized in configure.in now that ORBit generates warning-free code.