nautilus/librsvg/rsvg-defs.c
Darin Adler 63bc589bc9 Ignore some additional generated files.
* components/services/install/command-line/.cvsignore:
	* components/services/install/lib/.cvsignore:
	Ignore some additional generated files.

	* libnautilus-extensions/nautilus-gnome-extensions.h:
	* libnautilus-extensions/nautilus-gnome-extensions.c:
	Moved stock dialog functions to nautilus-stock-dialogs.[ch].
	(nautilus_gnome_canvas_item_request_update_deep),
	(nautilus_gnome_canvas_request_update_all),
	(nautilus_gnome_canvas_set_scroll_region),
	(nautilus_gnome_canvas_set_scroll_region_left_justify):
	Added a bunch of functions that were previously private inside
	NautilusIconContainer.

	* libnautilus-extensions/nautilus-gtk-extensions.h:
	* libnautilus-extensions/nautilus-gtk-extensions.c:
	(nautilus_gtk_adjustment_set_value),
	(nautilus_gtk_adjustment_clamp_value):
	Added functions that treat the value range in a GtkAdjustment the
	same way scroll bars do, taking the page size into account.

	* libnautilus-extensions/nautilus-horizontal-splitter.h:
	* libnautilus-extensions/nautilus-horizontal-splitter.c:
	(nautilus_horizontal_splitter_initialize),
	(toggle_splitter_position),
	(nautilus_horizontal_splitter_button_press),
	(nautilus_horizontal_splitter_button_release):
	Fixed logic so that splitter will only open or close if you both
	click and release within the splitter itself.

	* libnautilus-extensions/nautilus-icon-private.h:
	* libnautilus-extensions/nautilus-icon-container.c:
	(icon_toggle_selected): Move icons to front when they are selected.
	(set_scroll_region): Moved workaround that sets scroll region to
	be large enough to fill the widget allocation into a function in
	nautilus-gnome-extensions.h. In the process, I fixed the problem
	where it would do the job wrong when the view was zoomed.
	(lay_down_icons), (relayout), (reload_icon_positions):
	Started work on sharing code between automatic layout of the entire
	container and layout of new icons as the arrive.
	(nautilus_icon_container_clear), (nautilus_icon_container_add):
	Got started on the mechanism for laying out new icons as they arrive
	in bunches instead of one at a time.

	* libnautilus-extensions/nautilus-icon-dnd.c:
	* libnautilus-extensions/nautilus-program-chooser.c:
	* libnautilus-extensions/nautilus-program-choosing.c:
	* src/file-manager/dfos-xfer.c:
	* src/file-manager/fm-directory-view.c:
	* src/file-manager/fm-error-reporting.c:
	* src/nautilus-application.c:
	* src/nautilus-location-bar.c:
	* src/nautilus-property-browser.c:
	* src/nautilus-window-manage-views.c:
	* src/nautilus-window-menus.c:
	Added includes to source files that use the stock dialogs.

	* libnautilus-extensions/nautilus-stock-dialogs.h:
	* libnautilus-extensions/nautilus-stock-dialogs.c:
	(nautilus_timed_wait_stop), (convert_varargs_to_name_array),
	(nautilus_simple_dialog), (turn_on_line_wrap_flag),
	(turn_on_line_wrap_flag_callback), (show_ok_box),
	(show_yes_no_box), (nautilus_info_dialog),
	(nautilus_info_dialog_parented), (nautilus_warning_dialog),
	(nautilus_warning_dialog_parented), (nautilus_error_dialog),
	(nautilus_error_dialog_parented), (nautilus_yes_no_dialog),
	(nautilus_yes_no_dialog_parented):
	Moved all the stock dialog code in here.

	* src/nautilus-sidebar-title.c: (update_icon): Only display the
	icon when it's ready, instead of showing generic document icon
	before that time.
	(update_title), (update_more_info), (update_emblems),
	(update_notes): Added FIXMEs about doing the same with other info.
	(nautilus_sidebar_title_button_press_event): Added a FIXME to the
	half-baked code in here.
2000-06-26 18:01:44 +00:00

69 lines
1.7 KiB
C

/*
rsvg-defs.c: Manage SVG defs and references.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Raph Levien <raph@artofcode.com>
*/
#include <glib.h>
#include "rsvg-defs.h"
struct _RsvgDefs {
GHashTable *hash;
};
RsvgDefs *
rsvg_defs_new (void)
{
RsvgDefs *result = g_new (RsvgDefs, 1);
result->hash = g_hash_table_new (g_str_hash, g_str_equal);
return result;
}
RsvgDefVal *
rsvg_defs_lookup (const RsvgDefs *defs, const char *name)
{
return (RsvgDefVal *)g_hash_table_lookup (defs->hash, name);
}
void
rsvg_defs_set (RsvgDefs *defs, const char *name, RsvgDefVal *val)
{
/* FIXME: Leaks a name and a val if there's already an entry in the table. */
g_hash_table_insert (defs->hash, g_strdup (name), val);
}
static void
rsvg_defs_free_each (gpointer key, gpointer value, gpointer user_data)
{
RsvgDefVal *def_val = (RsvgDefVal *)value;
g_free (key);
def_val->free (def_val);
}
void
rsvg_defs_free (RsvgDefs *defs)
{
g_hash_table_foreach (defs->hash, rsvg_defs_free_each, NULL);
g_hash_table_destroy (defs->hash);
g_free (defs);
}