Commit e8625063 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson
Browse files

Update the per-screen filtering when the view changes screens. This was

2003-05-23  Alexander Larsson  <alexl@redhat.com>

	* src/file-manager/fm-icon-view.c (fm_icon_view_screen_changed):
	Update the per-screen filtering when the view changes screens.
	This was needed to fix multihead desktops, since the BonoboPlug
	initially realizes on the wrong screen, and gets moved to the right
	screen when the window is mapped.
parent fca34f45
2003-05-23 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-icon-view.c (fm_icon_view_screen_changed):
Update the per-screen filtering when the view changes screens.
This was needed to fix multihead desktops, since the BonoboPlug
initially realizes on the wrong screen, and gets moved to the right
screen when the window is mapped.
2003-05-20 Dave Camp <dave@ximian.com>
 
* src/file-manager/fm-list-model.c: (each_path_get_data_binder):
......
......@@ -1937,6 +1937,44 @@ fm_icon_view_filter_by_screen (FMIconView *icon_view,
icon_view->details->num_screens = gdk_display_get_n_screens (gtk_widget_get_display (GTK_WIDGET (icon_view)));
}
static void
fm_icon_view_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen)
{
FMDirectoryView *view;
GList *files, *l;
NautilusFile *file;
NautilusIconContainer *icon_container;
if (GTK_WIDGET_CLASS (parent_class)->screen_changed) {
GTK_WIDGET_CLASS (parent_class)->screen_changed (widget, previous_screen);
}
view = FM_DIRECTORY_VIEW (widget);
if (FM_ICON_VIEW (view)->details->filter_by_screen) {
icon_container = get_icon_container (FM_ICON_VIEW (view));
files = nautilus_directory_get_file_list (fm_directory_view_get_model (view));
for (l = files; l != NULL; l = l->next) {
file = l->data;
if (!should_show_file_on_screen (view, file)) {
fm_icon_view_remove_file (view, file);
} else {
if (nautilus_icon_container_add (icon_container,
NAUTILUS_ICON_CONTAINER_ICON_DATA (file))) {
nautilus_file_ref (file);
}
}
}
nautilus_file_list_unref (files);
g_list_free (files);
}
}
static int
compare_files_cover (gconstpointer a, gconstpointer b, gpointer callback_data)
{
......@@ -2590,6 +2628,8 @@ fm_icon_view_class_init (FMIconViewClass *klass)
G_OBJECT_CLASS (klass)->finalize = fm_icon_view_finalize;
GTK_WIDGET_CLASS (klass)->screen_changed = fm_icon_view_screen_changed;
fm_directory_view_class->add_file = fm_icon_view_add_file;
fm_directory_view_class->flush_added_files = fm_icon_view_flush_added_files;
fm_directory_view_class->begin_loading = fm_icon_view_begin_loading;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment