mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-27 11:29:24 +00:00
Add notes.
Add notes. Pass the content view along with a location-changed message.
This commit is contained in:
parent
1d23907d45
commit
685753b110
103
docs/gnomad-notes.txt
Normal file
103
docs/gnomad-notes.txt
Normal file
|
@ -0,0 +1,103 @@
|
|||
1. A definite improvement over the previous version I saw.
|
||||
2. Contains some interesting ideas:
|
||||
Features:
|
||||
> Multiple content views
|
||||
> Display of an XML file as a frame floating in the content view
|
||||
> Customizability
|
||||
I like the ability to drag colors from the color selector to a window.
|
||||
> Interface
|
||||
. Much attention paid to producing a user-friendly result here.
|
||||
. "Everything Windows explorer is and more"
|
||||
. Simplicity of available operations
|
||||
. Providing as much useful information as possible from a given screen, without
|
||||
overloading the user (e.g. thumbnails).
|
||||
. I like the (debated) user levels, but wish their differences were known.
|
||||
Design:
|
||||
Implementation:
|
||||
> Code is survivably good - not wonderful, but not procmail
|
||||
> Using XML allows easy integration of web data sources, etc.
|
||||
|
||||
3. Has some drawbacks:
|
||||
Features:
|
||||
> Interface
|
||||
. Value of the panel is questionable
|
||||
. Double-click vs. single click needs explanation/exploration
|
||||
. More information on what the new user
|
||||
. The "file operations" area of the interface is not explored very well and
|
||||
is very vague.
|
||||
Design:
|
||||
> Is basically a collection of intertwined widgets, rather than
|
||||
a data-oriented class hierarchy.
|
||||
> No abstraction of common patterns
|
||||
> Extensibility virtually non-existent
|
||||
> Generally poor.
|
||||
|
||||
Example - instead of instantiating the a certain class with a well-known
|
||||
interface when a particular view is requested, MultiView is used
|
||||
with a number of set_*_view() functions that are hardcoded to display
|
||||
certain views.
|
||||
Example - The iconview has special cases for the vault in its metadata-reading code.
|
||||
Example - There is only one application-level class that is ever derived from (IconView),
|
||||
out of the thirty or fourty such classes present.
|
||||
Implementation:
|
||||
> Performance is poor (possibly due to use of AA canvas)
|
||||
"It has to be faster if you are going to get people to use this"
|
||||
> Uses Gtk--
|
||||
. In constant flux
|
||||
. Relatively high resource demands
|
||||
> Somewhat buggy
|
||||
> Using XML - may not always be appropriate, has performance implications in the
|
||||
current usage situations, what about gnome_metadata.
|
||||
> Doesn't use gnome-vfs
|
||||
|
||||
4. My conclusions
|
||||
|
||||
gnomad is very focused on the user interface, and looks promising for producing a good
|
||||
user experience.
|
||||
|
||||
The patterns that pieces of gnomad fit would allow for easy integration into Nautilus.
|
||||
|
||||
I recommend that that an assessment be made of features still needed from Nautilus, and
|
||||
that we turn the various views of Gnomad into Bonobo controls for use in Nautilus.
|
||||
|
||||
|
||||
Appendix A: What Nautilus is
|
||||
|
||||
The generic pattern of content view/meta views/available operations occurs in a wide
|
||||
variety of situations. The Windows web-browser interface uses the basics of this, but
|
||||
does not exploit it to its full potential.
|
||||
|
||||
Nautilus is a data shell that uses Bonobo components to present the best possible user
|
||||
interface for a given piece of data. When navigation to a particular URL is requested by
|
||||
a view (either the main content view or one of the meta views), Nautilus determines what
|
||||
content view and meta views should be displayed, based on the requested URL, the
|
||||
referring URL, the content type of the requested URL, and application configuration.
|
||||
|
||||
This allows a standard yet appropriate interface to be provided for an infinite variety
|
||||
of data types.
|
||||
|
||||
http://people.redhat.com/sopwith/h3.gif contains a screenshot of the help browser
|
||||
prototype that produced the idea for Nautilus. This window follows the content
|
||||
view+meta views pattern that Nautilus supports.
|
||||
|
||||
Based on analysis of gnomad, features that Nautilus design still needs:
|
||||
More thorough examination of what data-related elements the user interface
|
||||
should incorporate (especially in the areas of toolbars/menus).
|
||||
|
||||
Ways of displaying meta views besides as tabs in a notebook.
|
||||
|
||||
Multiple content views.
|
||||
|
||||
Passing RDF-like tree from content to meta views, instead of just the URL.
|
||||
|
||||
Other features that I had been planning to add:
|
||||
Ability for displayed views to modify menus/toolbars
|
||||
(just need to make use of GnomeUIHandler, I think).
|
||||
|
||||
Finish implementation of the whole URL -> set of views code.
|
||||
|
||||
Finish implementation period. :)
|
||||
|
||||
Appendix B: Bugs
|
||||
|
||||
Remove semicolon from end of music_view.cpp:115 (still doesn't work, oh well).
|
|
@ -10,10 +10,14 @@ module Nautilus {
|
|||
struct NavigationInfo {
|
||||
string requested_uri, actual_uri, content_type;
|
||||
string referring_uri, actual_referring_uri, referring_content_type;
|
||||
|
||||
Object content_view;
|
||||
};
|
||||
|
||||
struct SelectionInfo {
|
||||
string selected_uri;
|
||||
|
||||
Object content_view;
|
||||
};
|
||||
|
||||
struct SelectionRequestInfo {
|
||||
|
|
|
@ -18,6 +18,9 @@ static void nautilus_window_close (GtkWidget *widget,
|
|||
static void nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
|
||||
#define CONTENTS_AS_HBOX
|
||||
/* six seconds */
|
||||
|
@ -84,6 +87,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
|
|||
klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
|
||||
|
||||
klass->request_location_change = nautilus_window_real_request_location_change;
|
||||
klass->request_selection_change = nautilus_window_real_request_selection_change;
|
||||
|
||||
i = 0;
|
||||
klass->window_signals[i++] = gtk_signal_new("request_location_change",
|
||||
|
@ -499,10 +503,21 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
signum = gtk_signal_lookup("notify_location_change", nautilus_view_get_type());
|
||||
|
||||
/* If we need to load a different IID, do that before sending the location change request */
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid))
|
||||
nautilus_view_load_client(NAUTILUS_VIEW(window->content_view), loci->content_iid);
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid)) {
|
||||
NautilusView *new_view;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci, window->content_view, requesting_view);
|
||||
if(requesting_view == window->content_view)
|
||||
requesting_view = NULL;
|
||||
|
||||
new_view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(new_view, loci->content_iid);
|
||||
nautilus_window_set_content_view(window, new_view);
|
||||
}
|
||||
|
||||
loci->navinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(requesting_view != window->content_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci);
|
||||
|
||||
notfound_views = keep_views = discard_views = NULL;
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
|
@ -510,9 +525,16 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
NautilusView *view = cur->data;
|
||||
|
||||
if(g_slist_find_custom(loci->meta_iids, view->iid, (GCompareFunc)strcmp))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view, requesting_view);
|
||||
{
|
||||
if(requesting_view != ((GtkWidget *)view))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci);
|
||||
}
|
||||
else
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
{
|
||||
if(((GtkWidget *)view) == requesting_view)
|
||||
requesting_view = NULL;
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
}
|
||||
}
|
||||
for(cur = loci->meta_iids; cur; cur = cur->next)
|
||||
{
|
||||
|
@ -528,6 +550,7 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(view, cur->data);
|
||||
nautilus_window_add_meta_view(window, view);
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view);
|
||||
}
|
||||
}
|
||||
for(cur = discard_views; cur; cur = cur->next)
|
||||
|
@ -544,6 +567,29 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
nautilus_navinfo_free(loci);
|
||||
}
|
||||
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view)
|
||||
{
|
||||
GSList *cur;
|
||||
guint signum;
|
||||
Nautilus_SelectionInfo selinfo;
|
||||
|
||||
signum = gtk_signal_lookup("notify_selection_change", nautilus_view_get_type());
|
||||
|
||||
selinfo.selected_uri = loc->selected_uri;
|
||||
selinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(((GtkWidget *)window->content_view) != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
{
|
||||
if(cur->data != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
|
|
|
@ -18,6 +18,9 @@ static void nautilus_window_close (GtkWidget *widget,
|
|||
static void nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
|
||||
#define CONTENTS_AS_HBOX
|
||||
/* six seconds */
|
||||
|
@ -84,6 +87,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
|
|||
klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
|
||||
|
||||
klass->request_location_change = nautilus_window_real_request_location_change;
|
||||
klass->request_selection_change = nautilus_window_real_request_selection_change;
|
||||
|
||||
i = 0;
|
||||
klass->window_signals[i++] = gtk_signal_new("request_location_change",
|
||||
|
@ -499,10 +503,21 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
signum = gtk_signal_lookup("notify_location_change", nautilus_view_get_type());
|
||||
|
||||
/* If we need to load a different IID, do that before sending the location change request */
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid))
|
||||
nautilus_view_load_client(NAUTILUS_VIEW(window->content_view), loci->content_iid);
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid)) {
|
||||
NautilusView *new_view;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci, window->content_view, requesting_view);
|
||||
if(requesting_view == window->content_view)
|
||||
requesting_view = NULL;
|
||||
|
||||
new_view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(new_view, loci->content_iid);
|
||||
nautilus_window_set_content_view(window, new_view);
|
||||
}
|
||||
|
||||
loci->navinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(requesting_view != window->content_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci);
|
||||
|
||||
notfound_views = keep_views = discard_views = NULL;
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
|
@ -510,9 +525,16 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
NautilusView *view = cur->data;
|
||||
|
||||
if(g_slist_find_custom(loci->meta_iids, view->iid, (GCompareFunc)strcmp))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view, requesting_view);
|
||||
{
|
||||
if(requesting_view != ((GtkWidget *)view))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci);
|
||||
}
|
||||
else
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
{
|
||||
if(((GtkWidget *)view) == requesting_view)
|
||||
requesting_view = NULL;
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
}
|
||||
}
|
||||
for(cur = loci->meta_iids; cur; cur = cur->next)
|
||||
{
|
||||
|
@ -528,6 +550,7 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(view, cur->data);
|
||||
nautilus_window_add_meta_view(window, view);
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view);
|
||||
}
|
||||
}
|
||||
for(cur = discard_views; cur; cur = cur->next)
|
||||
|
@ -544,6 +567,29 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
nautilus_navinfo_free(loci);
|
||||
}
|
||||
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view)
|
||||
{
|
||||
GSList *cur;
|
||||
guint signum;
|
||||
Nautilus_SelectionInfo selinfo;
|
||||
|
||||
signum = gtk_signal_lookup("notify_selection_change", nautilus_view_get_type());
|
||||
|
||||
selinfo.selected_uri = loc->selected_uri;
|
||||
selinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(((GtkWidget *)window->content_view) != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
{
|
||||
if(cur->data != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
|
|
|
@ -18,6 +18,9 @@ static void nautilus_window_close (GtkWidget *widget,
|
|||
static void nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
|
||||
#define CONTENTS_AS_HBOX
|
||||
/* six seconds */
|
||||
|
@ -84,6 +87,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
|
|||
klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
|
||||
|
||||
klass->request_location_change = nautilus_window_real_request_location_change;
|
||||
klass->request_selection_change = nautilus_window_real_request_selection_change;
|
||||
|
||||
i = 0;
|
||||
klass->window_signals[i++] = gtk_signal_new("request_location_change",
|
||||
|
@ -499,10 +503,21 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
signum = gtk_signal_lookup("notify_location_change", nautilus_view_get_type());
|
||||
|
||||
/* If we need to load a different IID, do that before sending the location change request */
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid))
|
||||
nautilus_view_load_client(NAUTILUS_VIEW(window->content_view), loci->content_iid);
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid)) {
|
||||
NautilusView *new_view;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci, window->content_view, requesting_view);
|
||||
if(requesting_view == window->content_view)
|
||||
requesting_view = NULL;
|
||||
|
||||
new_view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(new_view, loci->content_iid);
|
||||
nautilus_window_set_content_view(window, new_view);
|
||||
}
|
||||
|
||||
loci->navinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(requesting_view != window->content_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci);
|
||||
|
||||
notfound_views = keep_views = discard_views = NULL;
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
|
@ -510,9 +525,16 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
NautilusView *view = cur->data;
|
||||
|
||||
if(g_slist_find_custom(loci->meta_iids, view->iid, (GCompareFunc)strcmp))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view, requesting_view);
|
||||
{
|
||||
if(requesting_view != ((GtkWidget *)view))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci);
|
||||
}
|
||||
else
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
{
|
||||
if(((GtkWidget *)view) == requesting_view)
|
||||
requesting_view = NULL;
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
}
|
||||
}
|
||||
for(cur = loci->meta_iids; cur; cur = cur->next)
|
||||
{
|
||||
|
@ -528,6 +550,7 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(view, cur->data);
|
||||
nautilus_window_add_meta_view(window, view);
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view);
|
||||
}
|
||||
}
|
||||
for(cur = discard_views; cur; cur = cur->next)
|
||||
|
@ -544,6 +567,29 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
nautilus_navinfo_free(loci);
|
||||
}
|
||||
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view)
|
||||
{
|
||||
GSList *cur;
|
||||
guint signum;
|
||||
Nautilus_SelectionInfo selinfo;
|
||||
|
||||
signum = gtk_signal_lookup("notify_selection_change", nautilus_view_get_type());
|
||||
|
||||
selinfo.selected_uri = loc->selected_uri;
|
||||
selinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(((GtkWidget *)window->content_view) != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
{
|
||||
if(cur->data != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
|
|
|
@ -18,6 +18,9 @@ static void nautilus_window_close (GtkWidget *widget,
|
|||
static void nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
|
||||
#define CONTENTS_AS_HBOX
|
||||
/* six seconds */
|
||||
|
@ -84,6 +87,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
|
|||
klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
|
||||
|
||||
klass->request_location_change = nautilus_window_real_request_location_change;
|
||||
klass->request_selection_change = nautilus_window_real_request_selection_change;
|
||||
|
||||
i = 0;
|
||||
klass->window_signals[i++] = gtk_signal_new("request_location_change",
|
||||
|
@ -499,10 +503,21 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
signum = gtk_signal_lookup("notify_location_change", nautilus_view_get_type());
|
||||
|
||||
/* If we need to load a different IID, do that before sending the location change request */
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid))
|
||||
nautilus_view_load_client(NAUTILUS_VIEW(window->content_view), loci->content_iid);
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid)) {
|
||||
NautilusView *new_view;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci, window->content_view, requesting_view);
|
||||
if(requesting_view == window->content_view)
|
||||
requesting_view = NULL;
|
||||
|
||||
new_view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(new_view, loci->content_iid);
|
||||
nautilus_window_set_content_view(window, new_view);
|
||||
}
|
||||
|
||||
loci->navinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(requesting_view != window->content_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci);
|
||||
|
||||
notfound_views = keep_views = discard_views = NULL;
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
|
@ -510,9 +525,16 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
NautilusView *view = cur->data;
|
||||
|
||||
if(g_slist_find_custom(loci->meta_iids, view->iid, (GCompareFunc)strcmp))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view, requesting_view);
|
||||
{
|
||||
if(requesting_view != ((GtkWidget *)view))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci);
|
||||
}
|
||||
else
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
{
|
||||
if(((GtkWidget *)view) == requesting_view)
|
||||
requesting_view = NULL;
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
}
|
||||
}
|
||||
for(cur = loci->meta_iids; cur; cur = cur->next)
|
||||
{
|
||||
|
@ -528,6 +550,7 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(view, cur->data);
|
||||
nautilus_window_add_meta_view(window, view);
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view);
|
||||
}
|
||||
}
|
||||
for(cur = discard_views; cur; cur = cur->next)
|
||||
|
@ -544,6 +567,29 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
nautilus_navinfo_free(loci);
|
||||
}
|
||||
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view)
|
||||
{
|
||||
GSList *cur;
|
||||
guint signum;
|
||||
Nautilus_SelectionInfo selinfo;
|
||||
|
||||
signum = gtk_signal_lookup("notify_selection_change", nautilus_view_get_type());
|
||||
|
||||
selinfo.selected_uri = loc->selected_uri;
|
||||
selinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(((GtkWidget *)window->content_view) != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
{
|
||||
if(cur->data != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
|
|
|
@ -18,6 +18,9 @@ static void nautilus_window_close (GtkWidget *widget,
|
|||
static void nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view);
|
||||
|
||||
#define CONTENTS_AS_HBOX
|
||||
/* six seconds */
|
||||
|
@ -84,6 +87,7 @@ nautilus_window_class_init (NautilusWindowClass *klass)
|
|||
klass->parent_class = gtk_type_class (gtk_type_parent (object_class->type));
|
||||
|
||||
klass->request_location_change = nautilus_window_real_request_location_change;
|
||||
klass->request_selection_change = nautilus_window_real_request_selection_change;
|
||||
|
||||
i = 0;
|
||||
klass->window_signals[i++] = gtk_signal_new("request_location_change",
|
||||
|
@ -499,10 +503,21 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
signum = gtk_signal_lookup("notify_location_change", nautilus_view_get_type());
|
||||
|
||||
/* If we need to load a different IID, do that before sending the location change request */
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid))
|
||||
nautilus_view_load_client(NAUTILUS_VIEW(window->content_view), loci->content_iid);
|
||||
if(strcmp(NAUTILUS_VIEW(window->content_view)->iid, loci->content_iid)) {
|
||||
NautilusView *new_view;
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci, window->content_view, requesting_view);
|
||||
if(requesting_view == window->content_view)
|
||||
requesting_view = NULL;
|
||||
|
||||
new_view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(new_view, loci->content_iid);
|
||||
nautilus_window_set_content_view(window, new_view);
|
||||
}
|
||||
|
||||
loci->navinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(requesting_view != window->content_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci);
|
||||
|
||||
notfound_views = keep_views = discard_views = NULL;
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
|
@ -510,9 +525,16 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
NautilusView *view = cur->data;
|
||||
|
||||
if(g_slist_find_custom(loci->meta_iids, view->iid, (GCompareFunc)strcmp))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view, requesting_view);
|
||||
{
|
||||
if(requesting_view != ((GtkWidget *)view))
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci);
|
||||
}
|
||||
else
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
{
|
||||
if(((GtkWidget *)view) == requesting_view)
|
||||
requesting_view = NULL;
|
||||
discard_views = g_slist_prepend(discard_views, view);
|
||||
}
|
||||
}
|
||||
for(cur = loci->meta_iids; cur; cur = cur->next)
|
||||
{
|
||||
|
@ -528,6 +550,7 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
|
||||
nautilus_view_load_client(view, cur->data);
|
||||
nautilus_window_add_meta_view(window, view);
|
||||
gtk_signal_emit(GTK_OBJECT(view), signum, loci, window->content_view);
|
||||
}
|
||||
}
|
||||
for(cur = discard_views; cur; cur = cur->next)
|
||||
|
@ -544,6 +567,29 @@ nautilus_window_change_location(NautilusWindow *window,
|
|||
nautilus_navinfo_free(loci);
|
||||
}
|
||||
|
||||
static void nautilus_window_real_request_selection_change(NautilusWindow *window,
|
||||
Nautilus_SelectionRequestInfo *loc,
|
||||
GtkWidget *requesting_view)
|
||||
{
|
||||
GSList *cur;
|
||||
guint signum;
|
||||
Nautilus_SelectionInfo selinfo;
|
||||
|
||||
signum = gtk_signal_lookup("notify_selection_change", nautilus_view_get_type());
|
||||
|
||||
selinfo.selected_uri = loc->selected_uri;
|
||||
selinfo.content_view = NAUTILUS_VIEW(window->content_view)->view_client;
|
||||
|
||||
if(((GtkWidget *)window->content_view) != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
|
||||
for(cur = window->meta_views; cur; cur = cur->next)
|
||||
{
|
||||
if(cur->data != requesting_view)
|
||||
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, &selinfo);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_window_real_request_location_change (NautilusWindow *window,
|
||||
Nautilus_NavigationRequestInfo *loc,
|
||||
|
|
Loading…
Reference in a new issue