Commit 8efa4d71 authored by Darin Adler's avatar Darin Adler

Did some of the renamings that were queued in RENAMING.

	* libnautilus/Makefile.am:
	* libnautilus/gdk-extensions.c:
	* libnautilus/gdk-extensions.h:
	* libnautilus/nautilus-gdk-extensions.c:
	* libnautilus/nautilus-gdk-extensions.h:
	* libnautilus/gnome-icon-container.c:
	* libnautilus/nautilus-background.c:
	* libnautilus/nautilus-icons-view-icon-item.c:
	Renamed gdk-extensions to add the nautilus- prefix and changed
	all includers.

	* src/Makefile.am:
	* src/explorer-location-bar.c:
	* src/explorer-location-bar.h:
	* src/nautilus-location-bar.c:
	* src/nautilus-location-bar.h:
	* src/ntl-window-msgs.c:
	* src/ntl-window.c:
	Renamed ExplorerLocationBar to NautilusLocationBar.

	* src/Makefile.am:
	* src/nautilus-bookmarklist.c:
	* src/nautilus-bookmarklist.h:
	* src/nautilus-bookmark-list.c:
	* src/nautilus-bookmark-list.h:
	* src/nautilus-bookmarks-window.c:
	* src/nautilus-bookmarks-window.h:
	* src/nautilus-window-menus.c:
	Renamed NautilusBookmarklist to NautilusBookmarkList.

	* RENAMING: Marked items done and added some new ones.

	* nautilus-widgets/nautilus-preferences-item.c:
	* nautilus-widgets/nautilus-preferences.c:
	* nautilus-widgets/test-nautilus-widgets.c:
	* libnautilus/nautilus-icon-factory.c:
	* src/file-manager/fm-directory-view-icons.c:
	* src/file-manager/fm-directory-view.c:
	* src/file-manager/fm-icon-text-window.c:
	Cleaned up the interface to NautilusPreferences a bit.
parent 3ffd2251
2000-03-16 Darin Adler <darin@eazel.com>
Did some of the renamings that were queued in RENAMING.
* libnautilus/Makefile.am:
* libnautilus/gdk-extensions.c:
* libnautilus/gdk-extensions.h:
* libnautilus/nautilus-gdk-extensions.c:
* libnautilus/nautilus-gdk-extensions.h:
* libnautilus/gnome-icon-container.c:
* libnautilus/nautilus-background.c:
* libnautilus/nautilus-icons-view-icon-item.c:
Renamed gdk-extensions to add the nautilus- prefix and changed
all includers.
* src/Makefile.am:
* src/explorer-location-bar.c:
* src/explorer-location-bar.h:
* src/nautilus-location-bar.c:
* src/nautilus-location-bar.h:
* src/ntl-window-msgs.c:
* src/ntl-window.c:
Renamed ExplorerLocationBar to NautilusLocationBar.
* src/Makefile.am:
* src/nautilus-bookmarklist.c:
* src/nautilus-bookmarklist.h:
* src/nautilus-bookmark-list.c:
* src/nautilus-bookmark-list.h:
* src/nautilus-bookmarks-window.c:
* src/nautilus-bookmarks-window.h:
* src/nautilus-window-menus.c:
Renamed NautilusBookmarklist to NautilusBookmarkList.
* RENAMING: Marked items done and added some new ones.
* nautilus-widgets/nautilus-preferences-item.c:
* nautilus-widgets/nautilus-preferences.c:
* nautilus-widgets/test-nautilus-widgets.c:
* libnautilus/nautilus-icon-factory.c:
* src/file-manager/fm-directory-view-icons.c:
* src/file-manager/fm-directory-view.c:
* src/file-manager/fm-icon-text-window.c:
Cleaned up the interface to NautilusPreferences a bit.
2000-03-16 John Sullivan <sullivan@eazel.com>
Fixes for a couple of preferences bugs Darin and I ran into
......
We put plans for renaming in here so we can think about them for a while.
Note that when we rename a class, it usually involves renaming some files too.
---
gdk-extensions.[ch] -> nautilus-gdk-extensions.[ch]
ntl* -> nautilus* (1)
ExplorerLocationBar -> NautilusLocationBar
GnomeIconContainer -> NautilusIconContainer
NautilusIconsViewIconItem -> NautilusIconContainerItem
GtkFList -> NautilusList
NautilusViewFrame <--> NautilusView (2)
ntl-view-bonobo-subdoc -> ntl-view-bonobo-embeddable (see also 1, 2)
FMDirectoryViewIcons -> FMDirectoryIconView
FMDirectoryViewList -> FMDirectoryListView
NautilusBookmarklist -> NautilusBookmarkList
nautilus-bookmarklist* -> nautilus-bookmark-list*
NautilusViewFrame <--> NautilusView (2)
nautilus_has_prefix -> nautilus_str_has_prefix
nautilus_has_suffix -> nautilus_str_has_suffix
GnomeIconContainer -> NautilusIconContainer
GnomeIconContainerIcon -> NautilusIcon
NautilusIconsViewIconItem -> NautilusIconCanvasItem
ntl-view-bonobo-subdoc -> ntl-view-bonobo-embeddable (see also 1, 2)
GtkFList -> NautilusList
GtkScrollFrame -> NautilusScrollFrame
......@@ -28,7 +28,6 @@ BUILT_SOURCES=$(nautilus_idl_sources)
libnautilusincludedir=$(includedir)/libnautilus
libnautilusinclude_HEADERS= \
bonobo-stream-vfs.h \
gdk-extensions.h \
gnome-icon-container.h \
gtkflist.h \
gtkscrollframe.h \
......@@ -41,6 +40,7 @@ libnautilusinclude_HEADERS= \
nautilus-directory.h \
nautilus-file-utilities.h \
nautilus-file.h \
nautilus-gdk-extensions.h \
nautilus-glib-extensions.h \
nautilus-global-preferences.h \
nautilus-gnome-extensions.h \
......@@ -62,7 +62,6 @@ libnautilusinclude_HEADERS= \
libnautilus_la_SOURCES=$(nautilus_idl_sources) \
bonobo-stream-vfs.c \
gdk-extensions.c \
gnome-icon-container.c \
gnome-icon-container-dnd.c \
gnome-icon-container-grid.c \
......@@ -78,6 +77,7 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
nautilus-directory.c \
nautilus-file-utilities.c \
nautilus-file.c \
nautilus-gdk-extensions.c \
nautilus-glib-extensions.c \
nautilus-global-preferences.c \
nautilus-gnome-extensions.c \
......
......@@ -34,8 +34,8 @@
#include <libgnomeui/gnome-canvas-rect-ellipse.h>
#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
#include "gdk-extensions.h"
#include "nautilus-glib-extensions.h"
#include "nautilus-gdk-extensions.h"
#include "nautilus-gtk-extensions.h"
#include "nautilus-gtk-macros.h"
#include "nautilus-lib-self-check-functions.h"
......
......@@ -26,7 +26,7 @@
#include "nautilus-background.h"
#include <gtk/gtksignal.h>
#include "gdk-extensions.h"
#include "nautilus-gdk-extensions.h"
#include "nautilus-background-canvas-group.h"
#include "nautilus-lib-self-check-functions.h"
#include "nautilus-gtk-macros.h"
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
gdk-extensions.c: Graphics routines to augment what's in gdk.
/* nautilus-gdk-extensions.c: Graphics routines to augment what's in gdk.
Copyright (C) 1999, 2000 Eazel, Inc.
......@@ -23,7 +23,7 @@
*/
#include <config.h>
#include "gdk-extensions.h"
#include "nautilus-gdk-extensions.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "nautilus-lib-self-check-functions.h"
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
gdk-extensions.h: Graphics routines to augment what's in gdk.
/* nautilus-gdk-extensions.h: Graphics routines to augment what's in gdk.
Copyright (C) 1999, 2000 Eazel, Inc.
......@@ -22,10 +22,10 @@
Authors: Darin Adler <darin@eazel.com>
*/
#ifndef GDK_EXTENSIONS_H
#define GDK_EXTENSIONS_H
#ifndef NAUTILUS_GDK_EXTENSIONS_H
#define NAUTILUS_GDK_EXTENSIONS_H
#include <gdk/gdk.h>
#include <gdk/gdktypes.h>
/* A gradient spec. is a string that contains a specifier for either a
color or a gradient. If the string has a "-" in it, then it's a gradient.
......@@ -89,4 +89,4 @@ void nautilus_gdk_pixbuf_list_ref (GList *pixbuf
void nautilus_gdk_pixbuf_list_unref (GList *pixbuf_list);
void nautilus_gdk_pixbuf_list_free (GList *pixbuf_list);
#endif /* GDK_EXTENSIONS_H */
#endif /* NAUTILUS_GDK_EXTENSIONS_H */
......@@ -139,7 +139,6 @@ typedef struct {
/* id of timeout task for making thumbnails */
int timeout_task_id;
} NautilusIconFactory;
typedef struct {
......@@ -180,18 +179,18 @@ typedef struct {
/* forward declarations */
static void icon_theme_changed_callback (const GtkObject *prefs,
const gchar *pref_name,
GtkFundamentalType pref_type,
gconstpointer pref_value,
gpointer user_data);
static void icon_theme_changed_callback (NautilusPreferences *preferences,
const char *name,
NautilusPreferencesType type,
gconstpointer value,
gpointer user_data);
static GtkType nautilus_icon_factory_get_type (void);
static void nautilus_icon_factory_initialize_class (NautilusIconFactoryClass *class);
static void nautilus_icon_factory_initialize (NautilusIconFactory *factory);
static NautilusIconFactory * nautilus_get_current_icon_factory (void);
static char * nautilus_icon_factory_get_thumbnail_uri (NautilusFile *file);
static NautilusIconFactory * nautilus_icon_factory_new (const char *theme_name);
void nautilus_icon_factory_set_theme (const char *theme_name);
static void nautilus_icon_factory_set_theme (const char *theme_name);
static NautilusScalableIcon *nautilus_scalable_icon_get (const char *uri,
const char *name);
static guint nautilus_scalable_icon_hash (gconstpointer p);
......@@ -235,7 +234,7 @@ nautilus_get_current_icon_factory (void)
nautilus_preferences_add_callback (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_ICON_THEME,
icon_theme_changed_callback,
(gpointer) global_icon_factory);
NULL);
}
return global_icon_factory;
......@@ -326,7 +325,7 @@ nautilus_icon_factory_destroy (NautilusIconFactory *factory)
nautilus_preferences_remove_callback (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_ICON_THEME,
icon_theme_changed_callback,
(gpointer) factory);
NULL);
nautilus_icon_factory_clear ();
g_hash_table_destroy (factory->icon_cache);
......@@ -584,21 +583,19 @@ get_icon_file_path (const char *name, guint size_in_pixels, ArtIRect *text_rect)
}
static void
icon_theme_changed_callback (const GtkObject *prefs,
const gchar *pref_name,
GtkFundamentalType pref_type,
gconstpointer pref_value,
icon_theme_changed_callback (NautilusPreferences *preferences,
const char *name,
GtkFundamentalType type,
gconstpointer value,
gpointer user_data)
{
NautilusIconFactory *icon_factory;
g_assert (user_data != NULL);
g_assert (prefs != NULL);
g_assert (pref_name != NULL);
icon_factory = (NautilusIconFactory *)user_data;
g_assert (NAUTILUS_IS_PREFERENCES (preferences));
g_assert (strcmp (name, NAUTILUS_PREFERENCES_ICON_THEME) == 0);
g_assert (type == NAUTILUS_PREFERENCE_STRING);
g_assert (value != NULL);
g_assert (user_data == NULL);
nautilus_icon_factory_set_theme ((char *)pref_value);
nautilus_icon_factory_set_theme ((char *) value);
}
/* Get or create a scalable icon. */
......
......@@ -35,7 +35,7 @@
#include "gnome-icon-container-private.h"
#include "nautilus-string.h"
#include "nautilus-glib-extensions.h"
#include "gdk-extensions.h"
#include "nautilus-gdk-extensions.h"
#include "nautilus-gtk-macros.h"
#include "nautilus-gnome-extensions.h"
......
......@@ -246,7 +246,7 @@ preferences_item_construct (NautilusPreferencesItem *item,
item->details->prefs = prefs;
item->details->pref_name = g_strdup (pref_name);
pref_info = nautilus_preferences_get_pref_info (NAUTILUS_PREFS (item->details->prefs),
pref_info = nautilus_preferences_get_pref_info (NAUTILUS_PREFERENCES (item->details->prefs),
item->details->pref_name);
g_assert (pref_info != NULL);
......@@ -297,11 +297,11 @@ preferences_item_create_enum (NautilusPreferencesItem *item,
item->details->child = nautilus_radio_button_group_new ();
enum_info = (NautilusPreferencesEnumData *) pref_info->type_data;
enum_info = (NautilusPreferencesEnumData *) pref_info->data;
g_assert (enum_info != NULL);
value = nautilus_preferences_get_enum (NAUTILUS_PREFS (item->details->prefs),
value = nautilus_preferences_get_enum (NAUTILUS_PREFERENCES (item->details->prefs),
item->details->pref_name);
for (i = 0; i < enum_info->num_entries; i++)
......@@ -334,11 +334,11 @@ preferences_item_create_boolean (NautilusPreferencesItem *item,
g_assert (item->details->prefs != NULL);
g_assert (item->details->pref_name != NULL);
g_assert (pref_info->pref_description != NULL);
g_assert (pref_info->description != NULL);
item->details->child = gtk_check_button_new_with_label (pref_info->pref_description);
item->details->child = gtk_check_button_new_with_label (pref_info->description);
value = nautilus_preferences_get_boolean (NAUTILUS_PREFS (item->details->prefs),
value = nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES (item->details->prefs),
item->details->pref_name);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item->details->child), value);
......@@ -381,7 +381,7 @@ enum_radio_group_changed_cb (GtkWidget *buttons, GtkWidget * button, gpointer us
i = nautilus_radio_button_group_get_active_index (NAUTILUS_RADIO_BUTTON_GROUP (buttons));
nautilus_preferences_set_enum (NAUTILUS_PREFS (item->details->prefs),
nautilus_preferences_set_enum (NAUTILUS_PREFERENCES (item->details->prefs),
item->details->pref_name,
i);
}
......@@ -396,7 +396,7 @@ boolean_button_toggled_cb (GtkWidget *button, gpointer user_data)
active_state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
nautilus_preferences_set_boolean (NAUTILUS_PREFS (item->details->prefs),
nautilus_preferences_set_boolean (NAUTILUS_PREFERENCES (item->details->prefs),
item->details->pref_name,
active_state);
}
......@@ -25,28 +25,25 @@
#ifndef NAUTILUS_PREFERENCES_H
#define NAUTILUS_PREFERENCES_H
#include <gtk/gtkhbox.h>
#include <nautilus-widgets/nautilus-preferences-pane.h>
#include <gtk/gtkobject.h>
#include <libgnome/gnome-defs.h>
BEGIN_GNOME_DECLS
#define NAUTILUS_TYPE_PREFS (nautilus_preferences_get_type ())
#define NAUTILUS_PREFS(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_PREFS, NautilusPreferences))
#define NAUTILUS_PREFERENCES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_PREFS, NautilusPreferencesClass))
#define NAUTILUS_IS_PREFS(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_PREFS))
#define NAUTILUS_IS_PREFS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_PREFS))
#define NAUTILUS_TYPE_PREFERENCES (nautilus_preferences_get_type ())
#define NAUTILUS_PREFERENCES(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_PREFERENCES, NautilusPreferences))
#define NAUTILUS_PREFERENCES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_PREFERENCES, NautilusPreferencesClass))
#define NAUTILUS_IS_PREFERENCES(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_PREFERENCES))
#define NAUTILUS_IS_PREFERENCES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_PREFERENCES))
typedef struct _NautilusPreferences NautilusPreferences;
typedef struct _NautilusPreferencesClass NautilusPreferencesClass;
typedef struct _NautilusPreferencesDetails NautilusPreferencesDetails;
typedef struct NautilusPreferences NautilusPreferences;
typedef struct NautilusPreferencesClass NautilusPreferencesClass;
typedef struct NautilusPreferencesDetails NautilusPreferencesDetails;
struct _NautilusPreferences
struct NautilusPreferences
{
/* Super Class */
GtkObject object;
/* Private stuff */
NautilusPreferencesDetails *details;
GtkObject object;
NautilusPreferencesDetails *details;
};
/*
......@@ -63,74 +60,71 @@ typedef enum
* A callback which you can register to to be notified when a particular
* preference changes.
*/
typedef void (*NautilusPreferencesCallback) (const GtkObject *prefs,
const gchar *pref_name,
NautilusPreferencesType pref_type,
gconstpointer pref_value,
gpointer user_data);
typedef void (*NautilusPreferencesCallback) (NautilusPreferences *preferences,
const char *name,
NautilusPreferencesType type,
gconstpointer value,
gpointer user_data);
struct _NautilusPreferencesClass
struct NautilusPreferencesClass
{
GtkObjectClass object_class;
GtkObjectClass object_class;
};
typedef struct
{
gchar *pref_name;
gchar *pref_description;
NautilusPreferencesType pref_type;
gconstpointer pref_default_value;
gpointer type_data;
char *name;
char *description;
NautilusPreferencesType type;
gconstpointer default_value;
gpointer data;
} NautilusPreferencesInfo;
typedef struct
{
const gchar **enum_names;
const gchar **enum_descriptions;
const gint *enum_values;
guint num_entries;
const char **enum_names;
const char **enum_descriptions;
const int *enum_values;
guint num_entries;
} NautilusPreferencesEnumData;
GtkType nautilus_preferences_get_type (void);
GtkObject* nautilus_preferences_new (const gchar *domain);
void nautilus_preferences_register_from_info (NautilusPreferences *prefs,
GtkObject * nautilus_preferences_new (const char *domain);
void nautilus_preferences_register_from_info (NautilusPreferences *preferences,
const NautilusPreferencesInfo *pref_info);
void nautilus_preferences_register_from_values (NautilusPreferences *prefs,
gchar *pref_name,
gchar *pref_description,
NautilusPreferencesType pref_type,
gconstpointer pref_default_value,
gpointer type_data);
const NautilusPreferencesInfo *nautilus_preferences_get_pref_info (NautilusPreferences *prefs,
const gchar *pref_name);
gboolean nautilus_preferences_add_callback (NautilusPreferences *prefs,
const gchar *pref_name,
void nautilus_preferences_register_from_values (NautilusPreferences *preferences,
char *name,
char *description,
NautilusPreferencesType type,
gconstpointer default_value,
gpointer data);
const NautilusPreferencesInfo *nautilus_preferences_get_pref_info (NautilusPreferences *preferences,
const char *name);
gboolean nautilus_preferences_add_callback (NautilusPreferences *preferences,
const char *name,
NautilusPreferencesCallback callback,
gpointer user_data);
gboolean nautilus_preferences_remove_callback (NautilusPreferences *prefs,
const gchar *pref_name,
gboolean nautilus_preferences_remove_callback (NautilusPreferences *preferences,
const char *name,
NautilusPreferencesCallback callback,
gpointer user_data);
void nautilus_preferences_set_boolean (NautilusPreferences *prefs,
const gchar *pref_name,
gboolean boolean_value);
gboolean nautilus_preferences_get_boolean (NautilusPreferences *prefs,
const gchar *pref_name);
void nautilus_preferences_set_enum (NautilusPreferences *prefs,
const gchar *pref_name,
gint enum_value);
gint nautilus_preferences_get_enum (NautilusPreferences *prefs,
const gchar *pref_name);
void nautilus_preferences_set_string (NautilusPreferences *prefs,
const gchar *pref_name,
const char *string_value);
char * nautilus_preferences_get_string (NautilusPreferences *prefs,
const gchar *pref_name);
void nautilus_preferences_set_boolean (NautilusPreferences *preferences,
const char *name,
gboolean value);
gboolean nautilus_preferences_get_boolean (NautilusPreferences *preferences,
const char *name);
void nautilus_preferences_set_enum (NautilusPreferences *preferences,
const char *name,
int value);
int nautilus_preferences_get_enum (NautilusPreferences *preferences,
const char *name);
void nautilus_preferences_set_string (NautilusPreferences *preferences,
const char *name,
const char *value);
char * nautilus_preferences_get_string (NautilusPreferences *preferences,
const char *name);
NautilusPreferences * nautilus_preferences_get_global_preferences (void);
BEGIN_GNOME_DECLS
#endif /* NAUTILUS_PREFERENCES_H */
......@@ -212,16 +212,15 @@ create_dummy_prefs (void)
dummy_prefs = nautilus_preferences_new ("dummy");
/* Register the static prefs */
for (i = 0; i < 3; i++)
{
nautilus_preferences_register_from_info (NAUTILUS_PREFS (dummy_prefs),
&prefs_global_static_pref_info[i]);
for (i = 0; i < 3; i++) {
nautilus_preferences_register_from_info (NAUTILUS_PREFERENCES (dummy_prefs),
&prefs_global_static_pref_info[i]);
}
nautilus_preferences_set_enum (NAUTILUS_PREFS (dummy_prefs),
"user_level",
2);
nautilus_preferences_set_enum (NAUTILUS_PREFERENCES (dummy_prefs),
"user_level",
2);
return dummy_prefs;
}
......@@ -28,7 +28,6 @@ BUILT_SOURCES=$(nautilus_idl_sources)
libnautilusincludedir=$(includedir)/libnautilus
libnautilusinclude_HEADERS= \
bonobo-stream-vfs.h \
gdk-extensions.h \
gnome-icon-container.h \
gtkflist.h \
gtkscrollframe.h \
......@@ -41,6 +40,7 @@ libnautilusinclude_HEADERS= \
nautilus-directory.h \
nautilus-file-utilities.h \
nautilus-file.h \
nautilus-gdk-extensions.h \
nautilus-glib-extensions.h \
nautilus-global-preferences.h \
nautilus-gnome-extensions.h \
......@@ -62,7 +62,6 @@ libnautilusinclude_HEADERS= \
libnautilus_la_SOURCES=$(nautilus_idl_sources) \
bonobo-stream-vfs.c \
gdk-extensions.c \
gnome-icon-container.c \
gnome-icon-container-dnd.c \
gnome-icon-container-grid.c \
......@@ -78,6 +77,7 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
nautilus-directory.c \
nautilus-file-utilities.c \
nautilus-file.c \
nautilus-gdk-extensions.c \
nautilus-glib-extensions.c \
nautilus-global-preferences.c \
nautilus-gnome-extensions.c \
......
......@@ -34,8 +34,8 @@
#include <libgnomeui/gnome-canvas-rect-ellipse.h>
#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
#include "gdk-extensions.h"
#include "nautilus-glib-extensions.h"
#include "nautilus-gdk-extensions.h"
#include "nautilus-gtk-extensions.h"
#include "nautilus-gtk-macros.h"
#include "nautilus-lib-self-check-functions.h"
......
......@@ -26,7 +26,7 @@
#include "nautilus-background.h"
#include <gtk/gtksignal.h>
#include "gdk-extensions.h"
#include "nautilus-gdk-extensions.h"
#include "nautilus-background-canvas-group.h"
#include "nautilus-lib-self-check-functions.h"
#include "nautilus-gtk-macros.h"
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
gdk-extensions.c: Graphics routines to augment what's in gdk.
/* nautilus-gdk-extensions.c: Graphics routines to augment what's in gdk.
Copyright (C) 1999, 2000 Eazel, Inc.
......@@ -23,7 +23,7 @@
*/
#include <config.h>
#include "gdk-extensions.h"
#include "nautilus-gdk-extensions.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "nautilus-lib-self-check-functions.h"
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
gdk-extensions.h: Graphics routines to augment what's in gdk.
/* nautilus-gdk-extensions.h: Graphics routines to augment what's in gdk.
Copyright (C) 1999, 2000 Eazel, Inc.
......@@ -22,10 +22,10 @@
Authors: Darin Adler <darin@eazel.com>
*/
#ifndef GDK_EXTENSIONS_H
#define GDK_EXTENSIONS_H
#ifndef NAUTILUS_GDK_EXTENSIONS_H
#define NAUTILUS_GDK_EXTENSIONS_H
#include <gdk/gdk.h>
#include <gdk/gdktypes.h>
/* A gradient spec. is a string that contains a specifier for either a
color or a gradient. If the string has a "-" in it, then it's a gradient.
......@@ -89,4 +89,4 @@ void nautilus_gdk_pixbuf_list_ref (GList *pixbuf
void nautilus_gdk_pixbuf_list_unref (GList *pixbuf_list);
void nautilus_gdk_pixbuf_list_free (GList *pixbuf_list);
#endif /* GDK_EXTENSIONS_H */
#endif /* NAUTILUS_GDK_EXTENSIONS_H */
......@@ -139,7 +139,6 @@ typedef struct {
/* id of timeout task for making thumbnails */
int timeout_task_id;
} NautilusIconFactory;
typedef struct {
......@@ -180,18 +179,18 @@ typedef struct {
/* forward declarations */
static void icon_theme_changed_callback (const GtkObject *prefs,
const gchar *pref_name,
GtkFundamentalType pref_type,
gconstpointer pref_value,
gpointer user_data);
static void icon_theme_changed_callback (NautilusPreferences *preferences,
const char *name,
NautilusPreferencesType type,
gconstpointer value,
gpointer user_data);
static GtkType nautilus_icon_factory_get_type (void);
static void nautilus_icon_factory_initialize_class (NautilusIconFactoryClass *class);
static void nautilus_icon_factory_initialize (NautilusIconFactory *factory);
static NautilusIconFactory * nautilus_get_current_icon_factory (void);
static char * nautilus_icon_factory_get_thumbnail_uri (NautilusFile *file);
static NautilusIconFactory * nautilus_icon_factory_new (const char *theme_name);
void nautilus_icon_factory_set_theme (const char *theme_name);
static void nautilus_icon_factory_set_theme (const char *theme_name);
static NautilusScalableIcon *nautilus_scalable_icon_get (const char *uri,
const char *name);
static guint nautilus_scalable_icon_hash (gconstpointer p);
......@@ -235,7 +234,7 @@ nautilus_get_current_icon_factory (void)
nautilus_preferences_add_callback (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_ICON_THEME,
icon_theme_changed_callback,
(gpointer) global_icon_factory);
NULL);
}
return global_icon_factory;
......@@ -326,7 +325,7 @@ nautilus_icon_factory_destroy (NautilusIconFactory *factory)
nautilus_preferences_remove_callback (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_ICON_THEME,
icon_theme_changed_callback,
(gpointer) factory);
NULL);
nautilus_icon_factory_clear ();
g_hash_table_destroy (factory->icon_cache);
......@@ -584,21 +583,19 @@ get_icon_file_path (const char *name, guint size_in_pixels, ArtIRect *text_rect)
}
static void
icon_theme_changed_callback (const GtkObject *prefs,
const gchar *pref_name,
GtkFundamentalType pref_type,
gconstpointer pref_value,
icon_theme_changed_callback (NautilusPreferences *preferences,
const char *name,
GtkFundamentalType type,
gconstpointer value,
gpointer user_data)
{
NautilusIconFactory *icon_factory;
g_assert (user_data != NULL);
g_assert (prefs != NULL);
g_assert (pref_name != NULL);
icon_factory = (NautilusIconFactory *)user_data;
g_assert (NAUTILUS_IS_PREFERENCES (preferences));
g_assert (strcmp (name, NAUTILUS_PREFERENCES_ICON_THEME) == 0);
g_assert (type == NAUTILUS_PREFERENCE_STRING);
g_assert (value != NULL);
g_assert (user_data == NULL);
nautilus_icon_factory_set_theme ((char *)pref_value);
nautilus_icon_factory_set_theme ((char *) value);
}
/* Get or create a scalable icon. */
......
......@@ -35,7 +35,7 @@
#include "gnome-icon-container-private.h"
#include "nautilus-string.h"
#include "nautilus-glib-extensions.h"
#include "gdk-extensions.h"
#include "nautilus-gdk-extensions.h"
#include "nautilus-gtk-macros.h"
#include "nautilus-gnome-extensions.h"
......
......@@ -246,7 +246,7 @@ preferences_item_construct (NautilusPreferencesItem *item,
item->details->prefs = prefs;
item->details->pref_name = g_strdup (pref_name);
pref_info = nautilus_preferences_get_pref_info (NAUTILUS_PREFS (item->details->prefs),