summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2002-01-19 00:06:14 +0000
committerDarin Adler <darin@src.gnome.org>2002-01-19 00:06:14 +0000
commit074ed7a01a2db2e82771eee7412dbbf3a115630f (patch)
treea88c6f49863a8e37ef0ebd3f67ab57cb1453ad7c /src
parent5a837d8ac19aa878dae1e5af9d7969869859c58a (diff)
downloadnautilus-074ed7a01a2db2e82771eee7412dbbf3a115630f.tar.gz
Remove nautilus-launch-icon.png.
* Makefile.am: Remove nautilus-launch-icon.png. * components/hardware/nautilus-hardware-view.c: (setup_form_title), (setup_overview_form): Port from EelImage to GtkImage. * components/music/nautilus-music-view.c: Remove unused include. * src/nautilus-theme-selector.c: Remove unused includes. * libnautilus-private/nautilus-bonobo-extensions.c: (bonobo_activation_activation_callback): Add warning message so we get to see the error from bonobo-activation. * libnautilus-private/nautilus-directory-metafile.c: (get_factory): * libnautilus-private/nautilus-icon-factory.c: (get_icon_factory), (load_icon_for_scaling), (embed_text): * libnautilus-private/nautilus-metafile-factory.c: (nautilus_metafile_factory_get_instance): * libnautilus-private/nautilus-theme.c: (nautilus_theme_get_theme_data_from_theme): * libnautilus-private/nautilus-trash-monitor.c: (nautilus_trash_monitor_get): * libnautilus-private/nautilus-volume-monitor.c: (nautilus_volume_monitor_get): * src/file-manager/nautilus-indexing-info.c: (show_indexing_info_dialog): * src/nautilus-preferences-dialog.c: (global_preferences_get_dialog): * src/nautilus-window.c: (nautilus_window_class_init), (add_to_history_list): Use eel_debug_call_at_shutdown instead of g_atexit. * libnautilus-private/nautilus-file.c: (nautilus_file_get_display_name): Add G_BROKEN_FILENAMES support. * libnautilus-private/nautilus-global-preferences.c: (nautilus_global_preferences_init): Remove eel_smooth_widget code. * libnautilus/Makefile.am: Add missing ORBIT_IDL dependency. * libnautilus/nautilus-view-standard-main.c: (nautilus_view_standard_main_multi): Remove bonobo_ui_debug_shutdown for now. It does us no good unless we also do eel_debug_shut_down, but libnautilus can't depend on eel. * nautilus-launch-icon.png: Remove. * src/file-manager/fm-properties-window.c: (update_properties_window_icon), (fm_properties_window_drag_data_received), (create_image_widget_for_file): Port from EelImage to GtkImage. * src/nautilus-component-adapter-factory.c: (nautilus_component_adapter_factory_get): Use eel_debug_call_at_shutdown instead of g_atexit. (nautilus_component_adapter_factory_create_adapter): Look at exceptions before looking at return values from CORBA calls. * src/nautilus-main.c: (main): Add a call to eel_debug_shut_down. * src/nautilus-property-browser.c: (nautilus_property_browser_init), (element_clicked_callback), (nautilus_property_browser_update_contents): Port from EelViewport to GtkViewport. * src/nautilus-search-bar-criterion.c: (nautilus_search_bar_criterion_destroy), (nautilus_search_bar_criterion_new_from_values): Fix for change that made NautilusSignaller no longer a GtkObject. * src/nautilus-sidebar-title.c: (nautilus_sidebar_title_init), (update_icon), (add_emblem): Port from EelImage to GtkImage. * src/nautilus-signaller.h: * src/nautilus-signaller.c: (nautilus_signaller_get_current): Use eel_debug_call_at_shutdown instead of g_atexit. (nautilus_signaller_instance_init), (nautilus_signaller_class_init): Change to GObject, not GtkObject. * src/nautilus-window-menus.c: (get_bookmark_list): Use eel_debug_call_at_shutdown instead of g_atexit. (nautilus_window_initialize_go_menu): Fix for change that made NautilusSignaller no longer a GtkObject. * test/test-nautilus-preferences-change.c: Remove unused include. * test/test-nautilus-preferences-display.c: Remove unused includes. * test/test-nautilus-wrap-table.c: Remove unused includes. * test/test.c: Remove unused function. * test/test.h: Remove unused function.
Diffstat (limited to 'src')
-rw-r--r--src/file-manager/fm-properties-window.c17
-rw-r--r--src/file-manager/nautilus-indexing-info.c2
-rw-r--r--src/nautilus-component-adapter-factory.c40
-rw-r--r--src/nautilus-main.c2
-rw-r--r--src/nautilus-navigation-window-menus.c12
-rw-r--r--src/nautilus-navigation-window.c5
-rw-r--r--src/nautilus-object-window.c5
-rw-r--r--src/nautilus-preferences-dialog.c3
-rw-r--r--src/nautilus-property-browser.c21
-rw-r--r--src/nautilus-search-bar-criterion.c35
-rw-r--r--src/nautilus-sidebar-title.c9
-rw-r--r--src/nautilus-signaller.c73
-rw-r--r--src/nautilus-signaller.h4
-rw-r--r--src/nautilus-spatial-window.c5
-rw-r--r--src/nautilus-theme-selector.c3
-rw-r--r--src/nautilus-window-menus.c12
-rw-r--r--src/nautilus-window.c5
17 files changed, 114 insertions, 139 deletions
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 2f67b341a..f79729c66 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -32,12 +32,10 @@
#include <eel/eel-gnome-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
-#include <eel/eel-image.h>
#include <eel/eel-labeled-image.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
#include <eel/eel-vfs-extensions.h>
-#include <eel/eel-viewport.h>
#include <eel/eel-wrap-table.h>
#include <gtk/gtkalignment.h>
#include <gtk/gtkcheckbutton.h>
@@ -46,6 +44,7 @@
#include <gtk/gtkfilesel.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkhseparator.h>
+#include <gtk/gtkimage.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkmain.h>
#include <gtk/gtknotebook.h>
@@ -250,20 +249,18 @@ get_pixbuf_for_properties_window (NautilusFile *file)
}
static void
-update_properties_window_icon (EelImage *image)
+update_properties_window_icon (GtkImage *image)
{
GdkPixbuf *pixbuf;
NautilusFile *file;
- g_assert (EEL_IS_IMAGE (image));
-
file = g_object_get_data (G_OBJECT (image), "nautilus_file");
g_assert (NAUTILUS_IS_FILE (file));
pixbuf = get_pixbuf_for_properties_window (file);
- eel_image_set_pixbuf (image, pixbuf);
+ gtk_image_set_from_pixbuf (image, pixbuf);
g_object_unref (pixbuf);
}
@@ -299,13 +296,13 @@ fm_properties_window_drag_data_received (GtkWidget *widget, GdkDragContext *cont
{
char **uris;
gboolean exactly_one;
- EelImage *image;
+ GtkImage *image;
GtkWindow *window;
uris = g_strsplit (selection_data->data, "\r\n", 0);
exactly_one = uris[0] != NULL && uris[1] == NULL;
- image = EEL_IMAGE (widget);
+ image = GTK_IMAGE (widget);
window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (image)));
@@ -347,7 +344,7 @@ create_image_widget_for_file (NautilusFile *file)
pixbuf = get_pixbuf_for_properties_window (file);
- image = eel_image_new (NULL);
+ image = gtk_image_new ();
/* prepare the image to receive dropped objects to assign custom images */
gtk_drag_dest_set (GTK_WIDGET (image),
@@ -359,7 +356,7 @@ create_image_widget_for_file (NautilusFile *file)
G_CALLBACK (fm_properties_window_drag_data_received), NULL);
- eel_image_set_pixbuf (EEL_IMAGE (image), pixbuf);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
g_object_unref (pixbuf);
diff --git a/src/file-manager/nautilus-indexing-info.c b/src/file-manager/nautilus-indexing-info.c
index 3d9400bf6..23c68c0e0 100644
--- a/src/file-manager/nautilus-indexing-info.c
+++ b/src/file-manager/nautilus-indexing-info.c
@@ -271,7 +271,7 @@ show_indexing_info_dialog (void)
}
if (dialogs == NULL) {
dialogs = g_new0 (IndexingInfoDialogs, 1);
- g_atexit (destroy_indexing_info_dialogs_on_exit);
+ eel_debug_call_at_shutdown (destroy_indexing_info_dialogs_on_exit, NULL);
dialogs->last_index_time_dialog = last_index_time_dialog_new ();
dialogs->index_in_progress_dialog = index_progress_dialog_new ();
diff --git a/src/nautilus-component-adapter-factory.c b/src/nautilus-component-adapter-factory.c
index 1b5303998..c1be4166b 100644
--- a/src/nautilus-component-adapter-factory.c
+++ b/src/nautilus-component-adapter-factory.c
@@ -22,17 +22,18 @@
/* nautilus-component-adapter-factory.c - client wrapper for the
* special adapter component, which wraps Bonobo components as
- * Nautilus Views and in the process keeps evil syncrhonous I/O out of
+ * Nautilus Views and in the process keeps evil synchronous I/O out of
* the Nautilus process itself.
*/
#include <config.h>
#include "nautilus-component-adapter-factory.h"
-#include <bonobo/bonobo-moniker-util.h>
#include <bonobo/bonobo-exception.h>
+#include <bonobo/bonobo-moniker-util.h>
#include <bonobo/bonobo-object.h>
-#include <eel/eel-gtk-macros.h>
+#include <eel/eel-debug.h>
+#include <libgnome/gnome-macros.h>
#include <libnautilus-adapter/nautilus-adapter-factory.h>
#define NAUTILUS_COMPONENT_ADAPTER_FACTORY_IID "OAFIID:nautilus_adapter_factory:fd24ecfc-0a6e-47ab-bc53-69d7487c6ad4"
@@ -43,18 +44,15 @@ struct NautilusComponentAdapterFactoryDetails {
static NautilusComponentAdapterFactory *global_component_adapter_factory = NULL;
-static void nautilus_component_adapter_factory_class_init (NautilusComponentAdapterFactoryClass *klass);
-static void nautilus_component_adapter_factory_init (NautilusComponentAdapterFactory *factory);
-
-EEL_CLASS_BOILERPLATE (NautilusComponentAdapterFactory,
- nautilus_component_adapter_factory,
- GTK_TYPE_OBJECT)
-
+GNOME_CLASS_BOILERPLATE (NautilusComponentAdapterFactory, nautilus_component_adapter_factory,
+ GtkObject, GTK_TYPE_OBJECT)
static void
activate_factory (NautilusComponentAdapterFactory *factory)
{
- factory->details->corba_factory = bonobo_get_object (NAUTILUS_COMPONENT_ADAPTER_FACTORY_IID, "IDL:Nautilus/ComponentAdapterFactory:1.0", NULL);
+ factory->details->corba_factory = bonobo_get_object
+ (NAUTILUS_COMPONENT_ADAPTER_FACTORY_IID,
+ "IDL:Nautilus/ComponentAdapterFactory:1.0", NULL);
}
static void
@@ -100,14 +98,16 @@ get_corba_factory (NautilusComponentAdapterFactory *factory)
CORBA_exception_free (&ev);
result = bonobo_object_dup_ref (factory->details->corba_factory, NULL);
+
if (need_unref) {
unref_factory (factory);
}
+
return result;
}
static void
-nautilus_component_adapter_factory_init (NautilusComponentAdapterFactory *factory)
+nautilus_component_adapter_factory_instance_init (NautilusComponentAdapterFactory *factory)
{
factory->details = g_new0 (NautilusComponentAdapterFactoryDetails, 1);
}
@@ -122,7 +122,7 @@ nautilus_component_adapter_factory_destroy (GtkObject *object)
release_factory (factory);
g_free (factory->details);
- EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
+ GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
static void
@@ -155,7 +155,7 @@ nautilus_component_adapter_factory_get (void)
gtk_object_sink (GTK_OBJECT (factory));
global_component_adapter_factory = factory;
- g_atexit (component_adapter_factory_at_exit_destructor);
+ eel_debug_call_at_shutdown (component_adapter_factory_at_exit_destructor);
}
return global_component_adapter_factory;
@@ -174,14 +174,20 @@ nautilus_component_adapter_factory_create_adapter (NautilusComponentAdapterFacto
nautilus_view = Bonobo_Unknown_queryInterface
(component, "IDL:Nautilus/View:1.0", &ev);
+ if (BONOBO_EX (&ev)) {
+ nautilus_view = CORBA_OBJECT_NIL;
+ }
- if (!CORBA_Object_is_nil (nautilus_view, &ev)) {
+ if (nautilus_view != CORBA_OBJECT_NIL) {
/* Object has the View interface, great! We might not
* need to adapt it.
*/
bonobo_control = Bonobo_Unknown_queryInterface
(component, "IDL:Bonobo/Control:1.0", &ev);
- if (!CORBA_Object_is_nil (bonobo_control, &ev)) {
+ if (BONOBO_EX (&ev)) {
+ bonobo_control = CORBA_OBJECT_NIL;
+ }
+ if (bonobo_control != CORBA_OBJECT_NIL) {
/* It has the control interface too, so all is peachy. */
bonobo_object_release_unref (bonobo_control, NULL);
} else {
@@ -193,9 +199,7 @@ nautilus_component_adapter_factory_create_adapter (NautilusComponentAdapterFacto
nautilus_view = CORBA_OBJECT_NIL;
}
} else {
- nautilus_view = CORBA_OBJECT_NIL;
/* No View interface, we must adapt the object */
-
corba_factory = get_corba_factory (factory);
nautilus_view = Nautilus_ComponentAdapterFactory_create_adapter
(corba_factory, component, &ev);
diff --git a/src/nautilus-main.c b/src/nautilus-main.c
index 939106770..59078642e 100644
--- a/src/nautilus-main.c
+++ b/src/nautilus-main.c
@@ -276,7 +276,9 @@ main (int argc, char *argv[])
}
poptFreeContext (popt_context);
+
gnome_vfs_shutdown ();
+ eel_debug_shut_down ();
bonobo_ui_debug_shutdown ();
/* If told to restart, exec() myself again. This is used when
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index 42c1a9d20..cadcd1ec5 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -44,6 +44,7 @@
#include <eel/eel-debug.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-gnome-extensions.h>
+#include <eel/eel-gobject-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
@@ -971,7 +972,7 @@ get_bookmark_list (void)
{
if (bookmarks == NULL) {
bookmarks = nautilus_bookmark_list_new ();
- g_atexit (free_bookmark_list);
+ eel_debug_call_at_shutdown (free_bookmark_list);
}
return bookmarks;
@@ -1092,15 +1093,14 @@ nautilus_window_initialize_go_menu (NautilusWindow *window)
/* Recreate bookmarks part of menu if history list changes
* or if icon theme changes.
*/
- gtk_signal_connect_object_while_alive (nautilus_signaller_get_current (),
+ eel_signal_connect_object_while_alive (nautilus_signaller_get_current (),
"history_list_changed",
G_CALLBACK (schedule_refresh_go_menu),
- GTK_OBJECT (window));
-
- gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (),
+ G_OBJECT (window));
+ eel_signal_connect_object_while_alive (G_OBJECT (nautilus_icon_factory_get ()),
"icons_changed",
G_CALLBACK (schedule_refresh_go_menu),
- GTK_OBJECT (window));
+ G_OBJECT (window));
}
/**
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index afe9dd2e4..44c8542a7 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -42,6 +42,7 @@
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-property-bag-client.h>
#include <bonobo/bonobo-ui-util.h>
+#include <eel/eel-debug.h>
#include <eel/eel-gdk-extensions.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <eel/eel-generous-bin.h>
@@ -188,7 +189,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
EEL_STANDARD_ALPHA_THRESHHOLD);
g_object_unref (pixbuf);
- g_atexit (unref_mini_icon);
+ eel_debug_call_at_shutdown (unref_mini_icon);
}
g_free (filename);
}
@@ -1785,7 +1786,7 @@ add_to_history_list (NautilusBookmark *bookmark)
g_return_if_fail (NAUTILUS_IS_BOOKMARK (bookmark));
if (!free_history_list_is_set_up) {
- g_atexit (free_history_list);
+ eel_debug_call_at_shutdown (free_history_list);
free_history_list_is_set_up = TRUE;
}
diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c
index afe9dd2e4..44c8542a7 100644
--- a/src/nautilus-object-window.c
+++ b/src/nautilus-object-window.c
@@ -42,6 +42,7 @@
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-property-bag-client.h>
#include <bonobo/bonobo-ui-util.h>
+#include <eel/eel-debug.h>
#include <eel/eel-gdk-extensions.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <eel/eel-generous-bin.h>
@@ -188,7 +189,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
EEL_STANDARD_ALPHA_THRESHHOLD);
g_object_unref (pixbuf);
- g_atexit (unref_mini_icon);
+ eel_debug_call_at_shutdown (unref_mini_icon);
}
g_free (filename);
}
@@ -1785,7 +1786,7 @@ add_to_history_list (NautilusBookmark *bookmark)
g_return_if_fail (NAUTILUS_IS_BOOKMARK (bookmark));
if (!free_history_list_is_set_up) {
- g_atexit (free_history_list);
+ eel_debug_call_at_shutdown (free_history_list);
free_history_list_is_set_up = TRUE;
}
diff --git a/src/nautilus-preferences-dialog.c b/src/nautilus-preferences-dialog.c
index 620fcd5c6..c1f07f1d6 100644
--- a/src/nautilus-preferences-dialog.c
+++ b/src/nautilus-preferences-dialog.c
@@ -28,6 +28,7 @@
#include "libnautilus-private/nautilus-global-preferences.h"
#include "libnautilus-private/nautilus-sidebar-functions.h"
#include "nautilus-theme-selector.h"
+#include <eel/eel-debug.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-preferences-box.h>
#include <gtk/gtkdialog.h>
@@ -576,7 +577,7 @@ global_preferences_get_dialog (void)
if (preferences_dialog == NULL) {
preferences_dialog = preferences_dialog_create ();
- g_atexit (preferences_dialog_destroy);
+ eel_debug_call_at_shutdown (preferences_dialog_destroy);
}
g_assert (GTK_IS_DIALOG (preferences_dialog));
diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c
index cd17bad0a..75b63de7a 100644
--- a/src/nautilus-property-browser.c
+++ b/src/nautilus-property-browser.c
@@ -40,12 +40,10 @@
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
#include <eel/eel-image-table.h>
-#include <eel/eel-image.h>
#include <eel/eel-labeled-image.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
#include <eel/eel-vfs-extensions.h>
-#include <eel/eel-viewport.h>
#include <eel/eel-xml-extensions.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
@@ -277,8 +275,7 @@ nautilus_property_browser_init (GtkObject *object)
gtk_container_set_border_width (GTK_CONTAINER (property_browser->details->category_container), 0);
property_browser->details->category_position = -1;
- viewport = eel_viewport_new (NULL, NULL);
- eel_viewport_set_never_smooth (EEL_VIEWPORT (viewport), FALSE);
+ viewport = gtk_viewport_new (NULL, NULL);
gtk_widget_show (viewport);
gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE);
@@ -1478,7 +1475,7 @@ element_clicked_callback (GtkWidget *image_table,
GdkPixbuf *pixbuf;
int x_delta, y_delta;
const char *element_name;
- EelArtIPoint scroll_offset;
+ int scroll_offset_x, scroll_offset_y;
g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table));
g_return_if_fail (EEL_IS_LABELED_IMAGE (child));
@@ -1516,10 +1513,8 @@ element_clicked_callback (GtkWidget *image_table,
NULL);
/* compute the offsets for dragging */
- scroll_offset = eel_viewport_get_scroll_offset (EEL_VIEWPORT (image_table->parent));
-
if (strcmp (drag_types[0].target, "application/x-color")) {
- /*it's not a color, so, for now, it must be an image */
+ /* it's not a color, so, for now, it must be an image */
/* fiddle with the category to handle the "reset" case properly */
char * save_category = property_browser->details->category;
if (eel_strcmp (property_browser->details->category, "colors") == 0) {
@@ -1531,8 +1526,11 @@ element_clicked_callback (GtkWidget *image_table,
y_delta = gdk_pixbuf_get_height (pixbuf) / 2;
} else {
pixbuf = make_color_drag_image (property_browser, element_name, TRUE);
- x_delta = event->x - child->allocation.x - scroll_offset.x;
- y_delta = event->y - child->allocation.y - scroll_offset.y;
+ gdk_window_get_position (GTK_VIEWPORT (image_table->parent)->bin_window,
+ &scroll_offset_x,
+ &scroll_offset_y);
+ x_delta = event->x - child->allocation.x - scroll_offset_x;
+ y_delta = event->y - child->allocation.y - scroll_offset_y;
}
/* set the pixmap and mask for dragging */
@@ -1940,8 +1938,7 @@ nautilus_property_browser_update_contents (NautilusPropertyBrowser *property_bro
/* allocate a new container, with a scrollwindow and viewport */
property_browser->details->content_frame = gtk_scrolled_window_new (NULL, NULL);
gtk_container_set_border_width (GTK_CONTAINER (property_browser->details->content_frame), 0);
- viewport = eel_viewport_new (NULL, NULL);
- eel_viewport_set_never_smooth (EEL_VIEWPORT (viewport), FALSE);
+ viewport = gtk_viewport_new (NULL, NULL);
gtk_widget_show(viewport);
gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_IN);
background = eel_get_widget_background (viewport);
diff --git a/src/nautilus-search-bar-criterion.c b/src/nautilus-search-bar-criterion.c
index 238924927..78a40fa07 100644
--- a/src/nautilus-search-bar-criterion.c
+++ b/src/nautilus-search-bar-criterion.c
@@ -195,7 +195,7 @@ static char * get_owner_location_for
static void make_emblem_value_menu (NautilusSearchBarCriterion *criterion);
static void criterion_type_changed_callback (GtkObject *object,
gpointer data);
-static void emblems_changed_callback (GtkObject *signaller,
+static void emblems_changed_callback (GObject *signaller,
gpointer data);
static gboolean criterion_type_already_is_displayed (GSList *criteria,
NautilusSearchBarCriterionType criterion_number);
@@ -233,8 +233,8 @@ nautilus_search_bar_criterion_destroy (GtkObject *object)
criterion = NAUTILUS_SEARCH_BAR_CRITERION (object);
/* FIXME bugzilla.gnome.org 42437: need more freeage */
- gtk_signal_disconnect_by_data (nautilus_signaller_get_current (),
- criterion);
+ g_signal_handlers_disconnect_by_func (nautilus_signaller_get_current (),
+ G_CALLBACK (emblems_changed_callback), criterion);
/* nautilus_undo_editable_set_undo_key (GTK_EDITABLE (criterion->details->value_entry), FALSE);
nautilus_undo_tear_down_nautilus_entry_for_undo (criterion->details->value_entry);
*/
@@ -297,14 +297,10 @@ nautilus_search_bar_criterion_new_from_values (NautilusSearchBarCriterionType ty
details->bar = bar;
details->box = gtk_hwrap_box_new (FALSE);
- g_signal_connect (details->box,
- "need_reallocation",
- G_CALLBACK (queue_bar_resize_callback),
- bar);
- gtk_signal_connect (nautilus_signaller_get_current (),
- "emblems_changed",
- G_CALLBACK (emblems_changed_callback),
- criterion);
+ g_signal_connect (details->box, "need_reallocation",
+ G_CALLBACK (queue_bar_resize_callback), bar);
+ g_signal_connect (nautilus_signaller_get_current (), "emblems_changed",
+ G_CALLBACK (emblems_changed_callback), criterion);
search_criteria_option_menu = gtk_option_menu_new ();
@@ -317,10 +313,8 @@ nautilus_search_bar_criterion_new_from_values (NautilusSearchBarCriterionType ty
g_free (context_stripped_criteria_title);
g_object_set_data (G_OBJECT(item), "type", GINT_TO_POINTER(i));
- g_signal_connect (item,
- "activate",
- G_CALLBACK (criterion_type_changed_callback),
- criterion);
+ g_signal_connect (item, "activate",
+ G_CALLBACK (criterion_type_changed_callback), criterion);
gtk_menu_append (GTK_MENU (search_criteria_menu),
item);
gtk_widget_show (item);
@@ -718,10 +712,8 @@ nautilus_search_bar_criterion_update_valid_criteria_choices (NautilusSearchBarCr
g_object_set_data (G_OBJECT(item), "type", GINT_TO_POINTER(i));
- g_signal_connect (item,
- "activate",
- G_CALLBACK (criterion_type_changed_callback),
- criterion);
+ g_signal_connect (item, "activate",
+ G_CALLBACK (criterion_type_changed_callback), criterion);
gtk_menu_append (GTK_MENU (new_menu),
item);
gtk_widget_show (item);
@@ -1052,13 +1044,12 @@ criterion_type_changed_callback (GtkObject *object,
}
static void
-emblems_changed_callback (GtkObject *signaller,
+emblems_changed_callback (GObject *signaller,
gpointer data)
{
NautilusSearchBarCriterion *criterion;
GtkWidget *menu_widget;
- g_return_if_fail (NAUTILUS_IS_SEARCH_BAR_CRITERION (data));
criterion = NAUTILUS_SEARCH_BAR_CRITERION (data);
if (criterion->details->type == NAUTILUS_EMBLEM_SEARCH_CRITERION) {
@@ -1077,8 +1068,6 @@ criterion_is_of_type (gconstpointer a,
NautilusSearchBarCriterion *criterion;
NautilusSearchBarCriterionType type;
- g_return_val_if_fail (NAUTILUS_IS_SEARCH_BAR_CRITERION (a),
- NAUTILUS_NUMBER_OF_SEARCH_CRITERIA);
criterion = NAUTILUS_SEARCH_BAR_CRITERION (a);
type = (NautilusSearchBarCriterionType) b;
diff --git a/src/nautilus-sidebar-title.c b/src/nautilus-sidebar-title.c
index 47f8e5193..80da63796 100644
--- a/src/nautilus-sidebar-title.c
+++ b/src/nautilus-sidebar-title.c
@@ -38,9 +38,9 @@
#include <eel/eel-glib-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-gtk-macros.h>
-#include <eel/eel-image-with-background.h>
#include <eel/eel-string.h>
#include <gtk/gtkhbox.h>
+#include <gtk/gtkimage.h>
#include <gtk/gtklabel.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkwidget.h>
@@ -184,7 +184,7 @@ nautilus_sidebar_title_init (NautilusSidebarTitle *sidebar_title)
G_CALLBACK (realize_callback), NULL);
/* Create the icon */
- sidebar_title->details->icon = eel_image_new_with_background (NULL);
+ sidebar_title->details->icon = gtk_image_new ();
gtk_box_pack_start (GTK_BOX (sidebar_title), sidebar_title->details->icon, 0, 0, 0);
gtk_widget_show (sidebar_title->details->icon);
@@ -493,7 +493,7 @@ update_icon (NautilusSidebarTitle *sidebar_title)
}
if (!leave_pixbuf_unchanged) {
- eel_image_set_pixbuf (EEL_IMAGE (sidebar_title->details->icon), pixbuf);
+ gtk_image_set_from_pixbuf (GTK_IMAGE (sidebar_title->details->icon), pixbuf);
}
}
@@ -683,8 +683,7 @@ add_emblem (NautilusSidebarTitle *sidebar_title, GdkPixbuf *pixbuf)
{
GtkWidget *image_widget;
- image_widget = eel_image_new_with_background (NULL);
- eel_image_set_pixbuf (EEL_IMAGE (image_widget), pixbuf);
+ image_widget = gtk_image_new_from_pixbuf (pixbuf);
gtk_widget_show (image_widget);
gtk_container_add (GTK_CONTAINER (sidebar_title->details->emblem_box), image_widget);
}
diff --git a/src/nautilus-signaller.c b/src/nautilus-signaller.c
index b4f9d4361..c4ee2c120 100644
--- a/src/nautilus-signaller.c
+++ b/src/nautilus-signaller.c
@@ -29,11 +29,11 @@
#include <config.h>
#include "nautilus-signaller.h"
-#include <gtk/gtksignal.h>
-#include <eel/eel-gtk-macros.h>
+#include <eel/eel-debug.h>
+#include <libgnome/gnome-macros.h>
-typedef GtkObject NautilusSignaller;
-typedef GtkObjectClass NautilusSignallerClass;
+typedef GObject NautilusSignaller;
+typedef GObjectClass NautilusSignallerClass;
enum {
HISTORY_LIST_CHANGED,
@@ -43,63 +43,46 @@ enum {
static guint signals[LAST_SIGNAL];
-static GtkObject *global_signaller = NULL;
+static GType nautilus_signaller_get_type (void);
-static GtkType nautilus_signaller_get_type (void);
-static void nautilus_signaller_class_init (gpointer klass);
-static void nautilus_signaller_init (gpointer object,
- gpointer klass);
+GNOME_CLASS_BOILERPLATE (NautilusSignaller, nautilus_signaller,
+ GObject, G_TYPE_OBJECT)
-EEL_CLASS_BOILERPLATE (NautilusSignaller,
- nautilus_signaller,
- GTK_TYPE_OBJECT)
+GObject *
+nautilus_signaller_get_current (void)
+{
+ static GObject *global_signaller = NULL;
+
+ if (global_signaller == NULL) {
+ global_signaller = g_object_new (nautilus_signaller_get_type (), NULL);
+ eel_debug_call_at_shutdown_with_data (g_object_unref, global_signaller);
+ }
+
+ return global_signaller;
+}
static void
-nautilus_signaller_class_init (gpointer klass)
+nautilus_signaller_instance_init (NautilusSignaller *signaller)
{
- GtkObjectClass *object_class;
+}
- object_class = GTK_OBJECT_CLASS (klass);
-
+static void
+nautilus_signaller_class_init (NautilusSignallerClass *class)
+{
signals[HISTORY_LIST_CHANGED] =
g_signal_new ("history_list_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- gtk_marshal_NONE__NONE,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[EMBLEMS_CHANGED] =
g_signal_new ("emblems_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- gtk_marshal_NONE__NONE,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
-
-static void
-nautilus_signaller_init (gpointer object, gpointer klass)
-{
- /* placeholder to allow use of boilerplate macro */
-}
-
-static void
-unref_global_signaller (void)
-{
- g_object_unref (global_signaller);
-}
-
-GtkObject *
-nautilus_signaller_get_current (void)
-{
- if (global_signaller == NULL) {
- global_signaller = g_object_new (nautilus_signaller_get_type (), NULL);
- g_object_ref (global_signaller);
- gtk_object_sink (GTK_OBJECT (global_signaller));
- g_atexit (unref_global_signaller);
- }
-
- return global_signaller;
-}
diff --git a/src/nautilus-signaller.h b/src/nautilus-signaller.h
index 0998a6e35..eff25a905 100644
--- a/src/nautilus-signaller.h
+++ b/src/nautilus-signaller.h
@@ -29,7 +29,7 @@
#ifndef NAUTILUS_SIGNALLER_H
#define NAUTILUS_SIGNALLER_H
-#include <gtk/gtkobject.h>
+#include <glib-object.h>
/* NautilusSignaller is a class that manages signals between
disconnected Nautilus code. Nautilus objects connect to these signals
@@ -41,6 +41,6 @@
*/
/* Get the one and only NautilusSignaller to connect with or emit signals for */
-GtkObject *nautilus_signaller_get_current (void);
+GObject *nautilus_signaller_get_current (void);
#endif /* NAUTILUS_SIGNALLER_H */
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index afe9dd2e4..44c8542a7 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -42,6 +42,7 @@
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-property-bag-client.h>
#include <bonobo/bonobo-ui-util.h>
+#include <eel/eel-debug.h>
#include <eel/eel-gdk-extensions.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <eel/eel-generous-bin.h>
@@ -188,7 +189,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
EEL_STANDARD_ALPHA_THRESHHOLD);
g_object_unref (pixbuf);
- g_atexit (unref_mini_icon);
+ eel_debug_call_at_shutdown (unref_mini_icon);
}
g_free (filename);
}
@@ -1785,7 +1786,7 @@ add_to_history_list (NautilusBookmark *bookmark)
g_return_if_fail (NAUTILUS_IS_BOOKMARK (bookmark));
if (!free_history_list_is_set_up) {
- g_atexit (free_history_list);
+ eel_debug_call_at_shutdown (free_history_list);
free_history_list_is_set_up = TRUE;
}
diff --git a/src/nautilus-theme-selector.c b/src/nautilus-theme-selector.c
index a61bf6925..3bf3ce778 100644
--- a/src/nautilus-theme-selector.c
+++ b/src/nautilus-theme-selector.c
@@ -34,14 +34,13 @@
#include <eel/eel-image-chooser.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
-#include <eel/eel-viewport.h>
#include <gtk/gtkalignment.h>
#include <gtk/gtkbutton.h>
#include <gtk/gtkfilesel.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkmain.h>
+#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtksignal.h>
-#include <gtk/gtkwindow.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
#include <libnautilus-private/nautilus-global-preferences.h>
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index 42c1a9d20..cadcd1ec5 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -44,6 +44,7 @@
#include <eel/eel-debug.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-gnome-extensions.h>
+#include <eel/eel-gobject-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
@@ -971,7 +972,7 @@ get_bookmark_list (void)
{
if (bookmarks == NULL) {
bookmarks = nautilus_bookmark_list_new ();
- g_atexit (free_bookmark_list);
+ eel_debug_call_at_shutdown (free_bookmark_list);
}
return bookmarks;
@@ -1092,15 +1093,14 @@ nautilus_window_initialize_go_menu (NautilusWindow *window)
/* Recreate bookmarks part of menu if history list changes
* or if icon theme changes.
*/
- gtk_signal_connect_object_while_alive (nautilus_signaller_get_current (),
+ eel_signal_connect_object_while_alive (nautilus_signaller_get_current (),
"history_list_changed",
G_CALLBACK (schedule_refresh_go_menu),
- GTK_OBJECT (window));
-
- gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (),
+ G_OBJECT (window));
+ eel_signal_connect_object_while_alive (G_OBJECT (nautilus_icon_factory_get ()),
"icons_changed",
G_CALLBACK (schedule_refresh_go_menu),
- GTK_OBJECT (window));
+ G_OBJECT (window));
}
/**
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index afe9dd2e4..44c8542a7 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -42,6 +42,7 @@
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-property-bag-client.h>
#include <bonobo/bonobo-ui-util.h>
+#include <eel/eel-debug.h>
#include <eel/eel-gdk-extensions.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <eel/eel-generous-bin.h>
@@ -188,7 +189,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
(pixbuf, &mini_icon_pixmap, &mini_icon_mask,
EEL_STANDARD_ALPHA_THRESHHOLD);
g_object_unref (pixbuf);
- g_atexit (unref_mini_icon);
+ eel_debug_call_at_shutdown (unref_mini_icon);
}
g_free (filename);
}
@@ -1785,7 +1786,7 @@ add_to_history_list (NautilusBookmark *bookmark)
g_return_if_fail (NAUTILUS_IS_BOOKMARK (bookmark));
if (!free_history_list_is_set_up) {
- g_atexit (free_history_list);
+ eel_debug_call_at_shutdown (free_history_list);
free_history_list_is_set_up = TRUE;
}