Commit graph

8 commits

Author SHA1 Message Date
Ramiro Estrugo 8e0885068b Fix bug 8105 - GConf error getting font for icon view and text
view.

	* libnautilus/nautilus-view-standard-main.c:
	(nautilus_view_standard_main_multi):
	Move the post initialization callback to before the
	component's factory creation.  Otherwise bad things can happen if
	the component assumes that its post init function has already been
	called while in its factory code.  For example, if the post init
	function initialized nautilus preferences and the component
	factory executes code that uses nautilus preferences.
2001-04-20 07:26:25 +00:00
Ramiro Estrugo 92be31159f Add support for gettext. Add a post initialize callback so that callers
* libnautilus/nautilus-view-standard-main.h:
	* libnautilus/nautilus-view-standard-main.c:
	(nautilus_view_standard_main_multi), (nautilus_view_standard_main):
	Add support for gettext.  Add a post initialize callback so that
	callers can initialize any component specific stuff before the
	main even loop begins (nautilus preferences for example)
	Update for standard main changes.
	Add documentation for these functions.  Also add criticals to make
	the code a little bit more robust.

	* components/help/hyperbola-main.c: (main):
	* components/history/nautilus-history-view.c: (main):
	* components/music/main.c: (main):
	* components/notes/nautilus-notes.c: (main):
	* components/sample/main.c: (main):
	* components/text/main.c: (main):
	* components/tree/main.c: (main):
	Update for standard main changes.  Make these a little simpler by
	putting gettext support in standard main itself.  Also, make sure
	that components that use preferences initialize them.

	* src/nautilus-main.c: (main):
	Dont do the preferences initialization if we are about to kill the
	nautilus shell.
2001-04-13 03:53:10 +00:00
Maciej Stachowiak 9efcca8000 reviewed by: Gene Z. Ragan <gzr@eazel.com>
Added auto-prelighting feature to NautilusClickableImage, and
	fixed a major bug that occurs for clickable images in scrolled
	areas.

	* libnautilus-extensions/nautilus-clickable-image.h,
	libnautilus-extensions/nautilus-clickable-image.c:
	(nautilus_clickable_image_set_prelight): New public API call that
	allows for automatic prelight handling direct in
	NautilusClickableImage; made it settable because some users of
	this code want to manually prelight with an alternate image.
	(nautilus_clickable_image_set_up_pixbufs): helper function for the
	above that keeps track of the normal and prelit buffers.
	(label_enter, label_leave): When in prelight mode, switch images
	on enter and leave. Also, remove unnecessary queue_draw calls.

	(adjust_coordinates_for_window, ancestor_enter_notify_event,
	ancestor_leave_notify_event, ancestor_motion_notify_event): Do
	some coordinate adjustments so that if the NautilusClickableImage
	is in a scrolled area with NO_WINDOW widgets all the way in
	between, we do an appropriate coordinate adjustment. This should
	also handle other containers that put their children in a
	different window than their own. This was breaking for the summary
	view when I set it to use clickable images for the service icons.

	* libnautilus/nautilus-view-standard-main.c
	(nautilus_view_standard_main_multi): Do a g_thread_init to make
	views that use gnome-vfs happy.
2001-02-19 20:46:26 +00:00
Maciej Stachowiak 2fa1795d4a reviewed by: Darin Adler <darin@eazel.com> and
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.
2001-02-02 03:52:20 +00:00
Seth Nickell b535c341a2 Holy piss sprinkled on this by Arik <arik@eazel.com>
Fri Jan 26 23:58:42 2001  George Lebl <jirka@5z.com>

	Holy piss sprinkled on this by Arik <arik@eazel.com>

	* components/adapter/main.c (main)
	  components/help/hyperbola-main.c (main)
	  components/image-viewer/nautilus-image-view.c (init_server_factory)
	  components/mozilla/main.c (main)
	  components/music/main.c (main)
	  components/notes/nautilus-notes.c (main)
	  components/services/install/nautilus-view/main.c (main)
	  components/services/inventory/main.c (main)
	  components/services/login/nautilus-view/main.c (main)
	  components/services/summary/nautilus-view/main.c (main)
	  components/shell/shell.c (init_bonobo)
	  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):
	  Add gnome_client_disable_master_connection call to all out of
	  process component main functions since they should not register
	  with the session manager.  Fixes bug #6051

2001-01-26  Seth Nickell  <seth@eazel.com>
2001-01-27 04:56:11 +00:00
Maciej Stachowiak 3e3deab1d3 reviewed by: Pavel Cisler <pavel@eazel.com>
Fixed bug 5943 (Throbber crashes on nautilus startup (crashing
	Nautilus) with some themes and configurations)

	* components/help/hyperbola-main.c: (main):
	* components/image-viewer/nautilus-image-view.c:
	(init_server_factory):
	* components/mozilla/main.c: (main):
	* components/music/main.c: (main):
	* components/notes/nautilus-notes.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/shell/shell.c:
	* 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):
	* nautilus-installer/src/main.c: (main):
	* src/nautilus-main.c: (main): Added gdk_rgb_init calls. The
	throbber one was causing a real 100% reproducible crash for me on
	Nautilus startup, the rest are pre-emptive.
2001-01-23 12:08:41 +00:00
Pavel Cisler 4513aacc21 reviewed by: Rebecca Schulman <rebecka@eazel.com>
2001-01-04  Pavel Cisler  <pavel@eazel.com>

	reviewed by: Rebecca Schulman  <rebecka@eazel.com>

	Fix 5451 - GnomeVFS-WARNING received at startup.

	* libnautilus/nautilus-view-standard-main.c:
	(nautilus_view_standard_main_multi):
	New standard module initialization call was not initializing
	or shutting down gnome_vfs.

	* components/adapter/main.c: (main):
	* components/hardware/main.c: (main):
	* components/html/ntl-web-browser.c: (main):
	* components/mozilla/main.c: (main):
	* components/music/main.c: (main):
	* components/notes/nautilus-notes.c: (main):
	* components/rpmview/main.c: (main):
	* components/text/main.c: (main):
	* components/tree/main.c: (main):
	All of the above modules were initializing gnome_vfs but never
	shutting it down. Add proper gnome_vfs_shutdown call.
	This very likely fixes a problem with the notes module, etc.
	sticking around after Nautilus quits.
2001-01-05 04:27:19 +00:00
Maciej Stachowiak 8c61df4003 reviewed by: Darin Adler <darin@eazel.com>
* libnautilus/nautilus-view.c, libnautilus/nautilus-view.h
	(nautilus_view_construct,
	nautilus_view_construct_from_bonobo_control): New construct
	functions so it's possible for view implementations to be
	subclasses of NautilusView.
	(nautilus_view_new_from_bonobo_control): Implement in terms of construct function.
	* libnautilus/nautilus-view-standard-main.h,
	libnautilus/nautilus-view-standard-main.c:
	(nautilus_view_standard_main_multi, nautilus_view_standard_main,
	nautilus_view_create_from_get_type): New convenience functions
	that encapsulate and librarify most of the cut and pasted main.c
	code that is in every nautilus view.
	(object_destroyed, make_object): Helper functions.
	* libnautilus/Makefile.am: Add nautilus-view-standard-main.[ch] to
	build.
	* libnautilus/nautilus-view-component.idl: Add license header
	comment.

	* libnautilus-extensions/nautilus-gtk-macros.h: Lined up the
	backslashes to make it easier to read and edit the multi-line
	macros.

	* components/sample/README: Explain that all files in this
	directory have "WHAT YOU NEED TO CHANGE" comments.
	* components/sample/main.c (main): Implement in terms of
	`nautilus_view_standard_main' and removed most of the rest of this
	file. Now all you have to change when writing your own view is an
	include and some defines at the top of the file. Added "WHAT YOU
	NEED TO CHANGE" comment.
	* components/sample/nautilus-sample-content-view.h,
	components/sample/nautilus-sample-content-view.c: Added "WHAT YOU
	NEED TO CHANGE" comments.
	(nautilus_sample_content_view_get_type,
	nautilus_sample_content_view_initialize,
	nautilus_sample_content_view_destroy, load_location,
	sample_load_location_callback, bonobo_sample_callback,
	sample_merge_bonobo_items_callback): Changed everything around so
	NautilusSampleContentView inherits from Nautilus view, not
	GtkLabel (the widget that happens to be in the main content
	area). This makes a lot more sense. Also fix bug 2410 but
	including alternative code to nautilus-only macros.

	* components/sample/nautilus-sample-content-view.oafinfo: Added
	"WHAT YOU NEED TO CHANGE" comment.
	* components/sample/Makefile.am: Added "WHAT YOU NEED TO CHANGE" comment.
2000-12-21 21:41:46 +00:00