Commit graph

45 commits

Author SHA1 Message Date
Bradford Hovinen (Gdict maintainer)
575c8e852f Compilation fixes. 2001-11-25 14:57:03 +00:00
Bradford Hovinen (Gdict maintainer)
467b92037d GNOME 2.0 port. Changes too numerous to mention. 2001-11-10 20:51:12 +00:00
Bradford Hovinen
d2650b1049 Notice: I have not tested these changes on machines with support for multiple
simultaneous visuals. I will revert them if it turns out not to work in that
case.

Fixes Ximian bugzilla bug #10541

2001-10-12  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (render_to_screen): Use standard gdk and gdk_pixbuf
	rather than xlib and gdk_pixbuf_xlib
	(make_root_pixmap): Create a GdkPixmap
	(set_root_pixmap): Accept GdkPixmap and convert to X id
2001-10-12 14:09:24 +00:00
Bradford Hovinen
988e42c227 Use BONOBO_RET_EX rather than RETURN_IF_EX; remove the definition of the
2001-09-28  Bradford Hovinen  <hovinen@ximian.com>

	* preferences.c (preferences_load_from_bonobo_db):
	(preferences_load_from_bonobo_pbag): Use BONOBO_RET_EX rather than
	RETURN_IF_EX; remove the definition of the latter macro

	* applier.c (fill_gradient): Copied from control center 1.4.0
	(render_background): Create the pixbuf first and then pass to
	fill_gradient
	(render_to_screen): Use XLIB_RGB_DITHER_MAX rather than
	GDK_RGB_DITHER_NORMAL
2001-09-28 21:05:16 +00:00
Bradford Hovinen
ca6b2c78e6 Use GDK_RGB_DITHER_MAX rather than GDK_RGB_DITHER_NORMAL
2001-09-28  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (render_to_screen): Use GDK_RGB_DITHER_MAX rather
	than GDK_RGB_DITHER_NORMAL
2001-09-28 18:14:23 +00:00
Bradford Hovinen
4487cd8fcc Create the root pixmap after we know about the gradient geometry
2001-09-22  Bradford Hovinen  <hovinen@ximian.com>

        * applier.c (run_render_pipeline): Create the root pixmap after we
        know about the gradient geometry
        (place_pixbuf):
        (tile_pixbuf): Fix calls to gdk_pixbuf_composite[_color]
        (render_wallpaper): Fix setting of pixbuf_xlate
        (render_background): Fix pixbuf_render_geom here in case the
        gradient geometry is small
2001-09-22 22:23:56 +00:00
Bradford Hovinen
ee3356381a Total reorganization
2001-09-21  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c: Total reorganization

2001-09-17  Bradford Hovinen  <hovinen@ximian.com>

	* preferences.c (preferences_save): Move from
	applier.c:output_compat_prefs; it really belongs here
	(preferences_class_init): Don't construct an applier here

	* background-properties-capplet.c (setup_dialog): Create a new
	applier for every dialog
	(create_dialog): Create applier locally, just for this one widget
	(apply_settings): Create applier locally and destroy on exit
	(main): Remove call to gnome_window_set_...
2001-09-22 02:25:59 +00:00
Bradford Hovinen
862ce9a11b Use applier_render_color_p (real_realize_cb): Ditto
2001-09-14  Bradford Hovinen  <hovinen@ximian.com>

	* background-properties-capplet.c (property_change_cb): Use
	applier_render_color_p
	(real_realize_cb): Ditto

	* applier.c (applier_render_color_p): Renamed from
	applier_render_gradient_p; check both solid color and gradient

	* preferences.c (preferences_need_color_opts): Removed; use
	applier_render_color_p instead
2001-09-14 14:26:47 +00:00
Bradford Hovinen
84cbbbff3e Default to TRUE on enabled; check value of wallpaper_filename to set
2001-09-13  Bradford Hovinen  <hovinen@ximian.com>

	* preferences.c (preferences_load_from_bonobo_db):
	(preferences_load_from_bonobo_pbag): Default to TRUE on enabled;
	check value of wallpaper_filename to set wallpaper_enabled if
	wallpaper_enabled could not be found

	* background-properties-capplet.c (setup_dialog):
	(apply_settings): Check for error condition after creating
	preferences object

	* preferences.c (preferences_destroy): Make this static
	(read_color_from_string): Made argument const
	(bonobo_color_to_gdk): Made argument const
	(DB_GET_VALUE): Removed
	(PB_GET_VALUE): Removed
	(preferences_load_from_bonobo_pbag): Use
	local_bonobo_property_bag_client_get_value_{color|filename}
	(preferences_new_from_bonobo_db):
	(preferences_new_from_bonobo_pbag): Deallocate object and return
	NULL if there was an error
	(local_bonobo_property_bag_client_get_value_color):
	(local_bonobo_property_bag_client_get_value_filename): Implement
	(MAKE_GET_SIMPLE): Implement (copy from bonobo-conf)
	(preferences_load_from_bonobo_pbag): Read enabled property
	(preferences_load_from_bonobo_pbag): Forgive wallpaper_enabled and
	enabled not being found

	* applier.c (applier_render_gradient_p): Implement
	(applier_destroy): Make this static

	* preferences.c (preferences_load_from_bonobo_db): Use
	bonobo_config_get_boolean rather than BONOBO_ARG_GET_BOOLEAN
	(DB_GET_VALUE ()). Ditto bonobo_config_get_long
	(preferences_load_from_bonobo_db): Pass ev pointer to each call to
	bonobo_config_get_*
	(preferences_load_from_bonobo_db): Check ev pointer after each
	call to bonobo_config_get_* and return if an exception is set
	(preferences_load_from_bonobo_db): Allow the enabled flag not to
	be present in the database since some older configurations don't
	have it included
	(all): Remove support for compiling without bonobo-conf
2001-09-14 13:36:50 +00:00
Richard Hestilow
f29d4a9502 Redid UI a bit to add new enabled checkbox.
2001-09-07  Richard Hestilow  <hestilow@ximian.com>

	* background-properties.glade: Redid UI a bit to add new enabled
	checkbox.

	* background-properties.xml: Add default for "wallpaper_enabled".

	* preferences.[ch]: New function preferences_need_color_opts.
	(preferences_load_from_bonobo_db): Load wallpaper_enabled from
	bonobo-conf.
	(preferences_load_from_bonobo_pbag): Ditto.

	* applier.[ch]: New function applier_get_wallpaper_pixbuf
	(needed by preferences_need_color_opts, else pixbuf gets created
	twice).

	* background-properties-capplet.c (real_realize_cb): Set
	color frame sensitivity based on preferences_need_color_opts.
	(property_change_cb): Ditto.
	(setup_dialog): Add peditor/guard for wallpaper_enabled. Also,
	set glade object data on the preferences structure as well.
2001-09-08 00:42:11 +00:00
Bradford Hovinen
25d5132381 Output the correct value for wallpaperAlign
2001-08-28  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (output_compat_prefs): Output the correct value for
	wallpaperAlign
2001-08-28 13:42:49 +00:00
Bradford Hovinen
a82ec1573c Don't add the location to the list if it is marked deleted
2001-08-27  Bradford Hovinen  <hovinen@ximian.com>

	* archive.c (foreach_build_list_cb): Don't add the location to the
	list if it is marked deleted
	(impl_ConfigArchiver_Archive_createLocation): Do
	CORBA_Object_duplicate rather than bonobo_object_dup_ref

	* location.c (location_is_deleted): Implement

	* background-properties-capplet.c (setup_dialog): Initialize/free
	the CORBA environment structure
	(real_realize_cb): Put into an idle handler, called by
	realize_2_cb, the new timeout handler

	* preferences.c (preferences_load_from_bonobo_pbag):
	(preferences_load_from_bonobo_db): Extract from preferences_new_*

	* background-properties-capplet.c (property_change_cb):
	(realize_cb): Accept prefs structure in lieu of
	Bonobo_PropertyBag; don't reload the preferences structure from
	the property bag
	(property_change_cb): Call preferences_apply_event to modify the
	preferences structure appropriately
	(property_change_cb):
	(realize_cb): If the preferences structure is marked destroyed,
	just return
	(setup_dialog): Create a preferences structure from the property
	bag given and use that as the extra data passed to callbacks
	(realize_cb): Put into an idle handler real_realize_cb

	* preferences.c (preferences_apply_event): Implement

	* applier.c (output_compat_prefs): Make prefs const

	* applier.[ch]: Have applier_apply_prefs take a const Preferences
	structure

	* preferences.[ch]: Make preferences_clone take a const
	Preferences structure
2001-08-28 13:01:54 +00:00
Bradford Hovinen
145b5290e9 Adjust opacity value to 0...255 scale
2001-08-17  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (renderer_render_wallpaper): Adjust opacity value to
	0...255 scale

	* preferences.c (preferences_new_from_bonobo_pbag):
	(preferences_new_from_bonobo_db): Use correct check to disable
	opacity
2001-08-17 19:00:10 +00:00
Richard Hestilow
199846f5c0 Only draw disabled message if do_preview. Actually, the user will never
2001-08-13  Richard Hestilow  <hestilow@ximian.com>

 	* applier.c (applier_apply_prefs): Only draw disabled message
 	if do_preview. Actually, the user will never see this because
 	the correct behavior (which is done) is to assume if they're
 	running capplet, prefs->enable should be TRUE. This is because
 	we are only honoring enable as a hacker-only setting.
 	(output_compat_prefs): Output the correct "Enable" setting.

 	* background-properties-capplet.c (get_legacy_settings): Support
 	the "Enabled" flag.

 	* preferences.c (preferences_new_from_bonobo_db): Import the
 	"enabled" flag. Note that this is not bothered with in the _pbag
 	function, because that's from the Proxy settings, which is only
 	used for the GUI capplet, which always sets enabled to True, because
 	this is a hacker-only option. Got it?

	* background-properties.xml: Add "enabled".
2001-08-13 18:39:08 +00:00
Bradford Hovinen (Gdict maintainer)
9137adbe17 Backed out the last commit 2001-07-27 22:00:22 +00:00
Richard Hestilow
4a76138680 Only draw disabled message if do_preview. Actually, the user will never
2001-07-27  Richard Hestilow  <hestilow@ximian.com>

	* applier.c (applier_apply_prefs): Only draw disabled message
	if do_preview. Actually, the user will never see this because
	the correct behavior (which is done) is to assume if they're
	running capplet, prefs->enable should be TRUE. This is because
	we are only honoring enable as a hacker-only setting.
	(output_compat_prefs): Output the correct "Enable" setting.

	* background-properties-capplet.c (get_legacy_settings): Support
	the "Enabled" flag.

	* preferences.c (preferences_new_from_bonobo_db): Import the
	"enabled" flag. Note that this is not bothered with in the _pbag
	function, because that's from the Proxy settings, which is only
	used for the GUI capplet, which always sets enabled to True, because
	this is a hacker-only option. Got it?
2001-07-27 19:34:55 +00:00
Bradford Hovinen
9db70e8ea7 Don't try to load the wallpaper if it's not enabled
2001-07-26  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (applier_apply_prefs): Don't try to load the wallpaper
	if it's not enabled

	* preferences.c (preferences_new_from_bonobo_pbag): Use
	bonobo_property_editor_client_get_value_*
	(preferences_new_from_bonobo_pbag): Set gradient_enabled properly
	from property bag
	(preferences_new_from_bonobo_pbag): Check for wallpaper == "(none)"
	(preferences_new_from_bonobo_db): Ditto above
2001-07-27 02:49:48 +00:00
Bradford Hovinen
0336802107 Restore some lost tweaks from earlier.
2001-07-26  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (renderer_render_wallpaper): Restore some lost tweaks
	from earlier.

	* preferences.c (preferences_init): strdup the home directory

	* applier.c: Store preview widget in the renderer, not the applier
	itself
2001-07-27 02:15:42 +00:00
Richard Hestilow
dae9cccc0e Remove all bonobo-conf stuff.
2001-07-26  Richard Hestilow  <hestilow@ximian.com>

	* applier.c: Remove all bonobo-conf stuff.

	* preferences.[ch]: New functions preferences_new_from_bonobo_pbag
	and preferences_new_from_bonobo_db.
2001-07-27 01:43:48 +00:00
Bradford Hovinen
74b195efee Remove debugging code
2001-07-26  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (renderer_render_wallpaper): Remove debugging code
2001-07-26 19:00:07 +00:00
Bradford Hovinen
2bb839d277 Tweak geometry settings (renderer_render_wallpaper): Rendering geometry
2001-07-26  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (get_geometry): Tweak geometry settings
	(renderer_render_wallpaper): Rendering geometry fixes
2001-07-26 18:40:11 +00:00
Bradford Hovinen
804c0a33d5 Tweak geometry settings
2001-07-26  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (get_geometry): Tweak geometry settings
2001-07-26 17:20:45 +00:00
Bradford Hovinen
4e0ca4cae4 Make sure not to scale the pixbuf if the wallpaper type is centered
2001-07-26  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (renderer_render_wallpaper): Make sure not to scale
	the pixbuf if the wallpaper type is centered
2001-07-26 17:04:56 +00:00
Bradford Hovinen
6dbe99f68a Accept applier as argument; retrieve property bag from applier
2001-07-26  Bradford Hovinen  <hovinen@ximian.com>

	* background-properties-capplet.c (property_change_cb): Accept
	applier as argument; retrieve property bag from applier
	(realize_cb): Retrieve applier from widget
	(setup_dialog): Store property bag in applier

	* applier.c (renderer_new): Store applier inside renderer; accept
	applier as function parameter

	* background-properties-capplet.c (create_dialog): Store the
	applier inside the widget

	* applier.c (struct _ApplierPrivate ): Define preview_widget here
	rather than globally
	(applier_get_preview_widget): Make this a method of the applier class
2001-07-26 16:07:40 +00:00
Richard Hestilow
9ab051c8cf Write to gnome-config to make nautilus happy. (applier_apply_prefs):
2001-07-24  Richard Hestilow  <hestilow@ximian.com>

	* applier.c (output_compat_prefs): Write to gnome-config to make
	nautilus happy.
	(applier_apply_prefs): Change of is_nautilus_running handling
	logic to still output legacy settings. Also, call
	output_compat_prefs if is_root
.
2001-07-25 05:37:36 +00:00
Bradford Hovinen
679ecb4ced Don't adjust pixmap width
2001-07-23  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (renderer_render_wallpaper): Don't adjust pixmap width
2001-07-23 19:20:51 +00:00
Richard Hestilow
d163ad18cd remove debugging spew
2001-07-19  Richard Hestilow  <hestilow@ximian.com>

	* applier.c: remove debugging spew

	* main.c (get_legacy_settings): Fix for FileName corba type.
	(apply_settings): Check to make sure applier exists.
2001-07-19 22:39:46 +00:00
Richard Hestilow
801e66b748 bonobo-conf rewrite.
2001-07-19  Richard Hestilow  <hestilow@ximian.com>

	* bonobo-conf rewrite.
2001-07-19 21:05:43 +00:00
Bradford Hovinen
6c78ff23c8 Use vwidth and vheight rather than dwidth and dheight when computing
2001-07-19  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (get_geometry): Use vwidth and vheight rather than
	dwidth and dheight when computing aspect ratio
	(get_geometry): Adjust rwidth and rheight according to above change

	* preferences.c (preferences_changed): Disable auto-apply

	* background-properties.glade: Remove apply automatically check
	button; change "More Solid" to "More Opaque"
2001-07-19 14:44:47 +00:00
Richard Hestilow
efc06f6cc7 Handle properly the case where centered/tiled image is larger than the
2001-06-20  Richard Hestilow  <hestilow@ximian.com>

	* capplets/new-background-properties/applicer.c
	(get_geometry): Handle properly the case where centered/tiled
	image is larger than the screen/preview.
2001-06-20 16:36:01 +00:00
Bradford Hovinen
a5f7ac1dab Fixed nitems check (set_root_pixmap): Passing -1 makes the function just
2001-06-20  Bradford Hovinen  <hovinen@ximian.com>

	* capplets/new-background-properties/applier.c
	(is_nautilus_running): Fixed nitems check
	(set_root_pixmap): Passing -1 makes the function just set the
	pixmap to what it was
2001-06-20 15:50:59 +00:00
Bradford Hovinen
1455dedadd Remove FIXME warning (applier_apply_prefs): Disable wallpaper in new_prefs
2001-04-24  Bradford Hovinen  <hovinen@ximian.com>

	* applier.c (applier_apply_prefs): Remove FIXME warning
	(applier_apply_prefs): Disable wallpaper in new_prefs structure if
	the wallpaper pixbuf is NULL and we are not loading a new pixbuf
2001-04-25 01:32:13 +00:00
Bradford Hovinen
427ef6c2d6 Disable wallpaper in new_prefs structure, not structure passed to function
2001-01-27  Bradford Hovinen  <hovinen@ximian.com>

	* capplets/new-background-properties/applier.c
	(applier_apply_prefs): Disable wallpaper in new_prefs structure,
	not structure passed to function

2001-01-26  Bradford Hovinen  <hovinen@ximian.com>

	* capplets/new-background-properties/main.c
	(do_restore_from_defaults): Implement. Creates a preferences
	object with factory defaults and saves and applies those changes.
2001-01-27 17:14:59 +00:00
Jacob Berkman
d42affc965 Merging of my tree.
This contains:

* a few capplets were redone UI wise:

  ui-properties
  keyboard
  background-properties

* splitting of libcapplet out of this modules (into libcapplet)

* new html-based view in the control-center

* initial import of functional root-manager

This stuff isn't all done yet, but I wanted to get it in.

TODO files will hopefully follow.
2000-12-26 19:41:33 +00:00
Bradford Hovinen
0f67cd0cd0 Prescale the pixbuf before a tiled composite
2000-12-22  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/applier.c
	(renderer_render_wallpaper): Prescale the pixbuf before a tiled
	composite
2000-12-22 16:09:04 +00:00
Bradford Hovinen (Gdict maintainer)
4f87fefb51 Uncommented commented-out XGrabServer/XUngrabServer 2000-12-21 20:43:59 +00:00
Bradford Hovinen
5493103f0b Check if nitems is 1, not 4 (set_root_pixmap): Do a sanity check on the
2000-12-21  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/applier.c (set_root_pixmap):
	Check if nitems is 1, not 4
	(set_root_pixmap): Do a sanity check on the old pixmap before
	freeing it
2000-12-21 20:43:13 +00:00
Bradford Hovinen
749b0a33a3 Change the meaning of brightness to mean opacity (tile_composite):
2000-12-18  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/applier.c
	(renderer_render_wallpaper): Change the meaning of brightness to
	mean opacity
	(tile_composite): Implement
	(render_gradient_p): Return TRUE if the opacity should be adjusted

	* capplets/new-background-properties/prefs-widget.c: Change
	instances of brightness to refer to opacity

	* capplets/new-background-properties/preferences.c: Ditto
2000-12-18 15:09:36 +00:00
Bradford Hovinen
480213cab5 Add support for adjusting wallpaper brightness
2000-12-17  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/applier.c
	(renderer_render_wallpaper): Add support for adjusting wallpaper
	brightness

	* capplets/new-background-properties/main.c (ok_cb):
	(cancel_cb): Disconnect ok, cancel handler signals before
	destroying preferences widget
	(setup_capplet_widget): Set signal handler ids for ok, cancel
	signals

	* capplets/new-background-properties/prefs-widget.c
	(prefs_widget_init): Connect signals for adjusting brightness
	(adjust_brightness_toggled_cb):
	(brightness_adjust_changed_cb):
	(set_brightness_controls_sensitive): Implement

	* capplets/new-background-properties/preferences.h (struct
	_Preferences): Add adjust_brightness, brightness_value

	* capplets/new-background-properties/preferences.c (preferences_load):
	(preferences_save):
	(preferences_read_xml):
	(preferences_write_xml): Support adjust_brightness, brightness_value

	* capplets/new-background-properties/prefs-widget.c
	(wallpaper_entry_changed_cb): Don't fail if prefs is NULL, just
	return

	* capplets/new-background-properties/main.c (ok_cb):
	(cancel_cb): Properly destroy the preferences widget

	* capplets/new-background-properties/prefs-widget.c
	(prefs_widget_destroy): Implement
2000-12-18 00:34:29 +00:00
Bradford Hovinen
8d8010f252 Increased delay before autoapply
2000-12-17  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/preferences.c
	(preferences_changed): Increased delay before autoapply

	* capplets/new-background-properties/prefs-widget.c
	(auto_apply_toggled_cb): Implement
	(read_preferences):
	(prefs_widget_init): Support auto_apply

	* capplets/new-background-properties/preferences.h (struct
	_Preferences): Add auto_apply
	* capplets/new-background-properties/preferences.c
	(preferences_write_xml):
	(preferences_read_xml):
	(preferences_load):
	(preferences_save): Support auto_apply

	* capplets/new-background-properties/applier.c (struct _Renderer):
	Added srcx, srcy to clip wallpaper when it is too big
	(get_geometry): Set srcx and srcy
	(renderer_render_to_screen): Tweak rendering geometry to stay
	within the wallpaper area on the drawable

	* capplets/new-background-properties/prefs-widget.c
	(wallpaper_entry_changed_cb): Make sure the file specified is
	actually a file

	* capplets/new-background-properties/main.c (do_set_xml): Default
	NULL for buffer
2000-12-17 21:44:20 +00:00
Bradford Hovinen
9d9e373a33 Default NULL for buffer
2000-12-17  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/main.c (do_set_xml): Default
	NULL for buffer

	* capplets/new-background-properties/applier.c
	(is_nautilus_running): Return if there is no Nautilus window
	property
2000-12-17 19:05:11 +00:00
Bradford Hovinen
655abbdda8 Fix only_if_exists parameters for XInternAtom
2000-10-21  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/applier.c
	(is_nautilus_running): Fix only_if_exists parameters for XInternAtom
2000-10-21 21:26:04 +00:00
Bradford Hovinen
edc0b7480c If the passed pixmap is None, delete the root pixmap properties and don't
2000-10-21  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/applier.c (set_root_pixmap):
	If the passed pixmap is None, delete the root pixmap properties
	and don't try to set the background on the root window
	(is_nautilus_running): Implement. Return TRUE iff Nautilus is
	running, FALSE otherwise
	(applier_apply_prefs): If Nautilus is running and we are rendering
	to the root pixmap, just remove the root pixmap window property
	(renderer_render_to_screen): Set root pixmap to None (i.e.,
	destroy root pixmap) if we're rendering a solid background to the
	root window
2000-10-21 21:22:45 +00:00
Bradford Hovinen
589923f166 Set gradient/wallpaper/background controls' sensitivity depending on
2000-09-10  Bradford Hovinen  <hovinen@helixcode.com>

	* capplets/new-background-properties/prefs-widget.c
	(read_preferences): Set gradient/wallpaper/background controls'
	sensitivity depending on whether they are enabled

	* capplets/new-background-properties/applier.c
	(renderer_render_to_screen): Fixed solid, no wallpaper case to
	work correctly with preview window; don't set root pixmap if
	neither wallpaper nor gradient enabled
2000-09-10 19:42:19 +00:00
Bradford Hovinen (Gdict maintainer)
818c4291c1 Created new background properties capplet, under new-background-properties 2000-09-09 23:21:28 +00:00