Commit 8d0aed09 authored by jacob berkman's avatar jacob berkman Committed by Jacob Berkman

add -DFOO_DISABLE_DEPRECATED to disable glib, gtk, and gnome deprecated

2002-02-14  jacob berkman  <jacob@ximian.com>

	* src/Makefile.am:
	* src/file-manager/Makefile.am: add -DFOO_DISABLE_DEPRECATED to
	disable glib, gtk, and gnome deprecated calls

	* src/file-manager/fm-desktop-icon-view.c:
	* src/file-manager/fm-directory-view.c:
	* src/file-manager/fm-icon-view.c:
	* src/file-manager/fm-properties-window.c:
	* src/file-manager/fm-search-list-view.c:
	* src/nautilus-about.c:
	* src/nautilus-application.c:
	* src/nautilus-bookmark-list.c:
	* src/nautilus-bookmarks-window.c:
	* src/nautilus-complex-search-bar.c:
	* src/nautilus-location-bar.c:
	* src/nautilus-main.c:
	* src/nautilus-navigation-bar.c:
	* src/nautilus-property-browser.c:
	* src/nautilus-search-bar-criterion.c:
	* src/nautilus-shell.c:
	* src/nautilus-sidebar-tabs.c:
	* src/nautilus-sidebar-title.c:
	* src/nautilus-sidebar.c:
	* src/nautilus-simple-search-bar.c:
	* src/nautilus-switchable-navigation-bar.c:
	* src/nautilus-switchable-search-bar.c:
	* src/nautilus-theme-selector.c:
	* src/nautilus-view-frame.c:
	* src/nautilus-window-manage-views.c:
	* src/nautilus-window-menus.c:
	* src/nautilus-window-toolbars.c:
	* src/nautilus-window.c:
	* src/nautilus-zoom-control.c: port to non-deprecated calls.  This
	was mostly GnomeDialog -> GtkDialog and gtk_signal -> g_signal
parent 65a9c4e6
2002-02-14 jacob berkman <jacob@ximian.com>
* src/Makefile.am:
* src/file-manager/Makefile.am: add -DFOO_DISABLE_DEPRECATED to
disable glib, gtk, and gnome deprecated calls
* src/file-manager/fm-desktop-icon-view.c:
* src/file-manager/fm-directory-view.c:
* src/file-manager/fm-icon-view.c:
* src/file-manager/fm-properties-window.c:
* src/file-manager/fm-search-list-view.c:
* src/nautilus-about.c:
* src/nautilus-application.c:
* src/nautilus-bookmark-list.c:
* src/nautilus-bookmarks-window.c:
* src/nautilus-complex-search-bar.c:
* src/nautilus-location-bar.c:
* src/nautilus-main.c:
* src/nautilus-navigation-bar.c:
* src/nautilus-property-browser.c:
* src/nautilus-search-bar-criterion.c:
* src/nautilus-shell.c:
* src/nautilus-sidebar-tabs.c:
* src/nautilus-sidebar-title.c:
* src/nautilus-sidebar.c:
* src/nautilus-simple-search-bar.c:
* src/nautilus-switchable-navigation-bar.c:
* src/nautilus-switchable-search-bar.c:
* src/nautilus-theme-selector.c:
* src/nautilus-view-frame.c:
* src/nautilus-window-manage-views.c:
* src/nautilus-window-menus.c:
* src/nautilus-window-toolbars.c:
* src/nautilus-window.c:
* src/nautilus-zoom-control.c: port to non-deprecated calls. This
was mostly GnomeDialog -> GtkDialog and gtk_signal -> g_signal
2002-02-12 David Emory Watson <dwatson@cvs.gnome.org>
* libnautilus-private/nautilus-bonobo-extensions.c:
......
......@@ -7,6 +7,7 @@ bin_PROGRAMS=nautilus
INCLUDES =\
-I$(top_srcdir) \
-I$(top_srcdir)/cut-n-paste-code/widgets/gimphwrapbox \
-I$(top_builddir)/libnautilus-private \
$(CORE_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
......@@ -16,6 +17,11 @@ INCLUDES =\
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DVERSION="\"$(VERSION)\"" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED \
$(NULL)
LDADD =\
......@@ -138,6 +144,7 @@ EXTRA_DIST = \
$(ui_DATA) \
check-nautilus \
nautilus-shell-interface.idl \
nautilus-shell-marshal.list \
run-nautilus \
$(NULL)
......
......@@ -8,6 +8,11 @@ INCLUDES = \
-DVERSION="\"$(VERSION)\"" \
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
-DDATADIR=\""$(datadir)"\" \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED \
$(NULL)
......
......@@ -226,7 +226,7 @@ fm_desktop_icon_view_destroy (GtkObject *object)
icon_view = FM_DESKTOP_ICON_VIEW (object);
/* Remove the property filter */
gdk_window_remove_filter (GDK_ROOT_PARENT (),
gdk_window_remove_filter (gdk_get_default_root_window (),
desktop_icon_view_property_filter,
icon_view);
......@@ -635,7 +635,7 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
panel_desktop_area_changed (desktop_icon_view);
/* Setup the property filter */
gdk_window_add_filter (GDK_ROOT_PARENT (),
gdk_window_add_filter (gdk_get_default_root_window (),
desktop_icon_view_property_filter,
desktop_icon_view);
}
......
......@@ -1211,21 +1211,19 @@ fm_directory_view_init (FMDirectoryView *view)
g_signal_connect (view->details->nautilus_view, "selection_changed",
G_CALLBACK (selection_changed_callback), view);
g_signal_connect (fm_directory_view_get_bonobo_control (view), "activate",
G_CALLBACK (bonobo_control_activate_callback), view);
G_CALLBACK (bonobo_control_activate_callback), view);
g_signal_connect (view->details->zoomable, "zoom_in",
G_CALLBACK (zoomable_zoom_in_callback), view);
g_signal_connect (view->details->zoomable, "zoom_out",
G_CALLBACK (zoomable_zoom_out_callback), view);
g_signal_connect (view->details->zoomable, "set_zoom_level",
G_CALLBACK (zoomable_set_zoom_level_callback), view);
g_signal_connect (view->details->zoomable, "zoom_to_fit",
g_signal_connect (view->details->zoomable, "zoom_to_fit",
G_CALLBACK (zoomable_zoom_to_fit_callback), view);
gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()), "trash_state_changed",
G_CALLBACK (fm_directory_view_trash_state_changed_callback), view,
GTK_OBJECT (view));
g_signal_connect_object (nautilus_trash_monitor_get (), "trash_state_changed",
G_CALLBACK (fm_directory_view_trash_state_changed_callback),
view, 0);
gtk_widget_show (GTK_WIDGET (view));
......@@ -1760,9 +1758,9 @@ debuting_uri_add_file_callback (FMDirectoryView *view,
if (g_hash_table_size (data->debuting_uris) == 0) {
fm_directory_view_set_selection (view, data->added_files);
fm_directory_view_reveal_selection (view);
gtk_signal_disconnect_by_func (GTK_OBJECT (view),
G_CALLBACK (debuting_uri_add_file_callback),
data);
g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (debuting_uri_add_file_callback),
data);
}
}
......@@ -1884,9 +1882,9 @@ copy_move_done_callback (GHashTable *debuting_uris, gpointer data)
* it will free data. We've already siphoned off the added_files we need, and stashed the
* directory_view pointer.
*/
gtk_signal_disconnect_by_func (GTK_OBJECT (directory_view),
G_CALLBACK (pre_copy_move_add_file_callback),
data);
g_signal_handlers_disconnect_by_func (directory_view,
G_CALLBACK (pre_copy_move_add_file_callback),
data);
/* Any items in the debuting_uris hash table that have
* "FALSE" as their value aren't really being copied
......@@ -1910,14 +1908,12 @@ copy_move_done_callback (GHashTable *debuting_uris, gpointer data)
* operate on. The ADD_FILE signal is registered as G_SIGNAL_RUN_LAST, so we
* must use connect_after.
*/
gtk_signal_connect_full (GTK_OBJECT (directory_view),
"add_file",
G_CALLBACK (debuting_uri_add_file_callback),
NULL,
debuting_uri_data,
(GtkDestroyNotify) debuting_uri_data_free,
FALSE,
TRUE);
g_signal_connect_data (GTK_OBJECT (directory_view),
"add_file",
G_CALLBACK (debuting_uri_add_file_callback),
debuting_uri_data,
(GClosureNotify) debuting_uri_data_free,
G_CONNECT_AFTER);
}
}
......@@ -3082,9 +3078,9 @@ static void
reveal_newly_added_folder (FMDirectoryView *view, NautilusFile *new_file, const char *target_uri)
{
if (nautilus_file_matches_uri (new_file, target_uri)) {
gtk_signal_disconnect_by_func (GTK_OBJECT (view),
G_CALLBACK (reveal_newly_added_folder),
(void *) target_uri);
g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (reveal_newly_added_folder),
(void *) target_uri);
/* no need to select because start_renaming_item selects
* fm_directory_view_select_file (view, new_file);
*/
......@@ -3105,14 +3101,12 @@ new_folder_done (const char *new_folder_uri, gpointer data)
* operate on. The ADD_FILE signal is registered as G_SIGNAL_RUN_LAST, so we
* must use connect_after.
*/
gtk_signal_connect_full (GTK_OBJECT (directory_view),
"add_file",
G_CALLBACK (reveal_newly_added_folder),
NULL,
g_strdup (new_folder_uri),
g_free,
FALSE,
TRUE);
g_signal_connect_data (directory_view,
"add_file",
G_CALLBACK (reveal_newly_added_folder),
g_strdup (new_folder_uri),
(GClosureNotify)g_free,
G_CONNECT_AFTER);
}
void
......@@ -4119,10 +4113,10 @@ real_merge_menus (FMDirectoryView *view)
bonobo_ui_component_add_verb_list_with_data (view->details->ui, verbs, view);
gtk_signal_connect_object (GTK_OBJECT (fm_directory_view_get_background (view)),
"settings_changed",
G_CALLBACK (schedule_update_menus),
GTK_OBJECT (view));
g_signal_connect_swapped (fm_directory_view_get_background (view),
"settings_changed",
G_CALLBACK (schedule_update_menus),
view);
/* Do one-time state changes here; context-dependent ones go in update_menus */
if (!fm_directory_view_supports_zooming (view)) {
......@@ -4900,8 +4894,8 @@ load_directory (FMDirectoryView *view,
attributes);
g_list_free (attributes);
view->details->file_changed_handler_id = gtk_signal_connect
(GTK_OBJECT (view->details->directory_as_file),
view->details->file_changed_handler_id = g_signal_connect
(view->details->directory_as_file,
"changed",
G_CALLBACK (file_changed_callback),
view);
......@@ -4925,12 +4919,12 @@ finish_loading (FMDirectoryView *view)
/* Start loading. */
/* Connect handlers to learn about loading progress. */
view->details->done_loading_handler_id = gtk_signal_connect
(GTK_OBJECT (view->details->model),
view->details->done_loading_handler_id = g_signal_connect
(view->details->model,
"done_loading",
G_CALLBACK (done_loading_callback), view);
view->details->load_error_handler_id = gtk_signal_connect
(GTK_OBJECT (view->details->model),
view->details->load_error_handler_id = g_signal_connect
(view->details->model,
"load_error",
G_CALLBACK (load_error_callback), view);
......@@ -4958,12 +4952,12 @@ finish_loading (FMDirectoryView *view)
g_list_free (attributes);
view->details->files_added_handler_id = gtk_signal_connect
(GTK_OBJECT (view->details->model),
view->details->files_added_handler_id = g_signal_connect
(view->details->model,
"files_added",
G_CALLBACK (files_added_callback), view);
view->details->files_changed_handler_id = gtk_signal_connect
(GTK_OBJECT (view->details->model),
view->details->files_changed_handler_id = g_signal_connect
(view->details->model,
"files_changed",
G_CALLBACK (files_changed_callback), view);
}
......@@ -5055,7 +5049,7 @@ static void
disconnect_handler (GtkObject *object, int *id)
{
if (*id != 0) {
gtk_signal_disconnect (object, *id);
g_signal_handler_disconnect (object, *id);
*id = 0;
}
}
......@@ -5072,9 +5066,9 @@ remove_scripts_directory (FMDirectoryView *view, NautilusDirectory *directory)
view->details->scripts_directory_list = g_list_remove
(view->details->scripts_directory_list, directory);
gtk_signal_disconnect_by_func (GTK_OBJECT (directory),
G_CALLBACK (scripts_added_or_changed_callback),
view);
g_signal_handlers_disconnect_by_func (directory,
G_CALLBACK (scripts_added_or_changed_callback),
view);
nautilus_directory_file_monitor_remove (directory, &view->details->scripts_directory_list);
......@@ -5674,7 +5668,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, add_file),
NULL, NULL,
gtk_marshal_VOID__OBJECT,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, NAUTILUS_TYPE_FILE);
signals[BEGIN_FILE_CHANGES] =
g_signal_new ("begin_file_changes",
......@@ -5682,7 +5676,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, begin_file_changes),
NULL, NULL,
gtk_marshal_VOID__VOID,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[BEGIN_LOADING] =
g_signal_new ("begin_loading",
......@@ -5690,7 +5684,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, begin_loading),
NULL, NULL,
gtk_marshal_VOID__VOID,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[CLEAR] =
g_signal_new ("clear",
......@@ -5698,7 +5692,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, clear),
NULL, NULL,
gtk_marshal_VOID__VOID,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[END_FILE_CHANGES] =
g_signal_new ("end_file_changes",
......@@ -5706,7 +5700,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, end_file_changes),
NULL, NULL,
gtk_marshal_VOID__VOID,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[END_LOADING] =
g_signal_new ("end_loading",
......@@ -5714,7 +5708,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, end_loading),
NULL, NULL,
gtk_marshal_VOID__VOID,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[FILE_CHANGED] =
g_signal_new ("file_changed",
......@@ -5722,7 +5716,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, file_changed),
NULL, NULL,
gtk_marshal_VOID__OBJECT,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, NAUTILUS_TYPE_FILE);
signals[LOAD_ERROR] =
g_signal_new ("load_error",
......@@ -5730,7 +5724,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, load_error),
NULL, NULL,
gtk_marshal_VOID__INT,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
signals[REMOVE_FILE] =
g_signal_new ("remove_file",
......@@ -5738,7 +5732,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (FMDirectoryViewClass, remove_file),
NULL, NULL,
gtk_marshal_VOID__OBJECT,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, NAUTILUS_TYPE_FILE);
klass->accepts_dragged_files = real_accepts_dragged_files;
......
......@@ -2508,14 +2508,10 @@ create_icon_container (FMIconView *icon_view)
G_CALLBACK (icon_container_preview_callback), icon_view);
g_signal_connect (icon_container, "renaming_icon",
G_CALLBACK (renaming_icon_callback), directory_view);
gtk_signal_connect_object (GTK_OBJECT (icon_container),
"icon_stretch_started",
G_CALLBACK (fm_directory_view_update_menus),
GTK_OBJECT (directory_view));
gtk_signal_connect_object (GTK_OBJECT (icon_container),
"icon_stretch_ended",
G_CALLBACK (fm_directory_view_update_menus),
GTK_OBJECT (directory_view));
g_signal_connect_swapped (icon_container, "icon_stretch_started",
G_CALLBACK (fm_directory_view_update_menus), directory_view);
g_signal_connect_swapped (icon_container, "icon_stretch_ended",
G_CALLBACK (fm_directory_view_update_menus), directory_view);
gtk_container_add (GTK_CONTAINER (icon_view),
GTK_WIDGET (icon_container));
......
......@@ -352,8 +352,8 @@ create_image_widget_for_file (NautilusFile *file)
target_table, G_N_ELEMENTS (target_table),
GDK_ACTION_COPY | GDK_ACTION_MOVE);
gtk_signal_connect( GTK_OBJECT (image), "drag_data_received",
G_CALLBACK (fm_properties_window_drag_data_received), NULL);
g_signal_connect(image, "drag_data_received",
G_CALLBACK (fm_properties_window_drag_data_received), NULL);
gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
......@@ -367,16 +367,16 @@ create_image_widget_for_file (NautilusFile *file)
(GtkDestroyNotify) nautilus_file_unref);
/* React to icon theme changes. */
gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (),
"icons_changed",
G_CALLBACK (update_properties_window_icon),
GTK_OBJECT (image));
g_signal_connect_object (nautilus_icon_factory_get (),
"icons_changed",
G_CALLBACK (update_properties_window_icon),
image, G_CONNECT_SWAPPED);
/* Name changes can also change icon (since name is determined by MIME type) */
gtk_signal_connect_object_while_alive (GTK_OBJECT (file),
"changed",
G_CALLBACK (update_properties_window_icon),
GTK_OBJECT (image));
g_signal_connect_object (file,
"changed",
G_CALLBACK (update_properties_window_icon),
image, G_CONNECT_SWAPPED);
return image;
}
......@@ -747,12 +747,12 @@ attach_value_field_internal (GtkTable *table,
}
/* Connect to signal to update value when file changes. */
gtk_signal_connect_object_while_alive (GTK_OBJECT (file),
"changed",
ellipsize_text
? G_CALLBACK (ellipsizing_value_field_update)
: G_CALLBACK (value_field_update),
GTK_OBJECT (value_field));
g_signal_connect_object (file,
"changed",
ellipsize_text
? G_CALLBACK (ellipsizing_value_field_update)
: G_CALLBACK (value_field_update),
value_field, G_CONNECT_SWAPPED);
}
static void
......@@ -861,7 +861,7 @@ synch_groups_menu (GtkOptionMenu *option_menu, NautilusFile *file)
current_group_index = group_index;
}
menu_item = create_group_menu_item (file, group_name);
gtk_menu_append (GTK_MENU (new_menu), menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (new_menu), menu_item);
}
/* If current group wasn't in list, we prepend it (with a separator).
......@@ -872,10 +872,10 @@ synch_groups_menu (GtkOptionMenu *option_menu, NautilusFile *file)
if (groups != NULL) {
menu_item = gtk_menu_item_new ();
gtk_widget_show (menu_item);
gtk_menu_prepend (GTK_MENU (new_menu), menu_item);
gtk_menu_shell_prepend (GTK_MENU_SHELL (new_menu), menu_item);
}
menu_item = create_group_menu_item (file, current_group_name);
gtk_menu_prepend (GTK_MENU (new_menu), menu_item);
gtk_menu_shell_prepend (GTK_MENU_SHELL (new_menu), menu_item);
current_group_index = 0;
}
......@@ -928,10 +928,10 @@ attach_group_menu (GtkTable *table,
synch_groups_menu (option_menu, file);
/* Connect to signal to update menu when file changes. */
gtk_signal_connect_object_while_alive (GTK_OBJECT (file),
"changed",
G_CALLBACK (synch_groups_menu),
GTK_OBJECT (option_menu));
g_signal_connect_object (file,
"changed",
G_CALLBACK (synch_groups_menu),
option_menu, G_CONNECT_SWAPPED);
}
static void
......@@ -1034,7 +1034,7 @@ synch_user_menu (GtkOptionMenu *option_menu, NautilusFile *file)
owner_index = user_index;
}
menu_item = create_owner_menu_item (file, user_name);
gtk_menu_append (GTK_MENU (new_menu), menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (new_menu), menu_item);
}
/* If owner wasn't in list, we prepend it (with a separator).
......@@ -1045,10 +1045,10 @@ synch_user_menu (GtkOptionMenu *option_menu, NautilusFile *file)
if (users != NULL) {
menu_item = gtk_menu_item_new ();
gtk_widget_show (menu_item);
gtk_menu_prepend (GTK_MENU (new_menu), menu_item);
gtk_menu_shell_prepend (GTK_MENU_SHELL (new_menu), menu_item);
}
menu_item = create_owner_menu_item (file, owner_name);
gtk_menu_prepend (GTK_MENU (new_menu), menu_item);
gtk_menu_shell_prepend (GTK_MENU_SHELL (new_menu), menu_item);
owner_index = 0;
}
......@@ -1075,10 +1075,10 @@ attach_owner_menu (GtkTable *table,
synch_user_menu (option_menu, file);
/* Connect to signal to update menu when file changes. */
gtk_signal_connect_object_while_alive (GTK_OBJECT (file),
"changed",
G_CALLBACK (synch_user_menu),
GTK_OBJECT (option_menu));
g_signal_connect_object (file,
"changed",
G_CALLBACK (synch_user_menu),
option_menu, G_CONNECT_SWAPPED);
}
static guint
......@@ -1246,11 +1246,11 @@ attach_directory_contents_value_field (FMPropertiesWindow *window,
directory_contents_value_field_update (window);
/* Connect to signal to update value when file changes. */
gtk_signal_connect_object_while_alive (GTK_OBJECT (window->details->target_file),
"updated_deep_count_in_progress",
G_CALLBACK (schedule_directory_contents_update),
GTK_OBJECT (window));
g_signal_connect_object (window->details->target_file,
"updated_deep_count_in_progress",
G_CALLBACK (schedule_directory_contents_update),
window, G_CONNECT_SWAPPED);
return value_field;
}
......@@ -1605,10 +1605,10 @@ create_basic_page (FMPropertiesWindow *window)
}
/* React to name changes from elsewhere. */
gtk_signal_connect_object_while_alive (GTK_OBJECT (target_file),
"changed",
G_CALLBACK (name_field_update_to_match_file),
GTK_OBJECT (name_field));
g_signal_connect_object (target_file,
"changed",
G_CALLBACK (name_field_update_to_match_file),
name_field, G_CONNECT_SWAPPED);
if (should_show_file_type (window)) {
append_title_value_pair (table, _("Type:"), target_file, "type");
......@@ -1645,7 +1645,7 @@ create_basic_page (FMPropertiesWindow *window)
gtk_widget_show (temp_button);
gtk_box_pack_start (GTK_BOX (button_box), temp_button, FALSE, FALSE, 4);
gtk_signal_connect(GTK_OBJECT (temp_button), "clicked", G_CALLBACK (select_image_button_callback), window);
g_signal_connect(temp_button, "clicked", G_CALLBACK (select_image_button_callback), window);
temp_button = gtk_button_new_with_mnemonic (_("_Remove Custom Icon"));
gtk_widget_show (temp_button);
......@@ -1762,10 +1762,10 @@ create_emblems_page (FMPropertiesWindow *window)
property_button_update (GTK_TOGGLE_BUTTON (button));
/* Update button when file changes in future. */
gtk_signal_connect_object_while_alive (GTK_OBJECT (file),
"changed",
G_CALLBACK (property_button_update),
GTK_OBJECT (button));
g_signal_connect_object (file,
"changed",
G_CALLBACK (property_button_update),
button, G_CONNECT_SWAPPED);
gtk_container_add (GTK_CONTAINER (emblems_table), button);
}
......@@ -1821,12 +1821,12 @@ update_permissions_check_button_state (GtkWidget *check_button, NautilusFile *fi
nautilus_file_can_set_permissions (file));
/* Don't react to the "toggled" signal here to avoid recursion. */
gtk_signal_handler_block (GTK_OBJECT (check_button),
toggled_signal_id);
g_signal_handler_block (check_button,
toggled_signal_id);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
(file_permissions & permission) != 0);
gtk_signal_handler_unblock (GTK_OBJECT (check_button),
toggled_signal_id);
g_signal_handler_unblock (check_button,
toggled_signal_id);
}
static void
......@@ -1892,10 +1892,10 @@ set_up_permissions_checkbox (GtkWidget *check_button,
update_permissions_check_button_state (check_button, file);
/* Update state later if file changes. */
gtk_signal_connect_object_while_alive (GTK_OBJECT (file),
"changed",
G_CALLBACK (update_permissions_check_button_state),
GTK_OBJECT (check_button));
g_signal_connect_object (file,
"changed",
G_CALLBACK (update_permissions_check_button_state),
check_button, G_CONNECT_SWAPPED);
}
static void
......@@ -2213,7 +2213,6 @@ create_properties_window (StartupData *startup_data)
window->details->target_file = nautilus_file_ref (startup_data->target_file);
gtk_container_set_border_width (GTK_CONTAINER (window), GNOME_PAD);
gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE);
gtk_window_set_wmclass (GTK_WINDOW (window), "file_properties", "Nautilus");
/* Set initial window title */
......@@ -2241,10 +2240,10 @@ create_properties_window (StartupData *startup_data)
/* React to future property changes and file deletions. */
window->details->file_changed_handler_id =
gtk_signal_connect_object (GTK_OBJECT (window->details->target_file),
"changed",
G_CALLBACK (properties_window_file_changed_callback),
GTK_OBJECT (window));
g_signal_connect_swapped (window->details->target_file,
"changed",
G_CALLBACK (properties_window_file_changed_callback),
window);
/* Create the notebook tabs. */
window->details->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
......@@ -2364,9 +2363,9 @@ remove_pending_file (StartupData *startup_data,
(cancel_create_properties_window_callback, startup_data);
}
if (cancel_destroy_handler) {
gtk_signal_disconnect_by_func (GTK_OBJECT (startup_data->directory_view),
G_CALLBACK (directory_view_destroyed_callback),
startup_data);
g_signal_handlers_disconnect_by_func (startup_data->directory_view,
G_CALLBACK (directory_view_destroyed_callback),
startup_data);
}
g_hash_table_remove (pending_files, startup_data->original_file);
startup_data_free (startup_data);
......@@ -2452,8 +2451,8 @@ real_destroy (GtkObject *object)
}
if (window->details->target_file != NULL) {
gtk_signal_disconnect (GTK_OBJECT (window->details->target_file),
window->details->file_changed_handler_id);
g_signal_handler_disconnect (window->details->target_file,
window->details->file_changed_handler_id);
nautilus_file_monitor_remove (window->details->target_file, window);
nautilus_file_unref (window->details->target_file);
window->details->target_file = NULL;
......
......@@ -632,10 +632,10 @@ real_adding_file (FMListView *view, NautilusFile *file)
* and won't be specific to the search directory. Is that OK?
*/
gtk_signal_connect_object (GTK_OBJECT (file),
"changed",
G_CALLBACK (fm_directory_view_queue_file_change),
GTK_OBJECT (view));
g_signal_connect_swapped (GTK_OBJECT (file),
"changed",
G_CALLBACK (fm_directory_view_queue_file_change),
view);
/* Monitor the things needed to get the right
* icon. Also monitor a directory's item count because
......@@ -662,8 +662,8 @@ real_removing_file (FMListView *view, NautilusFile *file)
g_assert (NAUTILUS_IS_FILE (file));
nautilus_file_monitor_remove (file, view);
gtk_signal_disconnect_by_func
(GTK_OBJECT (file), G_CALLBACK (fm_directory_view_queue_file_change), view);
g_signal_handlers_disconnect_by_func
(G_OBJECT (file), G_CALLBACK (fm_directory_view_queue_file_change), view);
EEL_CALL_PARENT (FM_LIST_VIEW_CLASS, removing_file, (view, file));
}
......
......@@ -143,8 +143,8 @@ nautilus_about_instance_init (NautilusAbout *about)
area_width = gdk_pixbuf_get_width (about->details->background_pixbuf);
area_height = gdk_pixbuf_get_height (about->details->background_pixbuf);
gtk_widget_set_usize (GTK_WIDGET (about->details->drawing_area),
area_width, area_height);
gtk_widget_set_size_request (GTK_WIDGET (about->details->drawing_area),
area_width, area_height);
gtk_widget_set_events (about->details->drawing_area, GDK_EXPOSURE_MASK);
g_signal_connect (about->details->drawing_area, "expose_event",
......
......@@ -718,7 +718,7 @@ need_to_show_first_time_druid (void)
user_directory = nautilus_get_user_directory ();
druid_flag_file_name = g_strconcat (user_directory, "/first-time-flag", NULL);
result = !g_file_exists (druid_flag_file_name);
result = !g_file_test (druid_flag_file_name, G_FILE_TEST_EXISTS);
g_free (druid_flag_file_name);
/* we changed the name of the flag for version 1.0, so we should
......
......@@ -81,7 +81,7 @@ nautilus_bookmark_list_class_init (NautilusBookmarkListClass *class)
G_STRUCT_OFFSET (NautilusBookmarkListClass,
contents_changed),
NULL, NULL,
gtk_marshal_VOID__VOID,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
......@@ -177,9 +177,9 @@ static void
stop_monitoring_bookmark (NautilusBookmarkList *bookmarks,
NautilusBookmark *bookmark)
{
gtk_signal_disconnect_by_func (GTK_OBJECT (bookmark),
G_CALLBACK (bookmark_in_list_changed_callback),
bookmarks);
g_signal_handlers_disconnect_by_func (bookmark,
bookmark_in_list_changed_callback,
bookmarks);
}
static void
......
......@@ -142,11 +142,10 @@ create_bookmarks_window (NautilusBookmarkList *list, GObject *undo_manager_sourc
set_up_close_accelerator (window);
nautilus_undo_share_undo_manager (G_OBJECT (window), undo_manager_source);