[Nautilus-list] patch to remove deprecated calls
- From: jacob berkman <jacob ximian com>
- To: Nautilus <nautilus-list lists eazel com>
- Subject: [Nautilus-list] patch to remove deprecated calls
- Date: 13 Feb 2002 01:12:14 -0500
hi darn,
this patch removes deprecated glib/gdk/gtk calls from nautilus/src/.
i added a comple of GNOME2_CONVERSION_COMPLETE, which i'll probably fix
tomorrow.
when i click on the +/- in i get:
nautilus (pid:2784): ** WARNING **: failed to override signal
fm_directory_view->bump_zoom_level
although i didn't see it after a 3 minute look into it. darin, if you
have an idea let me know otherwise i'll look into it more.
thanks,
jacob
--
"In fact, can you imagine anything more terrifying than a zombie clown?"
-- moby
? nautilus-deprecated.patch
? nautilus-shell-marshal.c
? nautilus-shell-marshal.h
? nautilus-shell-marshal.list
? nautilus_shell_marshal_stamp
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/nautilus/src/Makefile.am,v
retrieving revision 1.133
diff -u -r1.133 Makefile.am
--- Makefile.am 2002/01/15 21:25:01 1.133
+++ Makefile.am 2002/02/13 06:03:37
@@ -16,6 +16,11 @@
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DVERSION="\"$(VERSION)\"" \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
+ -DGTK_DISABLE_DEPRECATED \
+ -DGNOME_DISABLE_DEPRECATED \
$(NULL)
LDADD =\
@@ -32,8 +37,13 @@
nautilus-shell-interface.h \
nautilus-shell-interface-common.c
+nautilus_shell_marshal_sources = \
+ nautilus-shell-marshal.h \
+ nautilus-shell-marshal.c
+
nautilus_SOURCES = \
$(nautilus_shell_interface_idl_sources) \
+ $(nautilus_shell_marshal_sources) \
nautilus-about.c \
nautilus-applicable-views.c \
nautilus-application.c \
@@ -111,8 +121,17 @@
nautilus_shell_interface_idl_stamp: nautilus-shell-interface.idl $(ORBIT_IDL) $(top_srcdir)/libnautilus/nautilus-view-component.idl
$(ORBIT_IDL) $(CORE_IDL_INCLUDES) -I$(top_srcdir) $<
touch $@
+
+$(nautilus_shell_marshal_sources): nautilus_shell_marshal_stamp
+nautilus_shell_marshal_stamp: nautilus-shell-marshal.list
+ echo "#include \"nautilus-shell-marshal.h\"" > nautilus-shell-marshal.c
+ glib-genmarshal --prefix=nautilus_shell_marshal $< --header > nautilus-shell-marshal.h
+ glib-genmarshal --prefix=nautilus_shell_marshal $< --body >> nautilus-shell-marshal.c
+ touch $@
+
+$(nautilus_OBJECTS): nautilus_shell_interface_idl_stamp nautilus_shell_marshal_stamp
+
-$(nautilus_OBJECTS): nautilus_shell_interface_idl_stamp
TESTS=check-nautilus
@@ -130,6 +149,8 @@
CLEANFILES = \
$(nautilus_shell_interface_idl_sources) \
nautilus_shell_interface_idl_stamp \
+ $(nautilus_shell_marshal_sources) \
+ nautilus_shell_marshal_stamp \
$(NULL)
EXTRA_DIST = \
@@ -138,11 +159,13 @@
$(ui_DATA) \
check-nautilus \
nautilus-shell-interface.idl \
+ nautilus-shell-marshal.list \
run-nautilus \
$(NULL)
BUILT_SOURCES = \
$(nautilus_shell_interface_idl_sources) \
+ $(nautilus_shell_marshal_sources) \
$(NULL)
install-data-hook: run-nautilus
Index: nautilus-about.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-about.c,v
retrieving revision 1.41
diff -u -r1.41 nautilus-about.c
--- nautilus-about.c 2002/01/08 22:37:55 1.41
+++ nautilus-about.c 2002/02/13 06:03:37
@@ -143,8 +143,8 @@
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",
Index: nautilus-application.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-application.c,v
retrieving revision 1.177
diff -u -r1.177 nautilus-application.c
--- nautilus-application.c 2002/02/05 17:11:43 1.177
+++ nautilus-application.c 2002/02/13 06:03:37
@@ -718,7 +718,7 @@
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
Index: nautilus-bookmark-list.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-bookmark-list.c,v
retrieving revision 1.36
diff -u -r1.36 nautilus-bookmark-list.c
--- nautilus-bookmark-list.c 2002/02/12 00:56:07 1.36
+++ nautilus-bookmark-list.c 2002/02/13 06:03:37
@@ -81,7 +81,7 @@
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 @@
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
Index: nautilus-bookmarks-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-bookmarks-window.c,v
retrieving revision 1.60
diff -u -r1.60 nautilus-bookmarks-window.c
--- nautilus-bookmarks-window.c 2002/01/25 00:52:58 1.60
+++ nautilus-bookmarks-window.c 2002/02/13 06:03:37
@@ -142,11 +142,10 @@
set_up_close_accelerator (window);
nautilus_undo_share_undo_manager (G_OBJECT (window), undo_manager_source);
gtk_window_set_wmclass (GTK_WINDOW (window), "bookmarks", "Nautilus");
- gtk_widget_set_usize (window,
- BOOKMARKS_WINDOW_MIN_WIDTH,
- BOOKMARKS_WINDOW_MIN_HEIGHT);
+ gtk_widget_set_size_request (window,
+ BOOKMARKS_WINDOW_MIN_WIDTH,
+ BOOKMARKS_WINDOW_MIN_HEIGHT);
nautilus_bookmarks_window_restore_geometry (window);
- gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE);
content_area = gtk_hbox_new (TRUE, GNOME_PAD);
gtk_widget_show (content_area);
@@ -284,8 +283,9 @@
G_CALLBACK (on_remove_button_clicked), NULL);
/* Register to find out about icon theme changes */
- gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (), "icons_changed",
- repopulate, GTK_OBJECT (window));
+ g_signal_connect_object (nautilus_icon_factory_get (), "icons_changed",
+ G_CALLBACK (repopulate), window,
+ G_CONNECT_SWAPPED);
gtk_tree_selection_set_mode (bookmark_selection,
GTK_SELECTION_BROWSE);
@@ -425,12 +425,12 @@
* This allows the selection to move to the next row, instead of leaping
* back to the top.
*/
- gtk_signal_handler_block(GTK_OBJECT(bookmarks),
- bookmark_list_changed_signal_id);
+ g_signal_handler_block(bookmarks,
+ bookmark_list_changed_signal_id);
selected_row = get_selected_row ();
nautilus_bookmark_list_delete_item_at(bookmarks, get_selected_row());
- gtk_signal_handler_unblock(GTK_OBJECT(bookmarks),
- bookmark_list_changed_signal_id);
+ g_signal_handler_unblock(bookmarks,
+ bookmark_list_changed_signal_id);
/*
* If removing the selected row selected the next row, then we'll
@@ -486,12 +486,12 @@
/* turn off list updating 'cuz otherwise the list-reordering code runs
* after repopulate(), thus reordering the correctly-ordered list.
*/
- gtk_signal_handler_block(GTK_OBJECT(bookmarks),
- bookmark_list_changed_signal_id);
+ g_signal_handler_block(bookmarks,
+ bookmark_list_changed_signal_id);
nautilus_bookmark_list_delete_item_at(bookmarks, old_row);
nautilus_bookmark_list_insert_item(bookmarks, bookmark, new_row);
- gtk_signal_handler_unblock(GTK_OBJECT(bookmarks),
- bookmark_list_changed_signal_id);
+ g_signal_handler_unblock(bookmarks,
+ bookmark_list_changed_signal_id);
g_object_unref (bookmark);
}
@@ -537,12 +537,12 @@
/* turn off list updating 'cuz otherwise the list-reordering code runs
* after repopulate(), thus reordering the correctly-ordered list.
*/
- gtk_signal_handler_block (GTK_OBJECT (bookmarks),
- bookmark_list_changed_signal_id);
+ g_signal_handler_block (bookmarks,
+ bookmark_list_changed_signal_id);
nautilus_bookmark_list_delete_item_at (bookmarks, selected_row);
nautilus_bookmark_list_insert_item (bookmarks, bookmark, selected_row);
- gtk_signal_handler_unblock (GTK_OBJECT (bookmarks),
- bookmark_list_changed_signal_id);
+ g_signal_handler_unblock (bookmarks,
+ bookmark_list_changed_signal_id);
g_object_unref (bookmark);
}
@@ -679,17 +679,17 @@
if (!selection_exists) {
/* Block signals to avoid modifying nonexistent selected item. */
- gtk_signal_handler_block (GTK_OBJECT (name_field),
- name_field_changed_signal_id);
+ g_signal_handler_block (name_field,
+ name_field_changed_signal_id);
nautilus_entry_set_text (NAUTILUS_ENTRY (name_field), "");
- gtk_signal_handler_unblock (GTK_OBJECT (name_field),
- name_field_changed_signal_id);
+ g_signal_handler_unblock (name_field,
+ name_field_changed_signal_id);
- gtk_signal_handler_block (GTK_OBJECT (uri_field),
- uri_field_changed_signal_id);
+ g_signal_handler_block (uri_field,
+ uri_field_changed_signal_id);
nautilus_entry_set_text (NAUTILUS_ENTRY (uri_field), "");
- gtk_signal_handler_unblock (GTK_OBJECT (uri_field),
- uri_field_changed_signal_id);
+ g_signal_handler_unblock (uri_field,
+ uri_field_changed_signal_id);
}
}
Index: nautilus-complex-search-bar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-complex-search-bar.c,v
retrieving revision 1.66
diff -u -r1.66 nautilus-complex-search-bar.c
--- nautilus-complex-search-bar.c 2002/01/25 00:52:58 1.66
+++ nautilus-complex-search-bar.c 2002/02/13 06:03:37
@@ -239,9 +239,9 @@
1);
gtk_container_add (GTK_CONTAINER (bar->details->find_them), find_them_box);
- gtk_signal_connect_object (GTK_OBJECT (bar->details->find_them), "clicked",
- G_CALLBACK (nautilus_navigation_bar_location_changed),
- GTK_OBJECT (bar));
+ g_signal_connect_swapped (bar->details->find_them, "clicked",
+ G_CALLBACK (nautilus_navigation_bar_location_changed),
+ bar);
gtk_wrap_box_pack (GTK_WRAP_BOX (hbox),
bar->details->find_them,
@@ -390,17 +390,17 @@
if (criterion->details->use_value_entry) {
/* We want to track whether the entry text is empty or not. */
- gtk_signal_connect_object (GTK_OBJECT (criterion->details->value_entry),
- "changed",
- G_CALLBACK (update_find_button_state),
- GTK_OBJECT (bar));
+ g_signal_connect_swapped (criterion->details->value_entry,
+ "changed",
+ G_CALLBACK (update_find_button_state),
+ bar);
/* We want to activate the "Find" button when any entry text is not empty */
g_assert (GTK_IS_BUTTON (bar->details->find_them));
- gtk_signal_connect_object (GTK_OBJECT (criterion->details->value_entry),
- "activate",
- G_CALLBACK (gtk_widget_activate),
- GTK_OBJECT (bar->details->find_them));
+ g_signal_connect_swapped (criterion->details->value_entry,
+ "activate",
+ G_CALLBACK (gtk_widget_activate),
+ bar->details->find_them);
}
nautilus_complex_search_bar_queue_resize (bar);
}
Index: nautilus-location-bar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-location-bar.c,v
retrieving revision 1.79
diff -u -r1.79 nautilus-location-bar.c
--- nautilus-location-bar.c 2002/01/22 23:37:49 1.79
+++ nautilus-location-bar.c 2002/02/13 06:03:37
@@ -155,13 +155,15 @@
prompt = g_strdup_printf (_("Do you want to view these %d locations "
"in separate windows?"),
name_count);
+ /* eel_run_simple_dialog should really take in pairs
+ * like gtk_dialog_new_with_buttons() does. */
new_windows_for_extras = eel_run_simple_dialog
(GTK_WIDGET (nautilus_location_bar_get_window (widget)),
TRUE,
prompt,
_("View in Multiple Windows?"),
GTK_STOCK_OK, GTK_STOCK_CANCEL,
- NULL) == GNOME_OK;
+ NULL) == 0 /* GNOME_OK */;
g_free (prompt);
@@ -671,9 +673,9 @@
nautilus_entry_set_special_tab_handling (NAUTILUS_ENTRY (entry), TRUE);
- gtk_signal_connect_object (GTK_OBJECT (entry), "activate",
- G_CALLBACK (nautilus_navigation_bar_location_changed),
- GTK_OBJECT (bar));
+ g_signal_connect_swapped (entry, "activate",
+ G_CALLBACK (nautilus_navigation_bar_location_changed),
+ bar);
#if GNOME2_CONVERSION_COMPLETE
/* The callback uses the marshal interface directly
@@ -695,9 +697,9 @@
GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
drag_types, G_N_ELEMENTS (drag_types),
GDK_ACTION_LINK);
- gtk_signal_connect (GTK_OBJECT (event_box), "drag_data_get",
- G_CALLBACK (drag_data_get_callback),
- bar);
+ g_signal_connect (event_box, "drag_data_get",
+ G_CALLBACK (drag_data_get_callback),
+ bar);
/* Drag dest. */
gtk_drag_dest_set (GTK_WIDGET (bar),
Index: nautilus-main.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-main.c,v
retrieving revision 1.118
diff -u -r1.118 nautilus-main.c
--- nautilus-main.c 2002/01/19 00:06:02 1.118
+++ nautilus-main.c 2002/02/13 06:03:37
@@ -109,7 +109,7 @@
void
nautilus_main_event_loop_register (GtkObject *object)
{
- gtk_signal_connect (object, "destroy", G_CALLBACK (event_loop_unregister), NULL);
+ g_signal_connect (object, "destroy", G_CALLBACK (event_loop_unregister), NULL);
event_loop_registrants = g_slist_prepend (event_loop_registrants, object);
}
Index: nautilus-navigation-bar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-navigation-bar.c,v
retrieving revision 1.17
diff -u -r1.17 nautilus-navigation-bar.c
--- nautilus-navigation-bar.c 2001/11/09 02:05:44 1.17
+++ nautilus-navigation-bar.c 2002/02/13 06:03:37
@@ -62,7 +62,7 @@
G_STRUCT_OFFSET (NautilusNavigationBarClass,
activate),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[LOCATION_CHANGED] = g_signal_new
Index: nautilus-property-browser.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-property-browser.c,v
retrieving revision 1.171
diff -u -r1.171 nautilus-property-browser.c
--- nautilus-property-browser.c 2002/02/12 00:56:07 1.171
+++ nautilus-property-browser.c 2002/02/13 06:03:37
@@ -254,7 +254,7 @@
g_free (temp_str);
/* set the initial size of the property browser */
- gtk_widget_set_usize (widget, PROPERTY_BROWSER_WIDTH, PROPERTY_BROWSER_HEIGHT);
+ gtk_widget_set_size_request (widget, PROPERTY_BROWSER_WIDTH, PROPERTY_BROWSER_HEIGHT);
gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
/* set the title and standard close accelerator */
@@ -469,7 +469,6 @@
(gtk_widget_new (nautilus_property_browser_get_type (), NULL));
gtk_container_set_border_width (GTK_CONTAINER (browser), 0);
- gtk_window_set_policy (GTK_WINDOW(browser), TRUE, TRUE, FALSE);
gtk_widget_show (GTK_WIDGET(browser));
return browser;
@@ -579,7 +578,7 @@
is_reset ? "patterns" : property_browser->details->category,
property_browser->details->dragged_file);
- if (!g_file_exists (image_file_name)) {
+ if (!g_file_test (image_file_name, G_FILE_TEST_EXISTS)) {
char *user_directory;
g_free (image_file_name);
@@ -647,7 +646,7 @@
property_browser->details->category,
file_name);
- if (!g_file_exists (image_file_name)) {
+ if (!g_file_test (image_file_name, G_FILE_TEST_EXISTS)) {
char *user_directory;
g_free (image_file_name);
@@ -722,7 +721,7 @@
gboolean save_flag;
NautilusPropertyBrowser *property_browser;
- property_browser = NAUTILUS_PROPERTY_BROWSER (gtk_object_get_user_data (GTK_OBJECT (widget)));
+ property_browser = NAUTILUS_PROPERTY_BROWSER (g_object_get_data (G_OBJECT (widget), "user_data"));
/* special case the user clicking on the already selected button, since we don't want that to toggle */
if (widget == GTK_WIDGET(property_browser->details->selected_button)) {
@@ -928,13 +927,18 @@
gtk_widget_show(widget);
gtk_table_attach(GTK_TABLE(table), widget, 0, 1, 0, 1, GTK_FILL, GTK_FILL, GNOME_PAD_SMALL, GNOME_PAD_SMALL);
- property_browser->details->keyword = gtk_entry_new_with_max_length (24);
+ property_browser->details->keyword = gtk_entry_new ();
+ gtk_entry_set_max_length (GTK_ENTRY (property_browser->details->keyword), 24);
gtk_widget_show(property_browser->details->keyword);
gtk_table_attach(GTK_TABLE(table), property_browser->details->keyword, 1, 2, 0, 1, GTK_FILL, GTK_FILL, GNOME_PAD_SMALL, GNOME_PAD_SMALL);
/* default image is the generic emblem */
g_free(property_browser->details->image_path);
- property_browser->details->image_path = gnome_pixmap_file ("gnome-question.png");
+#ifdef GNOME2_CONVERSION_COMPLETE
+ property_browser->details->image_path = gnome_pixmap_file ("gnome-question.png");
+#else
+ property_browser->details->image_path = g_strdup ("/usr/share/pixmaps/nautilus/emblems.png");
+#endif
/* set up a gnome icon entry to pick the image file */
widget = gtk_label_new(_("Image:"));
@@ -982,7 +986,8 @@
gtk_widget_show(widget);
gtk_table_attach(GTK_TABLE(table), widget, 0, 1, 0, 1, GTK_FILL, GTK_FILL, GNOME_PAD_SMALL, GNOME_PAD_SMALL);
- property_browser->details->color_name = gtk_entry_new_with_max_length (24);
+ property_browser->details->color_name = gtk_entry_new ();
+ gtk_entry_set_max_length (GTK_ENTRY (property_browser->details->color_name), 24);
gtk_widget_show(property_browser->details->color_name);
gtk_table_attach(GTK_TABLE(table), property_browser->details->color_name, 1, 2, 0, 1, GTK_FILL, GTK_FILL, GNOME_PAD_SMALL, GNOME_PAD_SMALL);
@@ -1058,7 +1063,7 @@
destination_name = nautilus_make_path (directory_path, source_file_name + 1);
/* make the directory if it doesn't exist */
- if (!g_file_exists(directory_path)) {
+ if (!g_file_test(directory_path, G_FILE_TEST_EXISTS)) {
directory_uri = gnome_vfs_get_uri_from_local_path (directory_path);
gnome_vfs_make_directory (directory_uri,
GNOME_VFS_PERM_USER_ALL
@@ -1143,7 +1148,7 @@
gdouble color[4];
NautilusPropertyBrowser *property_browser = NAUTILUS_PROPERTY_BROWSER (data);
- if (which_button == GNOME_OK) {
+ if (which_button == GTK_RESPONSE_OK) {
gnome_color_picker_get_d (GNOME_COLOR_PICKER (property_browser->details->color_picker), &color[0], &color[1], &color[2], &color[3]);
color_spec = g_strdup_printf
("#%02X%02X%02X",
@@ -1173,17 +1178,17 @@
static void
show_color_selection_window (GtkWidget *widget, gpointer *data)
{
- gdouble color[4];
+ GdkColor color;
NautilusPropertyBrowser *property_browser = NAUTILUS_PROPERTY_BROWSER(data);
- gtk_color_selection_get_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (property_browser->details->dialog)->colorsel), color);
+ gtk_color_selection_get_current_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (property_browser->details->dialog)->colorsel), &color);
gtk_widget_destroy (property_browser->details->dialog);
/* allocate a new color selection dialog */
property_browser->details->dialog = nautilus_color_selection_dialog_new (property_browser);
/* set the color to the one picked by the selector */
- gnome_color_picker_set_d (GNOME_COLOR_PICKER (property_browser->details->color_picker), color[0], color[1], color[2], 1.0);
+ gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (property_browser->details->color_picker), color.red, color.green, color.blue, 1.0);
/* connect the signals to the new dialog */
@@ -1219,10 +1224,10 @@
g_signal_connect (color_dialog->ok_button,
"clicked",
(GtkSignalFunc) show_color_selection_window, property_browser);
- gtk_signal_connect_object (GTK_OBJECT (color_dialog->cancel_button),
- "clicked",
- (GtkSignalFunc) gtk_widget_destroy,
- GTK_OBJECT (color_dialog));
+ g_signal_connect_swapped (color_dialog->cancel_button,
+ "clicked",
+ (GtkSignalFunc) gtk_widget_destroy,
+ color_dialog);
gtk_widget_hide(color_dialog->help_button);
gtk_window_set_position (GTK_WINDOW (color_dialog), GTK_WIN_POS_MOUSE);
@@ -1276,7 +1281,7 @@
char *directory_uri, *error_string;
GnomeVFSResult result;
- if (which_button == GNOME_OK) {
+ if (which_button == GTK_RESPONSE_OK) {
char *destination_name, *extension;
const char *new_keyword;
char *stripped_keyword;
@@ -1330,7 +1335,7 @@
g_free (user_directory);
/* make the directory if it doesn't exist */
- if (!g_file_exists (directory_path)) {
+ if (!g_file_test (directory_path, G_FILE_TEST_EXISTS)) {
directory_uri = gnome_vfs_get_uri_from_local_path (directory_path);
gnome_vfs_make_directory(directory_uri,
GNOME_VFS_PERM_USER_ALL
@@ -1871,16 +1876,13 @@
property_browser->details->category_position += 1;
/* add a signal to handle clicks */
- gtk_object_set_user_data (GTK_OBJECT(button), property_browser);
- gtk_signal_connect_full
- (GTK_OBJECT (button),
+ g_object_set_data (G_OBJECT(button), "user_data", property_browser);
+ g_signal_connect_data
+ (button,
"clicked",
G_CALLBACK (category_clicked_callback),
- NULL,
g_strdup (name),
- g_free,
- FALSE,
- FALSE);
+ (GClosureNotify)g_free, 0);
}
/* update_contents populates the property browser with information specified by the path and other state variables */
@@ -2026,7 +2028,7 @@
/* enable the "add new" button and update it's name */
if (text != NULL) {
- gtk_label_set (GTK_LABEL(property_browser->details->add_button_label), text);
+ gtk_label_set_text (GTK_LABEL(property_browser->details->add_button_label), text);
}
if (show_buttons) {
gtk_widget_show (property_browser->details->add_button);
@@ -2098,7 +2100,7 @@
else
gtk_widget_show(property_browser->details->remove_button);
if (text != NULL) {
- gtk_label_set (GTK_LABEL(property_browser->details->remove_button_label), text);
+ gtk_label_set_text (GTK_LABEL(property_browser->details->remove_button_label), text);
}
}
}
Index: nautilus-search-bar-criterion.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-search-bar-criterion.c,v
retrieving revision 1.46
diff -u -r1.46 nautilus-search-bar-criterion.c
--- nautilus-search-bar-criterion.c 2002/01/19 00:06:02 1.46
+++ nautilus-search-bar-criterion.c 2002/02/13 06:03:37
@@ -219,7 +219,7 @@
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
@@ -315,7 +315,7 @@
g_object_set_data (G_OBJECT(item), "type", GINT_TO_POINTER(i));
g_signal_connect (item, "activate",
G_CALLBACK (criterion_type_changed_callback), criterion);
- gtk_menu_append (GTK_MENU (search_criteria_menu),
+ gtk_menu_shell_append (GTK_MENU_SHELL (search_criteria_menu),
item);
gtk_widget_show (item);
}
@@ -359,8 +359,8 @@
criterion);
}
}
- gtk_menu_append (GTK_MENU (relation_menu),
- item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (relation_menu),
+ item);
}
gtk_option_menu_set_menu (GTK_OPTION_MENU (relation_option_menu),
relation_menu);
@@ -400,8 +400,8 @@
g_free (context_stripped_value);
gtk_widget_show (item);
g_object_set_data (G_OBJECT(item), "type", GINT_TO_POINTER(i));
- gtk_menu_append (GTK_MENU (value_menu),
- item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (value_menu),
+ item);
}
gtk_option_menu_set_menu (GTK_OPTION_MENU (value_option_menu),
value_menu);
@@ -714,8 +714,8 @@
g_signal_connect (item, "activate",
G_CALLBACK (criterion_type_changed_callback), criterion);
- gtk_menu_append (GTK_MENU (new_menu),
- item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (new_menu),
+ item);
gtk_widget_show (item);
if (i == criterion->details->type) {
gtk_menu_set_active (GTK_MENU (new_menu), i);
@@ -1008,7 +1008,7 @@
gtk_container_add (GTK_CONTAINER (menu_item), image);
gtk_widget_show_all (menu_item);
- gtk_menu_append (GTK_MENU (value_menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (value_menu), menu_item);
g_object_unref (pixbuf);
g_free (label);
Index: nautilus-shell.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-shell.c,v
retrieving revision 1.48
diff -u -r1.48 nautilus-shell.c
--- nautilus-shell.c 2002/01/17 01:39:26 1.48
+++ nautilus-shell.c 2002/02/13 06:03:37
@@ -298,8 +298,8 @@
nautilus_window_go_home (window);
}
- gtk_widget_set_uposition (GTK_WIDGET (window), x, y);
- gtk_widget_set_usize (GTK_WIDGET (window), width, height);
+ gtk_window_move (GTK_WINDOW (window), x, y);
+ gtk_widget_set_size_request (GTK_WIDGET (window), width, height);
g_free (location);
eel_string_list_free (attribute_list);
Index: nautilus-sidebar-tabs.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar-tabs.c,v
retrieving revision 1.93
diff -u -r1.93 nautilus-sidebar-tabs.c
--- nautilus-sidebar-tabs.c 2002/01/25 00:52:58 1.93
+++ nautilus-sidebar-tabs.c 2002/02/13 06:03:37
@@ -1203,7 +1203,7 @@
/* draw the off-screen buffer to the screen, then release it */
if (!layout_only) {
- gdk_gc_unref(temp_gc);
+ g_object_unref(temp_gc);
if (is_themed) {
/* draw the pixbuf onto the widget and release it */
gdk_pixbuf_render_to_drawable_alpha (tab_pixbuf,
@@ -1303,7 +1303,7 @@
draw_one_tab_plain (sidebar_tabs, temp_gc, sidebar_tabs->details->title, NULL,
x_pos + TITLE_TAB_OFFSET, y_pos, sidebar_tabs->details->title_prelit, &sidebar_tabs->details->title_rect);
}
- gdk_gc_unref (temp_gc);
+ g_object_unref (temp_gc);
} else {
if (sidebar_tabs->details->tab_count > 0) {
Index: nautilus-sidebar-title.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar-title.c,v
retrieving revision 1.129
diff -u -r1.129 nautilus-sidebar-title.c
--- nautilus-sidebar-title.c 2002/01/21 22:49:35 1.129
+++ nautilus-sidebar-title.c 2002/02/13 06:03:37
@@ -128,11 +128,11 @@
g_return_if_fail (background != NULL);
- gtk_signal_connect_while_alive (GTK_OBJECT (background),
- "appearance_changed",
- G_CALLBACK (appearance_changed_callback),
- sidebar_title,
- GTK_OBJECT (sidebar_title));
+ g_signal_connect_object (background,
+ "appearance_changed",
+ G_CALLBACK (appearance_changed_callback),
+ sidebar_title,
+ 0);
}
#if GNOME2_CONVERSION_COMPLETE
@@ -176,10 +176,10 @@
sidebar_title->details = g_new0 (NautilusSidebarTitleDetails, 1);
/* Register to find out about icon theme changes */
- gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (),
- "icons_changed",
- G_CALLBACK (update_icon),
- GTK_OBJECT (sidebar_title));
+ g_signal_connect_swapped (nautilus_icon_factory_get (),
+ "icons_changed",
+ G_CALLBACK (update_icon),
+ sidebar_title);
g_signal_connect (sidebar_title, "realize",
G_CALLBACK (realize_callback), NULL);
@@ -232,8 +232,8 @@
release_file (NautilusSidebarTitle *sidebar_title)
{
if (sidebar_title->details->file_changed_connection != 0) {
- gtk_signal_disconnect (GTK_OBJECT (sidebar_title->details->file),
- sidebar_title->details->file_changed_connection);
+ g_signal_handler_disconnect (sidebar_title->details->file,
+ sidebar_title->details->file_changed_connection);
sidebar_title->details->file_changed_connection = 0;
}
@@ -790,10 +790,10 @@
/* attach file */
if (file != NULL) {
sidebar_title->details->file_changed_connection =
- gtk_signal_connect_object (GTK_OBJECT (sidebar_title->details->file),
- "changed",
- G_CALLBACK (update_all),
- GTK_OBJECT (sidebar_title));
+ g_signal_connect_swapped (sidebar_title->details->file,
+ "changed",
+ G_CALLBACK (update_all),
+ sidebar_title);
/* Monitor the things needed to get the right
* icon. Don't monitor a directory's item
Index: nautilus-sidebar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar.c,v
retrieving revision 1.204
diff -u -r1.204 nautilus-sidebar.c
--- nautilus-sidebar.c 2002/02/07 00:24:36 1.204
+++ nautilus-sidebar.c 2002/02/13 06:03:38
@@ -243,7 +243,7 @@
sidebar->details = g_new0 (NautilusSidebarDetails, 1);
/* set the minimum size of the sidebar */
- gtk_widget_set_usize (widget, SIDEBAR_MINIMUM_WIDTH, SIDEBAR_MINIMUM_HEIGHT);
+ gtk_widget_set_size_request (widget, SIDEBAR_MINIMUM_WIDTH, SIDEBAR_MINIMUM_HEIGHT);
/* load the default background from the current theme */
nautilus_sidebar_read_theme(sidebar);
@@ -437,12 +437,12 @@
gboolean already_on;
g_return_if_fail (GTK_IS_CHECK_MENU_ITEM (widget));
- g_return_if_fail (NAUTILUS_IS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget))));
+ g_return_if_fail (NAUTILUS_IS_SIDEBAR (g_object_get_data (G_OBJECT (widget), "user_data")));
g_return_if_fail (g_object_get_data (G_OBJECT (widget), "nautilus-sidebar/preference-key") != NULL);
preference_key = g_object_get_data (G_OBJECT (widget), "nautilus-sidebar/preference-key");
- sidebar = NAUTILUS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (widget)));
+ sidebar = NAUTILUS_SIDEBAR (g_object_get_data (G_OBJECT (widget), "user_data"));
nautilus_sidebar_hide_active_panel_if_matches (sidebar, sidebar_iid);
@@ -496,19 +496,16 @@
/* add a check menu item */
menu_item = gtk_check_menu_item_new_with_label (name);
- gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), panel_visible);
gtk_widget_show (menu_item);
- gtk_object_set_user_data (GTK_OBJECT (menu_item), data->sidebar);
- gtk_menu_append (data->menu, menu_item);
- gtk_signal_connect_full (GTK_OBJECT (menu_item),
- "activate",
- G_CALLBACK (toggle_sidebar_panel),
- NULL,
- g_strdup (iid),
- g_free,
- FALSE,
- FALSE);
+ g_object_set_data (G_OBJECT (menu_item), "user_data", data->sidebar);
+ gtk_menu_shell_append (GTK_MENU_SHELL (data->menu), menu_item);
+ g_signal_connect_data (menu_item,
+ "activate",
+ G_CALLBACK (toggle_sidebar_panel),
+ g_strdup (iid),
+ (GClosureNotify)g_free,
+ 0);
g_object_set_data_full (G_OBJECT (menu_item),
"nautilus-sidebar/preference-key",
@@ -566,7 +563,7 @@
/* add the reset background item, possibly disabled */
menu_item = gtk_menu_item_new_with_label (_("Reset Background"));
gtk_widget_show (menu_item);
- gtk_menu_append (GTK_MENU(menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
gtk_widget_set_sensitive (menu_item, has_background);
g_signal_connect (menu_item, "activate",
G_CALLBACK (reset_background_callback), sidebar);
@@ -574,7 +571,7 @@
/* add a separator */
menu_item = gtk_menu_item_new ();
gtk_widget_show (menu_item);
- gtk_menu_append (GTK_MENU (menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
/* add the sidebar panels */
sidebar_add_panel_context_menu_items (sidebar, menu);
@@ -813,9 +810,9 @@
/* Block so we don't respond to our own metadata changes.
*/
- gtk_signal_handler_block_by_func (GTK_OBJECT (sidebar->details->file),
- G_CALLBACK (background_metadata_changed_callback),
- sidebar);
+ g_signal_handlers_block_by_func (sidebar->details->file,
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
nautilus_file_set_metadata
(sidebar->details->file,
@@ -823,9 +820,9 @@
DEFAULT_TAB_COLOR,
color_spec);
- gtk_signal_handler_unblock_by_func (GTK_OBJECT (sidebar->details->file),
- G_CALLBACK (background_metadata_changed_callback),
- sidebar);
+ g_signal_handlers_unblock_by_func (sidebar->details->file,
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
break;
case TITLE_TAB_PART:
/* color dropped on title tab */
@@ -835,9 +832,9 @@
/* Block so we don't respond to our own metadata changes.
*/
- gtk_signal_handler_block_by_func (GTK_OBJECT (sidebar->details->file),
- G_CALLBACK (background_metadata_changed_callback),
- sidebar);
+ g_signal_handlers_block_by_func (sidebar->details->file,
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
nautilus_file_set_metadata
(sidebar->details->file,
@@ -845,9 +842,9 @@
DEFAULT_TAB_COLOR,
color_spec);
- gtk_signal_handler_unblock_by_func (GTK_OBJECT (sidebar->details->file),
- G_CALLBACK (background_metadata_changed_callback),
- sidebar);
+ g_signal_handlers_unblock_by_func (sidebar->details->file,
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
break;
case ICON_PART:
case BACKGROUND_PART:
@@ -1047,7 +1044,7 @@
gtk_widget_hide (GTK_WIDGET (sidebar->details->button_box_centerer));
gtk_widget_hide (GTK_WIDGET (sidebar->details->title));
- gtk_notebook_set_page (notebook, which_view);
+ gtk_notebook_set_current_page (notebook, which_view);
notify_current_sidebar_view (sidebar, "close", FALSE);
}
@@ -1212,9 +1209,9 @@
/* Block so we don't respond to our own metadata changes.
*/
- gtk_signal_handler_block_by_func (GTK_OBJECT (sidebar->details->file),
- G_CALLBACK (background_metadata_changed_callback),
- sidebar);
+ g_signal_handlers_block_by_func (sidebar->details->file,
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
color = eel_background_get_color (background);
image = eel_background_get_image_uri (background);
@@ -1232,9 +1229,9 @@
g_free (color);
g_free (image);
- gtk_signal_handler_unblock_by_func (GTK_OBJECT (sidebar->details->file),
- G_CALLBACK (background_metadata_changed_callback),
- sidebar);
+ g_signal_handlers_unblock_by_func (sidebar->details->file,
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
}
/* handle the background reset signal by writing out NULL to metadata and setting the backgrounds
@@ -1251,9 +1248,9 @@
/* Block so we don't respond to our own metadata changes.
*/
- gtk_signal_handler_block_by_func (GTK_OBJECT (sidebar->details->file),
- G_CALLBACK (background_metadata_changed_callback),
- sidebar);
+ g_signal_handlers_block_by_func (sidebar->details->file,
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
nautilus_file_set_metadata (sidebar->details->file,
NAUTILUS_METADATA_KEY_SIDEBAR_BACKGROUND_COLOR,
@@ -1265,9 +1262,9 @@
NULL,
NULL);
- gtk_signal_handler_unblock_by_func (GTK_OBJECT (sidebar->details->file),
- G_CALLBACK (background_metadata_changed_callback),
- sidebar);
+ g_signal_handlers_unblock_by_func (sidebar->details->file,
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
/* Force a read from the metadata to set the defaults
*/
@@ -1290,7 +1287,7 @@
NautilusSidebar *sidebar;
GnomeVFSMimeApplication *application;
- sidebar = NAUTILUS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (button)));
+ sidebar = NAUTILUS_SIDEBAR (g_object_get_data (G_OBJECT (button), "user_data"));
application = gnome_vfs_application_registry_get_mime_application (id_str);
@@ -1310,7 +1307,7 @@
{
NautilusSidebar *sidebar;
- sidebar = NAUTILUS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (button)));
+ sidebar = NAUTILUS_SIDEBAR (g_object_get_data (G_OBJECT (button), "user_data"));
}
static void
@@ -1334,7 +1331,7 @@
{
NautilusSidebar *sidebar;
- sidebar = NAUTILUS_SIDEBAR (gtk_object_get_user_data (GTK_OBJECT (button)));
+ sidebar = NAUTILUS_SIDEBAR (g_object_get_data (G_OBJECT (button), "user_data"));
g_return_if_fail (sidebar->details->file != NULL);
@@ -1391,7 +1388,7 @@
(GTK_OBJECT (temp_button), "clicked",
G_CALLBACK (command_button_callback), id_string);
- gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
+ g_object_set_data (G_OBJECT (temp_button), "user_data", sidebar);
gtk_widget_show (temp_button);
}
@@ -1400,7 +1397,7 @@
temp_button = gtk_button_new_with_label (_("Open with..."));
g_signal_connect (temp_button, "clicked",
G_CALLBACK (open_with_callback), NULL);
- gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
+ g_object_set_data (G_OBJECT (temp_button), "user_data", sidebar);
gtk_widget_show (temp_button);
gtk_box_pack_start (GTK_BOX (sidebar->details->button_box),
temp_button, FALSE, FALSE, 0);
@@ -1444,7 +1441,7 @@
eel_gtk_signal_connect_free_data
(GTK_OBJECT (temp_button), "clicked",
G_CALLBACK (metadata_button_callback), command_string);
- gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
+ g_object_set_data (G_OBJECT (temp_button), "user_data", sidebar);
gtk_widget_show (temp_button);
}
@@ -1580,9 +1577,9 @@
}
/* Block so we don't write these settings out in response to our set calls below */
- gtk_signal_handler_block_by_func (GTK_OBJECT (background),
- G_CALLBACK (background_settings_changed_callback),
- sidebar);
+ g_signal_handlers_block_by_func (background,
+ G_CALLBACK (background_settings_changed_callback),
+ sidebar);
eel_background_set_image_uri (background, background_image);
eel_background_set_color (background, background_color);
@@ -1602,9 +1599,9 @@
nautilus_sidebar_tabs_set_color(sidebar->details->title_tab, color_spec);
g_free (color_spec);
- gtk_signal_handler_unblock_by_func (GTK_OBJECT (background),
- G_CALLBACK (background_settings_changed_callback),
- sidebar);
+ g_signal_handlers_unblock_by_func (background,
+ G_CALLBACK (background_settings_changed_callback),
+ sidebar);
}
@@ -1663,10 +1660,10 @@
sidebar->details->file = file;
sidebar->details->file_changed_connection =
- gtk_signal_connect_object (GTK_OBJECT (sidebar->details->file),
- "changed",
- G_CALLBACK (background_metadata_changed_callback),
- GTK_OBJECT (sidebar));
+ g_signal_connect_swapped (sidebar->details->file,
+ "changed",
+ G_CALLBACK (background_metadata_changed_callback),
+ sidebar);
attributes = nautilus_mime_actions_get_minimum_file_attributes ();
nautilus_file_monitor_add (sidebar->details->file, sidebar, attributes);
Index: nautilus-simple-search-bar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-simple-search-bar.c,v
retrieving revision 1.32
diff -u -r1.32 nautilus-simple-search-bar.c
--- nautilus-simple-search-bar.c 2002/01/25 00:52:58 1.32
+++ nautilus-simple-search-bar.c 2002/02/13 06:03:38
@@ -132,17 +132,17 @@
nautilus_window_get_ui_container (window),
TRUE);
- gtk_signal_connect_object (GTK_OBJECT (bar->details->entry), "activate",
- G_CALLBACK (gtk_widget_activate),
- GTK_OBJECT (bar->details->find_button));
- gtk_signal_connect_object (GTK_OBJECT (bar->details->entry), "changed",
- G_CALLBACK (update_simple_find_button_state), GTK_OBJECT (bar));
+ g_signal_connect_swapped (bar->details->entry, "activate",
+ G_CALLBACK (gtk_widget_activate),
+ bar->details->find_button);
+ g_signal_connect_swapped (bar->details->entry, "changed",
+ G_CALLBACK (update_simple_find_button_state), bar);
gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (bar->details->entry), TRUE, TRUE, 0);
- gtk_signal_connect_object (GTK_OBJECT (bar->details->find_button), "clicked",
- G_CALLBACK (nautilus_navigation_bar_location_changed),
- GTK_OBJECT (bar));
+ g_signal_connect_swapped (bar->details->find_button, "clicked",
+ G_CALLBACK (nautilus_navigation_bar_location_changed),
+ bar);
gtk_box_pack_start (GTK_BOX (hbox), bar->details->find_button, FALSE, TRUE, 1);
update_simple_find_button_state (bar);
Index: nautilus-switchable-navigation-bar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-switchable-navigation-bar.c,v
retrieving revision 1.28
diff -u -r1.28 nautilus-switchable-navigation-bar.c
--- nautilus-switchable-navigation-bar.c 2002/01/25 00:52:58 1.28
+++ nautilus-switchable-navigation-bar.c 2002/02/13 06:03:38
@@ -121,10 +121,10 @@
bar->details->search_bar = NAUTILUS_SWITCHABLE_SEARCH_BAR (nautilus_switchable_search_bar_new (bar->details->window));
- gtk_signal_connect_object (GTK_OBJECT (bar->details->search_bar),
- "location_changed",
+ g_signal_connect_swapped (bar->details->search_bar,
+ "location_changed",
G_CALLBACK (nautilus_navigation_bar_location_changed),
- GTK_OBJECT (bar));
+ bar);
gtk_box_pack_start (GTK_BOX (bar->details->hbox), GTK_WIDGET (bar->details->search_bar), TRUE, TRUE, 0);
}
@@ -144,10 +144,10 @@
switchable_navigation_bar->details->window = window;
switchable_navigation_bar->details->location_bar = NAUTILUS_LOCATION_BAR (nautilus_location_bar_new (window));
- gtk_signal_connect_object (GTK_OBJECT (switchable_navigation_bar->details->location_bar),
- "location_changed",
- G_CALLBACK (nautilus_navigation_bar_location_changed),
- GTK_OBJECT (bar));
+ g_signal_connect_swapped (switchable_navigation_bar->details->location_bar,
+ "location_changed",
+ G_CALLBACK (nautilus_navigation_bar_location_changed),
+ bar);
gtk_box_pack_start (GTK_BOX (switchable_navigation_bar->details->hbox),
GTK_WIDGET (switchable_navigation_bar->details->location_bar), TRUE, TRUE, 0);
Index: nautilus-switchable-search-bar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-switchable-search-bar.c,v
retrieving revision 1.33
diff -u -r1.33 nautilus-switchable-search-bar.c
--- nautilus-switchable-search-bar.c 2002/01/25 00:52:58 1.33
+++ nautilus-switchable-search-bar.c 2002/02/13 06:03:38
@@ -133,14 +133,14 @@
bar->complex_search_bar = nautilus_complex_search_bar_new (window);
bar->simple_search_bar = nautilus_simple_search_bar_new (window);
- gtk_signal_connect_object (GTK_OBJECT (bar->complex_search_bar),
- "location_changed",
- G_CALLBACK (nautilus_navigation_bar_location_changed),
- GTK_OBJECT (bar));
- gtk_signal_connect_object (GTK_OBJECT (bar->simple_search_bar),
- "location_changed",
- G_CALLBACK (nautilus_navigation_bar_location_changed),
- GTK_OBJECT (bar));
+ g_signal_connect_swapped (bar->complex_search_bar,
+ "location_changed",
+ G_CALLBACK (nautilus_navigation_bar_location_changed),
+ bar);
+ g_signal_connect_swapped (bar->simple_search_bar,
+ "location_changed",
+ G_CALLBACK (nautilus_navigation_bar_location_changed),
+ bar);
gtk_box_pack_start (GTK_BOX (hbox), bar->complex_search_bar, TRUE, TRUE,
Index: nautilus-theme-selector.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-theme-selector.c,v
retrieving revision 1.64
diff -u -r1.64 nautilus-theme-selector.c
--- nautilus-theme-selector.c 2002/01/19 00:06:03 1.64
+++ nautilus-theme-selector.c 2002/02/13 06:03:38
@@ -134,13 +134,13 @@
one_dimensions = eel_gtk_widget_get_preferred_dimensions (one);
two_dimensions = eel_gtk_widget_get_preferred_dimensions (two);
- gtk_widget_set_usize (one,
- MAX (one_dimensions.width, two_dimensions.width),
- MAX (one_dimensions.height, two_dimensions.height));
-
- gtk_widget_set_usize (two,
- MAX (one_dimensions.width, two_dimensions.width),
- MAX (one_dimensions.height, two_dimensions.height));
+ gtk_widget_set_size_request (one,
+ MAX (one_dimensions.width, two_dimensions.width),
+ MAX (one_dimensions.height, two_dimensions.height));
+
+ gtk_widget_set_size_request (two,
+ MAX (one_dimensions.width, two_dimensions.width),
+ MAX (one_dimensions.height, two_dimensions.height));
}
static void
@@ -452,11 +452,11 @@
theme_to_remove = g_strdup ((const char *)eel_image_chooser_get_row_data (image_chooser, theme_to_remove_position));
- gtk_signal_handler_block (GTK_OBJECT (theme_selector->details->remove_theme_selector),
- theme_selector->details->theme_selector_changed_connection);
+ g_signal_handler_block (theme_selector->details->remove_theme_selector,
+ theme_selector->details->theme_selector_changed_connection);
theme_selector_finish_remove (theme_selector);
- gtk_signal_handler_unblock (GTK_OBJECT (theme_selector->details->remove_theme_selector),
- theme_selector->details->theme_selector_changed_connection);
+ g_signal_handler_unblock (theme_selector->details->remove_theme_selector,
+ theme_selector->details->theme_selector_changed_connection);
selected_theme = theme_selector_get_selected_theme (theme_selector);
g_return_if_fail (selected_theme != NULL);
Index: nautilus-view-frame.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-view-frame.c,v
retrieving revision 1.154
diff -u -r1.154 nautilus-view-frame.c
--- nautilus-view-frame.c 2002/02/07 00:24:37 1.154
+++ nautilus-view-frame.c 2002/02/13 06:03:38
@@ -35,6 +35,7 @@
#include "nautilus-signaller.h"
#include "nautilus-view-frame-private.h"
#include "nautilus-window.h"
+#include "nautilus-shell-marshal.h"
#include <bonobo/bonobo-event-source.h>
#include <bonobo/bonobo-control-frame.h>
#include <bonobo/bonobo-zoomable-frame.h>
@@ -663,7 +664,7 @@
* hierarchy between the widget returned by get_widget and the
* actual plug.
*/
- children = gtk_container_children (GTK_CONTAINER (widget));
+ children = gtk_container_get_children (GTK_CONTAINER (widget));
g_list_free (children);
/* If there's nothing inside the widget at all, that means
@@ -1380,7 +1381,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
change_selection),
NULL, NULL,
- gtk_marshal_VOID__POINTER,
+ g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
signals[CHANGE_STATUS] = g_signal_new
("change_status",
@@ -1398,7 +1399,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
failed),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[GET_HISTORY_LIST] = g_signal_new
("get_history_list",
@@ -1407,7 +1408,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
get_history_list),
NULL, NULL,
- nautilus_marshal_POINTER__VOID,
+ nautilus_shell_marshal_POINTER__VOID,
G_TYPE_POINTER, 0);
signals[GO_BACK] = g_signal_new
("go_back",
@@ -1416,7 +1417,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
go_back),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[CLOSE_WINDOW] = g_signal_new
("close_window",
@@ -1425,7 +1426,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
close_window),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[LOAD_COMPLETE] = g_signal_new
("load_complete",
@@ -1434,7 +1435,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
load_complete),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[LOAD_PROGRESS_CHANGED] = g_signal_new
("load_progress_changed",
@@ -1443,7 +1444,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
load_progress_changed),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[LOAD_UNDERWAY] = g_signal_new
("load_underway",
@@ -1452,7 +1453,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
load_underway),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[OPEN_LOCATION_FORCE_NEW_WINDOW] = g_signal_new
("open_location_force_new_window",
@@ -1506,7 +1507,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
title_changed),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[VIEW_LOADED] = g_signal_new
("view_loaded",
@@ -1515,7 +1516,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
view_loaded),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[ZOOM_LEVEL_CHANGED] = g_signal_new
("zoom_level_changed",
@@ -1524,7 +1525,7 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
zoom_level_changed),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[ZOOM_PARAMETERS_CHANGED] = g_signal_new
("zoom_parameters_changed",
@@ -1533,6 +1534,6 @@
G_STRUCT_OFFSET (NautilusViewFrameClass,
zoom_parameters_changed),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
Index: nautilus-window-manage-views.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window-manage-views.c,v
retrieving revision 1.283
diff -u -r1.283 nautilus-window-manage-views.c
--- nautilus-window-manage-views.c 2002/02/06 21:56:43 1.283
+++ nautilus-window-manage-views.c 2002/02/13 06:03:38
@@ -537,9 +537,9 @@
cancel_viewed_file_changed_callback (NautilusWindow *window)
{
if (window->details->viewed_file != NULL) {
- gtk_signal_disconnect_by_func (GTK_OBJECT (window->details->viewed_file),
- G_CALLBACK (viewed_file_changed_callback),
- window);
+ g_signal_handlers_disconnect_by_func (window->details->viewed_file,
+ G_CALLBACK (viewed_file_changed_callback),
+ window);
}
}
@@ -1976,12 +1976,8 @@
static void
connect_view (NautilusWindow *window, NautilusViewFrame *view)
{
- GtkObject *view_object;
-
- view_object = GTK_OBJECT (view);
-
- #define CONNECT(signal) gtk_signal_connect \
- (view_object, #signal, \
+ #define CONNECT(signal) g_signal_connect \
+ (view, #signal, \
G_CALLBACK (signal##_callback), window);
FOR_EACH_NAUTILUS_WINDOW_SIGNAL (CONNECT)
#undef CONNECT
@@ -1990,8 +1986,6 @@
static void
disconnect_view (NautilusWindow *window, NautilusViewFrame *view)
{
- GtkObject *view_object;
-
g_assert (NAUTILUS_IS_WINDOW (window));
if (view == NULL) {
@@ -1999,11 +1993,9 @@
}
g_assert (NAUTILUS_IS_VIEW_FRAME (view));
-
- view_object = GTK_OBJECT (view);
-#define DISCONNECT(signal) gtk_signal_disconnect_by_func \
- (view_object, \
+#define DISCONNECT(signal) g_signal_handlers_disconnect_by_func \
+ (view, \
G_CALLBACK (signal##_callback), window);
FOR_EACH_NAUTILUS_WINDOW_SIGNAL (DISCONNECT)
#undef DISCONNECT
Index: nautilus-window-menus.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window-menus.c,v
retrieving revision 1.222
diff -u -r1.222 nautilus-window-menus.c
--- nautilus-window-menus.c 2002/02/13 02:40:48 1.222
+++ nautilus-window-menus.c 2002/02/13 06:03:38
@@ -138,11 +138,11 @@
new_bookmark_holder->prompt_for_removal = is_bookmarks_menu;
new_bookmark_holder->changed_handler_id =
- gtk_signal_connect_object (GTK_OBJECT (bookmark), "appearance_changed",
- is_bookmarks_menu
- ? G_CALLBACK (schedule_refresh_bookmarks_menu)
- : G_CALLBACK (schedule_refresh_go_menu),
- GTK_OBJECT (window));
+ g_signal_connect_swapped (bookmark, "appearance_changed",
+ is_bookmarks_menu
+ ? G_CALLBACK (schedule_refresh_bookmarks_menu)
+ : G_CALLBACK (schedule_refresh_go_menu),
+ window);
return new_bookmark_holder;
}
@@ -150,8 +150,8 @@
static void
bookmark_holder_free (BookmarkHolder *bookmark_holder)
{
- gtk_signal_disconnect (GTK_OBJECT (bookmark_holder->bookmark),
- bookmark_holder->changed_handler_id);
+ g_signal_handler_disconnect (bookmark_holder->bookmark,
+ bookmark_holder->changed_handler_id);
g_object_unref (bookmark_holder->bookmark);
g_free (bookmark_holder);
}
@@ -818,12 +818,12 @@
/* see if there is a static bookmarks file in the updates directory and get its mod-date */
user_directory_path = nautilus_get_user_directory ();
update_xml_file_path = g_strdup_printf ("%s/updates/%s", user_directory_path, STATIC_BOOKMARKS_FILE_NAME);
- update_exists = g_file_exists (update_xml_file_path);
+ update_exists = g_file_test (update_xml_file_path, G_FILE_TEST_EXISTS);
g_free (user_directory_path);
/* get the mod date of the built-in static bookmarks file */
built_in_xml_file_path = nautilus_make_path (NAUTILUS_DATADIR, STATIC_BOOKMARKS_FILE_NAME);
- built_in_exists = g_file_exists (built_in_xml_file_path);
+ built_in_exists = g_file_test (built_in_xml_file_path, G_FILE_TEST_EXISTS);
/* if we only have one file, return its path as the one to use */
if (built_in_exists && !update_exists) {
Index: nautilus-window-toolbars.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window-toolbars.c,v
retrieving revision 1.91
diff -u -r1.91 nautilus-window-toolbars.c
--- nautilus-window-toolbars.c 2002/01/24 21:52:34 1.91
+++ nautilus-window-toolbars.c 2002/02/13 06:03:38
@@ -70,7 +70,7 @@
g_assert (GTK_IS_MENU_ITEM (menu_item));
g_assert (NAUTILUS_IS_WINDOW (window));
- index = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (menu_item)));
+ index = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), "user_data"));
nautilus_window_back_or_forward (window, back, index);
}
@@ -103,17 +103,17 @@
while (list_link != NULL)
{
menu_item = nautilus_bookmark_menu_item_new (NAUTILUS_BOOKMARK (list_link->data));
- gtk_object_set_user_data (GTK_OBJECT (menu_item), GINT_TO_POINTER (index));
+ g_object_set_data (G_OBJECT (menu_item), "user_data", GINT_TO_POINTER (index));
gtk_widget_show (GTK_WIDGET (menu_item));
- gtk_signal_connect
- (GTK_OBJECT(menu_item),
+ g_signal_connect
+ (menu_item,
"activate",
back
? G_CALLBACK (activate_back_menu_item_callback)
: G_CALLBACK (activate_forward_menu_item_callback),
window);
- gtk_menu_append (menu, menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
list_link = g_list_next (list_link);
++index;
}
Index: nautilus-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window.c,v
retrieving revision 1.364
diff -u -r1.364 nautilus-window.c
--- nautilus-window.c 2002/02/11 11:16:02 1.364
+++ nautilus-window.c 2002/02/13 06:03:38
@@ -120,12 +120,16 @@
static void nautilus_window_class_init (NautilusWindowClass *klass);
static void nautilus_window_init (NautilusWindow *window);
static void nautilus_window_destroy (GtkObject *object);
-static void nautilus_window_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void nautilus_window_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
+static void nautilus_window_set_property (GObject *object,
+ guint arg_id,
+ const GValue *value,
+ GParamSpec *pspec);
+
+static void nautilus_window_get_property (GObject *object,
+ guint arg_id,
+ GValue *value,
+ GParamSpec *pspec);
+
static void nautilus_window_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void nautilus_window_realize (GtkWidget *widget);
@@ -143,38 +147,47 @@
static void
unref_mini_icon (void)
{
- gdk_pixmap_unref (mini_icon_pixmap);
+ g_object_unref (mini_icon_pixmap);
if (mini_icon_mask != NULL) {
- gdk_bitmap_unref (mini_icon_mask);
+ g_object_unref (mini_icon_mask);
}
}
static void
nautilus_window_class_init (NautilusWindowClass *klass)
{
+ GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
char *filename;
GdkPixbuf *pixbuf;
+ gobject_class = (GObjectClass *) klass;
object_class = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
object_class->destroy = nautilus_window_destroy;
- object_class->get_arg = nautilus_window_get_arg;
- object_class->set_arg = nautilus_window_set_arg;
+ gobject_class->get_property = nautilus_window_get_property;
+ gobject_class->set_property = nautilus_window_set_property;
widget_class->show = nautilus_window_show;
widget_class->unrealize = nautilus_window_unrealize;
- gtk_object_add_arg_type ("NautilusWindow::app_id",
- G_TYPE_STRING,
- GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT,
- ARG_APP_ID);
- gtk_object_add_arg_type ("NautilusWindow::app",
- G_TYPE_OBJECT,
- GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT,
- ARG_APP);
+ g_object_class_install_property (gobject_class,
+ ARG_APP_ID,
+ g_param_spec_string ("app_id",
+ _("Application ID"),
+ _("The application ID of the window."),
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property (gobject_class,
+ ARG_APP,
+ g_param_spec_object ("app",
+ _("Application"),
+ _("The NautilusApplication associated with this window."),
+ NAUTILUS_TYPE_APPLICATION,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
widget_class->realize = nautilus_window_realize;
widget_class->size_request = nautilus_window_size_request;
@@ -266,7 +279,7 @@
ui_install_idle_handler (NautilusWindow *window)
{
if (window->details->ui_idle_id == 0) {
- window->details->ui_idle_id = gtk_idle_add_priority (GTK_PRIORITY_LOW, ui_idle_handler, window);
+ window->details->ui_idle_id = g_idle_add_full (G_PRIORITY_LOW, ui_idle_handler, window, NULL);
}
}
@@ -274,7 +287,7 @@
ui_remove_idle_handler (NautilusWindow *window)
{
if (window->details->ui_idle_id != 0) {
- gtk_idle_remove (window->details->ui_idle_id);
+ g_source_remove (window->details->ui_idle_id);
window->details->ui_idle_id = 0;
}
}
@@ -587,7 +600,7 @@
new_menu = gtk_menu_new ();
menu_item = gtk_menu_item_new_with_label (_("View as..."));
gtk_widget_show (menu_item);
- gtk_menu_append (GTK_MENU (new_menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (new_menu), menu_item);
gtk_option_menu_set_menu (GTK_OPTION_MENU (window->view_as_option_menu),
new_menu);
@@ -659,14 +672,14 @@
* It gets shown later, if the view-frame contains something zoomable.
*/
window->zoom_control = nautilus_zoom_control_new ();
- gtk_signal_connect_object (GTK_OBJECT (window->zoom_control), "zoom_in",
- G_CALLBACK (nautilus_window_zoom_in), GTK_OBJECT (window));
- gtk_signal_connect_object (GTK_OBJECT (window->zoom_control), "zoom_out",
- G_CALLBACK (nautilus_window_zoom_out), GTK_OBJECT (window));
- gtk_signal_connect_object (GTK_OBJECT (window->zoom_control), "zoom_to_level",
- G_CALLBACK (nautilus_window_zoom_to_level), GTK_OBJECT (window));
- gtk_signal_connect_object (GTK_OBJECT (window->zoom_control), "zoom_to_fit",
- G_CALLBACK (nautilus_window_zoom_to_fit), GTK_OBJECT (window));
+ g_signal_connect_swapped (window->zoom_control, "zoom_in",
+ G_CALLBACK (nautilus_window_zoom_in), window);
+ g_signal_connect_swapped (window->zoom_control, "zoom_out",
+ G_CALLBACK (nautilus_window_zoom_out), window);
+ g_signal_connect_swapped (window->zoom_control, "zoom_to_level",
+ G_CALLBACK (nautilus_window_zoom_to_level), window);
+ g_signal_connect_swapped (window->zoom_control, "zoom_to_fit",
+ G_CALLBACK (nautilus_window_zoom_to_fit), window);
gtk_box_pack_end (GTK_BOX (location_bar_box), window->zoom_control, FALSE, FALSE, 0);
gtk_widget_show (location_bar_box);
@@ -773,9 +786,10 @@
}
static void
-nautilus_window_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
+nautilus_window_set_property (GObject *object,
+ guint arg_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
char *old_name;
NautilusWindow *window;
@@ -784,11 +798,11 @@
switch (arg_id) {
case ARG_APP_ID:
- if (GTK_VALUE_STRING (*arg) == NULL) {
+ if (g_value_get_string (value) == NULL) {
return;
}
old_name = bonobo_window_get_name (BONOBO_WINDOW (window));
- bonobo_window_set_name (BONOBO_WINDOW (window), GTK_VALUE_STRING (*arg));
+ bonobo_window_set_name (BONOBO_WINDOW (window), g_value_get_string (value));
/* This hack of using the time when the name first
* goes non-NULL to be window-constructed time is
* completely lame. But it works, so for now we leave
@@ -800,22 +814,25 @@
g_free (old_name);
break;
case ARG_APP:
- window->application = NAUTILUS_APPLICATION (GTK_VALUE_OBJECT (*arg));
+ window->application = NAUTILUS_APPLICATION (g_value_get_object (value));
break;
}
}
static void
-nautilus_window_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id)
+nautilus_window_get_property (GObject *object,
+ guint arg_id,
+ GValue *value,
+ GParamSpec *pspec)
{
switch (arg_id) {
case ARG_APP_ID:
- GTK_VALUE_STRING (*arg) = bonobo_window_get_name (BONOBO_WINDOW (object));
+ g_value_set_string_take_ownership (
+ value,
+ bonobo_window_get_name (BONOBO_WINDOW (object)));
break;
case ARG_APP:
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT (NAUTILUS_WINDOW (object)->application);
+ g_value_set_object (value, NAUTILUS_WINDOW (object)->application);
break;
}
}
@@ -981,7 +998,7 @@
/* Set a property on the root window to the time of day in seconds.
* The launcher will monitor the root window for this property change
* to update its launching state */
- gdk_property_change (GDK_ROOT_PARENT (),
+ gdk_property_change (gdk_get_default_root_window (),
gdk_atom_intern ("_NAUTILUS_LAST_WINDOW_REALIZE_TIME", FALSE),
gdk_x11_xatom_to_atom (XA_CARDINAL),
32,
@@ -993,7 +1010,9 @@
static void
nautilus_window_realize (GtkWidget *widget)
{
+#ifdef GNOME2_CONVERSION_COMPLETE
char *filename;
+#endif
/* Create our GdkWindow */
EEL_CALL_PARENT (GTK_WIDGET_CLASS, realize, (widget));
@@ -1003,6 +1022,7 @@
eel_set_mini_icon (widget->window, mini_icon_pixmap, mini_icon_mask);
}
+#ifdef GNOME2_CONVERSION_COMPLETE
/* Set the maxi icon */
filename = gnome_pixmap_file ("nautilus-launch-icon.png");
if (filename != NULL) {
@@ -1010,6 +1030,7 @@
filename);
g_free (filename);
}
+#endif
/* Notify the launcher that our window has been realized */
nautilus_window_update_launcher (widget->window);
@@ -1245,7 +1266,7 @@
}
} else {
if (id != NULL) {
- gtk_menu_prepend (GTK_MENU (menu), new_gtk_separator ());
+ gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), new_gtk_separator ());
}
}
@@ -1253,7 +1274,7 @@
if (id != NULL) {
new_menu_item = create_view_as_menu_item (window, window->details->extra_viewer, 0);
g_object_set_data (G_OBJECT (new_menu_item), "extra viewer", GINT_TO_POINTER (TRUE));
- gtk_menu_prepend (GTK_MENU (menu), new_menu_item);
+ gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), new_menu_item);
}
gtk_option_menu_set_menu (GTK_OPTION_MENU (window->view_as_option_menu), menu);
@@ -1459,7 +1480,7 @@
* historical and technical reasons.
*/
menu_item = create_view_as_menu_item (window, node->data, index);
- gtk_menu_append (GTK_MENU (new_menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (new_menu), menu_item);
/* Menu item in View menu. */
add_view_as_bonobo_menu_item (window,
@@ -1470,7 +1491,7 @@
/* Add/Show separator before "View as..." if there are any other viewers in menu. */
if (window->details->short_list_viewers != NULL) {
- gtk_menu_append (GTK_MENU (new_menu), new_gtk_separator ());
+ gtk_menu_shell_append (GTK_MENU_SHELL (new_menu), new_gtk_separator ());
}
nautilus_bonobo_set_hidden (window->details->shell_ui,
NAUTILUS_MENU_PATH_AFTER_SHORT_LIST_SEPARATOR,
@@ -1483,7 +1504,7 @@
G_CALLBACK (view_as_menu_choose_view_callback),
window);
gtk_widget_show (menu_item);
- gtk_menu_append (GTK_MENU (new_menu), menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (new_menu), menu_item);
/* We create and attach a new menu here because adding/removing
* items from existing menu screws up the size of the option menu.
Index: nautilus-zoom-control.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-zoom-control.c,v
retrieving revision 1.62
diff -u -r1.62 nautilus-zoom-control.c
--- nautilus-zoom-control.c 2002/01/08 22:37:56 1.62
+++ nautilus-zoom-control.c 2002/02/13 06:03:38
@@ -30,6 +30,7 @@
#include <math.h>
+#include <string.h>
#include <gnome.h>
#include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
@@ -161,7 +162,7 @@
nautilus_zoom_control_load_images (zoom_control);
zoom_width = get_zoom_width (zoom_control);
- gtk_widget_set_usize (GTK_WIDGET (zoom_control), zoom_width, -1);
+ gtk_widget_set_size_request (GTK_WIDGET (zoom_control), zoom_width, -1);
/* add a callback for when the theme changes */
eel_preferences_add_callback (NAUTILUS_PREFERENCES_THEME,
@@ -261,16 +262,18 @@
x += char_width;
}
- } else {
+ } else {
+#ifdef GNOME2_CONVERSION_COMPLETE
x = num_h_offset + ((widget->allocation.width - gdk_string_width(zoom_control->details->label_font, buffer)) >> 1);
gdk_draw_string (widget->window, zoom_control->details->label_font, temp_gc, x, y, &buffer[0]);
+#endif
}
if (number_pixbuf != zoom_control->details->number_strip) {
g_object_unref (number_pixbuf);
}
- gdk_gc_unref(temp_gc);
+ g_object_unref(temp_gc);
}
/* utilities to simplify drawing */
@@ -407,8 +410,10 @@
}
if (zoom_control->details->label_font != NULL) {
+#ifdef GNOME2_CONVERSION_COMPLETE
gdk_font_unref(zoom_control->details->label_font);
zoom_control->details->label_font = NULL;
+#endif
}
}
@@ -445,10 +450,12 @@
zoom_control->details->number_strip = load_themed_image ("number_strip.png");
if (zoom_control->details->number_strip == NULL) {
+#ifdef GNOME2_CONVERSION_COMPLETE
/* Note to localizers: this font is used for the number in the
* zoom control widget.
*/
zoom_control->details->label_font = gdk_fontset_load (_("-bitstream-courier-medium-r-normal-*-9-*-*-*-*-*-*-*"));
+#endif
}
nautilus_zoom_control_update_offsets (zoom_control);
@@ -513,13 +520,12 @@
radio_item_group = previous_radio_item == NULL
? NULL
- : gtk_radio_menu_item_group (previous_radio_item);
+ : gtk_radio_menu_item_get_group (previous_radio_item);
menu_item = gtk_radio_menu_item_new_with_label (radio_item_group, item_text);
zoom_level_ptr = g_new (double, 1);
*zoom_level_ptr = zoom_level;
- gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item),
zoom_level == zoom_control->details->zoom_level);
@@ -529,7 +535,7 @@
zoom_control);
gtk_widget_show (menu_item);
- gtk_menu_append (menu, menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
zoom_control->details->marking_menu_items = FALSE;
@@ -746,7 +752,7 @@
G_STRUCT_OFFSET (NautilusZoomControlClass,
zoom_in),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[ZOOM_OUT] =
@@ -756,7 +762,7 @@
G_STRUCT_OFFSET (NautilusZoomControlClass,
zoom_out),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[ZOOM_TO_LEVEL] =
@@ -778,6 +784,6 @@
G_STRUCT_OFFSET (NautilusZoomControlClass,
zoom_to_fit),
NULL, NULL,
- gtk_marshal_VOID__VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
Index: file-manager/Makefile.am
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/Makefile.am,v
retrieving revision 1.66
diff -u -r1.66 Makefile.am
--- file-manager/Makefile.am 2002/01/17 20:57:50 1.66
+++ file-manager/Makefile.am 2002/02/13 06:03:38
@@ -8,6 +8,11 @@
-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)
Index: file-manager/fm-desktop-icon-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-desktop-icon-view.c,v
retrieving revision 1.158
diff -u -r1.158 fm-desktop-icon-view.c
--- file-manager/fm-desktop-icon-view.c 2002/02/07 00:24:43 1.158
+++ file-manager/fm-desktop-icon-view.c 2002/02/13 06:03:38
@@ -226,7 +226,7 @@
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 @@
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);
}
Index: file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.503
diff -u -r1.503 fm-directory-view.c
--- file-manager/fm-directory-view.c 2002/02/13 02:40:49 1.503
+++ file-manager/fm-directory-view.c 2002/02/13 06:03:39
@@ -1211,21 +1211,19 @@
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 @@
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 @@
* 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 @@
* 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 @@
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 @@
* 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 @@
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 @@
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 @@
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;
Index: file-manager/fm-icon-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-icon-view.c,v
retrieving revision 1.241
diff -u -r1.241 fm-icon-view.c
--- file-manager/fm-icon-view.c 2002/02/13 00:27:41 1.241
+++ file-manager/fm-icon-view.c 2002/02/13 06:03:39
@@ -2508,14 +2508,10 @@
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));
Index: file-manager/fm-properties-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-properties-window.c,v
retrieving revision 1.144
diff -u -r1.144 fm-properties-window.c
--- file-manager/fm-properties-window.c 2002/01/28 21:38:37 1.144
+++ file-manager/fm-properties-window.c 2002/02/13 06:03:39
@@ -352,8 +352,8 @@
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 @@
(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 @@
}
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
}
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
/* 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 @@
(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 @@
}
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;
Index: file-manager/fm-search-list-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-search-list-view.c,v
retrieving revision 1.93
diff -u -r1.93 fm-search-list-view.c
--- file-manager/fm-search-list-view.c 2002/02/01 05:46:19 1.93
+++ file-manager/fm-search-list-view.c 2002/02/13 06:03:39
@@ -632,10 +632,10 @@
* 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 @@
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));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]