Commit 4a225507 authored by Darin Adler's avatar Darin Adler
Browse files

Lots of files. Get rid a lot of unneeded casts.

	* Lots of files.
	Get rid a lot of unneeded casts.
parent ee16c763
......@@ -1326,7 +1326,7 @@ fm_icon_view_merge_menus (FMDirectoryView *view)
icon_view = FM_ICON_VIEW (view);
icon_view->details->ui = bonobo_ui_component_new ("Icon View");
g_signal_connect (G_OBJECT (icon_view->details->ui),
g_signal_connect (icon_view->details->ui,
"ui_event", G_CALLBACK (handle_ui_event), icon_view);
bonobo_ui_component_set_container (icon_view->details->ui,
fm_directory_view_get_bonobo_ui_container (view),
......@@ -2435,87 +2435,87 @@ create_icon_container (FMIconView *icon_view)
GTK_WIDGET_SET_FLAGS (icon_container, GTK_CAN_FOCUS);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"activate",
G_CALLBACK (icon_container_activate_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"band_select_started",
G_CALLBACK (band_select_started_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"band_select_ended",
G_CALLBACK (band_select_ended_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"compare_icons",
G_CALLBACK (icon_container_compare_icons_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"compare_icons_by_name",
G_CALLBACK (icon_container_compare_icons_by_name_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"context_click_selection",
G_CALLBACK (icon_container_context_click_selection_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"context_click_background",
G_CALLBACK (icon_container_context_click_background_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"icon_position_changed",
G_CALLBACK (icon_position_changed_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"icon_text_changed",
G_CALLBACK (fm_icon_view_icon_text_changed_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"selection_changed",
G_CALLBACK (selection_changed_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"get_icon_images",
G_CALLBACK (get_icon_images_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"get_icon_uri",
G_CALLBACK (get_icon_uri_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"get_icon_drop_target_uri",
G_CALLBACK (get_icon_drop_target_uri_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"get_icon_text",
G_CALLBACK (get_icon_text_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"move_copy_items",
G_CALLBACK (icon_view_move_copy_items),
directory_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"get_container_uri",
G_CALLBACK (icon_view_get_container_uri),
directory_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"can_accept_item",
G_CALLBACK (icon_view_can_accept_item),
directory_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"get_stored_icon_position",
G_CALLBACK (get_stored_icon_position_callback),
directory_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"layout_changed",
G_CALLBACK (layout_changed_callback),
directory_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"preview",
G_CALLBACK (icon_container_preview_callback),
icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"renaming_icon",
G_CALLBACK (renaming_icon_callback),
directory_view);
......@@ -2800,7 +2800,7 @@ fm_icon_view_init (FMIconView *icon_view)
G_OBJECT (icon_view));
icon_container = get_icon_container (icon_view);
g_signal_connect (G_OBJECT (icon_container),
g_signal_connect (icon_container,
"handle_uri_list",
G_CALLBACK (icon_view_handle_uri_list),
icon_view);
......
......@@ -1146,63 +1146,63 @@ set_up_list (FMListView *list_view)
GTK_WIDGET_SET_FLAGS (list, GTK_CAN_FOCUS);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"activate",
G_CALLBACK (list_activate_callback),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"selection_changed",
G_CALLBACK (list_selection_changed_callback),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"click_column",
G_CALLBACK (column_clicked_callback),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"context_click_selection",
G_CALLBACK (context_click_selection_callback),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"context_click_background",
G_CALLBACK (context_click_background_callback),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"select_matching_name",
G_CALLBACK (select_matching_name_callback),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"select_previous_name",
G_CALLBACK (select_previous_name_callback),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"select_next_name",
G_CALLBACK (select_next_name_callback),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"handle_dragged_items",
G_CALLBACK (fm_list_handle_dragged_items),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"handle_dropped_items",
G_CALLBACK (fm_list_handle_dropped_items),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"get_default_action",
G_CALLBACK (fm_list_get_default_action),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"drag_data_get",
G_CALLBACK (fm_list_drag_data_get),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"get_drag_pixbuf",
G_CALLBACK (fm_list_get_drag_pixbuf),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"get_sort_column_index",
G_CALLBACK (fm_list_get_sort_column_index),
list_view);
g_signal_connect (G_OBJECT (list),
g_signal_connect (list,
"get_cell_text",
G_CALLBACK (get_cell_text),
list_view);
......@@ -1213,7 +1213,7 @@ set_up_list (FMListView *list_view)
* the "realize" signal is slightly too early, so we connect to
* "map".
*/
g_signal_connect (G_OBJECT (list_view),
g_signal_connect (list_view,
"map",
G_CALLBACK (fm_list_view_reset_row_height),
NULL);
......
......@@ -1591,11 +1591,11 @@ create_basic_page (FMPropertiesWindow *window)
nautilus_undo_editable_set_undo_key (GTK_EDITABLE (name_field), TRUE);
#endif
g_signal_connect (G_OBJECT (name_field), "focus_out_event",
g_signal_connect (name_field, "focus_out_event",
G_CALLBACK (name_field_focus_out),
window);
g_signal_connect (G_OBJECT (name_field), "activate",
g_signal_connect (name_field, "activate",
G_CALLBACK (name_field_activate),
window);
......@@ -1652,7 +1652,7 @@ create_basic_page (FMPropertiesWindow *window)
gtk_widget_show (temp_button);
gtk_box_pack_start (GTK_BOX(button_box), temp_button, FALSE, FALSE, 4);
g_signal_connect (G_OBJECT (temp_button), "clicked", G_CALLBACK (remove_image_button_callback), window);
g_signal_connect (temp_button, "clicked", G_CALLBACK (remove_image_button_callback), window);
window->details->remove_image_button = temp_button;
......@@ -1704,10 +1704,10 @@ create_emblems_page (FMPropertiesWindow *window)
* This must be done after the widget is realized, due to
* an apparent bug in gtk_viewport_set_shadow_type.
*/
g_signal_connect (G_OBJECT (GTK_BIN (scroller)->child),
"realize",
G_CALLBACK (remove_default_viewport_shadow),
NULL);
g_signal_connect (GTK_BIN (scroller)->child,
"realize",
G_CALLBACK (remove_default_viewport_shadow),
NULL);
gtk_notebook_append_page (window->details->notebook,
scroller, gtk_label_new (_("Emblems")));
......@@ -1754,7 +1754,7 @@ create_emblems_page (FMPropertiesWindow *window)
file,
(GtkDestroyNotify) nautilus_file_unref);
g_signal_connect (G_OBJECT (button),
g_signal_connect (button,
"toggled",
G_CALLBACK (property_button_toggled),
NULL);
......@@ -1877,7 +1877,7 @@ set_up_permissions_checkbox (GtkWidget *check_button,
{
guint toggled_signal_id;
toggled_signal_id = g_signal_connect (G_OBJECT (check_button), "toggled",
toggled_signal_id = g_signal_connect (check_button, "toggled",
G_CALLBACK (permissions_check_button_toggled),
file);
......@@ -2417,7 +2417,7 @@ fm_properties_window_present (NautilusFile *original_file, FMDirectoryView *dire
*/
g_hash_table_insert (pending_files, target_file, target_file);
g_signal_connect (G_OBJECT (directory_view),
g_signal_connect (directory_view,
"destroy",
G_CALLBACK (directory_view_destroyed_callback),
startup_data);
......
......@@ -387,7 +387,7 @@ fm_search_list_view_init (gpointer object,
nautilus_view = fm_directory_view_get_nautilus_view (directory_view);
g_signal_connect (G_OBJECT (nautilus_view),
g_signal_connect (nautilus_view,
"load_location",
G_CALLBACK (load_location_callback),
NULL);
......
......@@ -230,7 +230,7 @@ index_progress_dialog_new (void)
NULL,
progress_data,
g_free);
g_signal_connect (G_OBJECT (progress_bar_hbox),
g_signal_connect (progress_bar_hbox,
"destroy",
timeout_remove_callback,
GUINT_TO_POINTER (timeout_id));
......
......@@ -161,7 +161,7 @@ nautilus_about_init (NautilusAbout *about)
area_width, area_height);
gtk_widget_set_events (about->details->drawing_area, GDK_EXPOSURE_MASK);
g_signal_connect (G_OBJECT (about->details->drawing_area), "expose_event",
g_signal_connect (about->details->drawing_area, "expose_event",
G_CALLBACK (nautilus_about_repaint), about);
gtk_widget_show (about->details->drawing_area);
......
......@@ -146,13 +146,13 @@ nautilus_application_init (NautilusApplication *application)
application->undo_manager = nautilus_undo_manager_new ();
/* Watch for volume mounts so we can restore open windows */
g_signal_connect (G_OBJECT (nautilus_volume_monitor_get ()),
g_signal_connect (nautilus_volume_monitor_get (),
"volume_mounted",
G_CALLBACK (volume_mounted_callback),
application);
/* Watch for volume unmounts so we can close open windows */
g_signal_connect (G_OBJECT (nautilus_volume_monitor_get ()),
g_signal_connect (nautilus_volume_monitor_get (),
"volume_unmounted",
G_CALLBACK (volume_unmounted_callback),
application);
......@@ -664,11 +664,11 @@ nautilus_application_create_window (NautilusApplication *application)
"app", G_OBJECT (application),
"app_id", "nautilus", NULL));
g_signal_connect (G_OBJECT (window),
g_signal_connect (window,
"delete_event", G_CALLBACK (nautilus_window_delete_event_callback),
NULL);
g_signal_connect (G_OBJECT (window),
g_signal_connect (window,
"destroy", G_CALLBACK (nautilus_application_destroyed_window),
application);
......@@ -899,11 +899,11 @@ init_session (void)
client = gnome_master_client ();
g_signal_connect (G_OBJECT (client), "save_yourself",
g_signal_connect (client, "save_yourself",
(GtkSignalFunc) save_session,
NULL);
g_signal_connect (G_OBJECT (client), "die",
g_signal_connect (client, "die",
(GtkSignalFunc) removed_from_session,
NULL);
......
......@@ -192,12 +192,12 @@ insert_bookmark_internal (NautilusBookmarkList *bookmarks,
bookmark,
index);
g_signal_connect (G_OBJECT (bookmark),
g_signal_connect (bookmark,
"appearance_changed",
G_CALLBACK (bookmark_in_list_changed_callback),
bookmarks);
g_signal_connect (G_OBJECT (bookmark),
g_signal_connect (bookmark,
"contents_changed",
G_CALLBACK (bookmark_in_list_changed_callback),
bookmarks);
......@@ -258,7 +258,7 @@ nautilus_bookmark_list_contents_changed (NautilusBookmarkList *bookmarks)
g_return_if_fail (NAUTILUS_IS_BOOKMARK_LIST (bookmarks));
nautilus_bookmark_list_save_file (bookmarks);
g_signal_emit (G_OBJECT (bookmarks),
g_signal_emit (bookmarks,
signals[CONTENTS_CHANGED], 0);
}
......
......@@ -206,45 +206,45 @@ create_bookmarks_window (NautilusBookmarkList *list, GObject *undo_manager_sourc
G_CALLBACK(on_select_row),
NULL);
g_signal_connect (G_OBJECT (window), "delete_event",
g_signal_connect (window, "delete_event",
G_CALLBACK (on_window_delete_event),
NULL);
g_signal_connect (G_OBJECT (window), "hide",
g_signal_connect (window, "hide",
G_CALLBACK (on_window_hide_event),
NULL);
g_signal_connect (G_OBJECT (window), "destroy",
g_signal_connect (window, "destroy",
G_CALLBACK (on_window_destroy_event),
NULL);
name_field_changed_signalID =
g_signal_connect (G_OBJECT (name_field), "changed",
g_signal_connect (name_field, "changed",
G_CALLBACK (on_name_field_changed),
NULL);
g_signal_connect (G_OBJECT (name_field), "focus_out_event",
g_signal_connect (name_field, "focus_out_event",
G_CALLBACK (on_text_field_focus_out_event),
NULL);
g_signal_connect (G_OBJECT (name_field), "activate",
g_signal_connect (name_field, "activate",
G_CALLBACK (name_or_uri_field_activate),
NULL);
uri_field_changed_signalID =
g_signal_connect (G_OBJECT (uri_field), "changed",
g_signal_connect (uri_field, "changed",
G_CALLBACK (on_uri_field_changed),
NULL);
g_signal_connect (G_OBJECT (uri_field), "focus_out_event",
g_signal_connect (uri_field, "focus_out_event",
G_CALLBACK (on_text_field_focus_out_event),
NULL);
g_signal_connect (G_OBJECT (uri_field), "activate",
g_signal_connect (uri_field, "activate",
G_CALLBACK (name_or_uri_field_activate),
NULL);
g_signal_connect (G_OBJECT (remove_button), "clicked",
g_signal_connect (remove_button, "clicked",
G_CALLBACK (on_remove_button_clicked),
NULL);
......@@ -666,7 +666,7 @@ set_up_close_accelerator (GtkWidget *window)
* here because we have to handle saving geometry before hiding the
* window.
*/
g_signal_connect (G_OBJECT (window),
g_signal_connect (window,
"key_press_event",
G_CALLBACK (handle_close_accelerator),
NULL);
......
......@@ -103,7 +103,7 @@ search_bar_criterion_type_changed_callback (GObject *old_criterion_object,
new_type = GPOINTER_TO_INT (g_object_get_data (old_criterion_object, "type"));
new_criterion = nautilus_search_bar_criterion_new_with_type (new_type,
bar);
g_signal_connect (G_OBJECT (new_criterion),
g_signal_connect (new_criterion,
"criterion_type_changed",
G_CALLBACK (search_bar_criterion_type_changed_callback),
bar);
......@@ -178,7 +178,7 @@ nautilus_complex_search_bar_init (NautilusComplexSearchBar *bar)
file_name_criterion = nautilus_search_bar_criterion_first_new (bar);
g_signal_connect (G_OBJECT (file_name_criterion),
g_signal_connect (file_name_criterion,
"criterion_type_changed",
G_CALLBACK (search_bar_criterion_type_changed_callback),
bar);
......@@ -197,13 +197,13 @@ nautilus_complex_search_bar_init (NautilusComplexSearchBar *bar)
hbox = gtk_hwrap_box_new (FALSE);
g_signal_connect (G_OBJECT (hbox),
g_signal_connect (hbox,
"need_reallocation",
G_CALLBACK (queue_search_bar_resize_callback),
bar);
bar->details->more_options = gtk_button_new_with_label (_("More Options"));
g_signal_connect (G_OBJECT (bar->details->more_options), "clicked",
g_signal_connect (bar->details->more_options, "clicked",
G_CALLBACK (more_options_callback), bar);
......@@ -213,7 +213,7 @@ nautilus_complex_search_bar_init (NautilusComplexSearchBar *bar)
gtk_widget_show (bar->details->more_options);
bar->details->fewer_options = gtk_button_new_with_label (_("Fewer Options"));
g_signal_connect (G_OBJECT (bar->details->fewer_options), "clicked",
g_signal_connect (bar->details->fewer_options, "clicked",
G_CALLBACK (fewer_options_callback), bar);
gtk_wrap_box_pack (GTK_WRAP_BOX (hbox),
......@@ -502,7 +502,7 @@ more_options_callback (GtkObject *object,
last_criterion = (NautilusSearchBarCriterion *)((g_slist_last (list))->data);
criterion = nautilus_search_bar_criterion_next_new (last_criterion->details->type,
bar);
g_signal_connect (G_OBJECT (criterion),
g_signal_connect (criterion,
"criterion_type_changed",
G_CALLBACK (search_bar_criterion_type_changed_callback),
bar);
......
......@@ -134,8 +134,8 @@ nautilus_desktop_window_new (NautilusApplication *application)
/* Special sawmill setting*/
gtk_window_set_wmclass (GTK_WINDOW (window), "desktop_window", "Nautilus");
g_signal_connect (G_OBJECT (window), "realize", G_CALLBACK (nautilus_desktop_window_realized), NULL);
g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (nautilus_desktop_window_delete_event), NULL);
g_signal_connect (window, "realize", G_CALLBACK (nautilus_desktop_window_realized), NULL);
g_signal_connect (window, "delete_event", G_CALLBACK (nautilus_desktop_window_delete_event), NULL);
/* Point window at the desktop folder.
* Note that nautilus_desktop_window_init is too early to do this.
......
......@@ -545,7 +545,7 @@ nautilus_sidebar_create_context_menu (NautilusSidebar *sidebar)
gtk_widget_show (menu_item);
gtk_menu_append (GTK_MENU(menu), menu_item);
gtk_widget_set_sensitive (menu_item, has_background);
g_signal_connect (G_OBJECT (menu_item), "activate",
g_signal_connect (menu_item, "activate",
G_CALLBACK (reset_background_callback), sidebar);
/* add a separator */
......@@ -709,7 +709,7 @@ receive_dropped_uri_list (NautilusSidebar *sidebar,
(eel_get_widget_background (GTK_WIDGET (sidebar)),
uris[0]);
} else if (exactly_one) {
g_signal_emit (G_OBJECT (sidebar),
g_signal_emit (sidebar,
signals[LOCATION_CHANGED], 0,
uris[0]);
}
......@@ -915,7 +915,7 @@ nautilus_sidebar_add_panel (NautilusSidebar *sidebar, NautilusViewFrame *panel)
gtk_widget_show (label);
g_signal_connect (G_OBJECT (panel), "view_loaded",
g_signal_connect (panel, "view_loaded",
G_CALLBACK (view_loaded_callback), sidebar);
gtk_notebook_append_page (GTK_NOTEBOOK (sidebar->details->notebook),
......@@ -1375,7 +1375,7 @@ add_command_buttons (NautilusSidebar *sidebar, GList *application_list)
/* Catch-all button after all the others. */
temp_button = gtk_button_new_with_label (_("Open with..."));
g_signal_connect (G_OBJECT (temp_button), "clicked",
g_signal_connect (temp_button, "clicked",
G_CALLBACK (open_with_callback), NULL);
gtk_object_set_user_data (GTK_OBJECT (temp_button), sidebar);
gtk_widget_show (temp_button);
......@@ -1491,7 +1491,7 @@ nautilus_sidebar_update_buttons (NautilusSidebar *sidebar)
gtk_widget_show (temp_button);
sidebar->details->has_buttons = TRUE;
g_signal_connect (G_OBJECT (temp_button), "clicked",
g_signal_connect (temp_button, "clicked",
G_CALLBACK (empty_trash_callback), NULL);
gtk_signal_connect_while_alive (GTK_OBJECT (nautilus_trash_monitor_get ()),
......@@ -1536,11 +1536,11 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar)
background = eel_get_widget_background (GTK_WIDGET (sidebar));
if (!sidebar->details->background_connected) {
sidebar->details->background_connected = TRUE;
g_signal_connect (G_OBJECT (background),
g_signal_connect (background,
"settings_changed",
G_CALLBACK (background_settings_changed_callback),
sidebar);
g_signal_connect (G_OBJECT (background),
g_signal_connect (background,
"reset",
G_CALLBACK (background_reset_callback),
sidebar);
......
......@@ -643,7 +643,7 @@ nautilus_location_bar_init (NautilusLocationBar *bar)
gtk_container_add (GTK_CONTAINER (event_box), label);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
g_signal_connect (G_OBJECT (label), "style_set",
g_signal_connect (label, "style_set",
G_CALLBACK (style_set_handler), NULL);
gtk_box_pack_start (GTK_BOX (hbox), event_box, FALSE, TRUE,
......@@ -686,7 +686,7 @@ nautilus_location_bar_init (NautilusLocationBar *bar)
GTK_DEST_DEFAULT_ALL,
drop_types, G_N_ELEMENTS (drop_types),
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
g_signal_connect (G_OBJECT (bar), "drag_data_received",
g_signal_connect (bar, "drag_data_received",
G_CALLBACK (drag_data_received_callback),
NULL);
......
......@@ -98,7 +98,7 @@ nautilus_navigation_bar_activate (NautilusNavigationBar *bar)
{
g_return_if_fail (NAUTILUS_IS_NAVIGATION_BAR (bar));
g_signal_emit (G_OBJECT (bar), signals[ACTIVATE], 0);
g_signal_emit (bar, signals[ACTIVATE], 0);
}
/**
......@@ -145,7 +145,7 @@ nautilus_navigation_bar_location_changed (NautilusNavigationBar *bar)
g_return_if_fail (NAUTILUS_IS_NAVIGATION_BAR (bar));
location = nautilus_navigation_bar_get_location (bar);
g_signal_emit (G_OBJECT (bar),
g_signal_emit (bar,
signals[LOCATION_CHANGED], 0,
location);
g_free (location);
......