Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Files
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
444
Issues
444
List
Boards
Labels
Service Desk
Milestones
Merge Requests
30
Merge Requests
30
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
Files
Commits
0e731404
Commit
0e731404
authored
Feb 17, 2011
by
Cosimo Cecchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: assume all windows are navigation windows
parent
b6b63e35
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
63 deletions
+40
-63
src/nautilus-application.c
src/nautilus-application.c
+3
-10
src/nautilus-bookmarks-window.c
src/nautilus-bookmarks-window.c
+0
-7
src/nautilus-window-manage-views.c
src/nautilus-window-manage-views.c
+25
-30
src/nautilus-window-pane.c
src/nautilus-window-pane.c
+1
-3
src/nautilus-window.c
src/nautilus-window.c
+11
-13
No files found.
src/nautilus-application.c
View file @
0e731404
...
...
@@ -717,20 +717,14 @@ nautilus_application_close_all_navigation_windows (NautilusApplication *self)
NautilusWindow
*
window
;
window
=
NAUTILUS_WINDOW
(
l
->
data
);
if
(
NAUTILUS_IS_NAVIGATION_WINDOW
(
window
))
{
gtk_widget_hide
(
GTK_WIDGET
(
window
));
}
gtk_widget_hide
(
GTK_WIDGET
(
window
));
}
for
(
l
=
list_copy
;
l
!=
NULL
;
l
=
l
->
next
)
{
NautilusWindow
*
window
;
window
=
NAUTILUS_WINDOW
(
l
->
data
);
if
(
NAUTILUS_IS_NAVIGATION_WINDOW
(
window
))
{
nautilus_window_close
(
window
);
}
nautilus_window_close
(
window
);
}
g_list_free
(
list_copy
);
}
...
...
@@ -791,8 +785,7 @@ another_navigation_window_already_showing (NautilusApplication *application,
list
=
gtk_application_get_windows
(
GTK_APPLICATION
(
application
));
for
(
item
=
list
;
item
!=
NULL
;
item
=
item
->
next
)
{
if
(
item
->
data
!=
the_window
&&
NAUTILUS_IS_NAVIGATION_WINDOW
(
item
->
data
))
{
if
(
item
->
data
!=
the_window
)
{
return
TRUE
;
}
}
...
...
src/nautilus-bookmarks-window.c
View file @
0e731404
...
...
@@ -63,7 +63,6 @@ static int button_pressed_signal_id;
static
int
key_pressed_signal_id
;
static
int
jump_button_signal_id
;
static
NautilusApplication
*
application
;
static
gboolean
parent_is_browser_window
;
/* forward declarations */
static
guint
get_selected_row
(
void
);
...
...
@@ -266,12 +265,6 @@ create_bookmarks_window (NautilusBookmarkList *list, GObject *undo_manager_sourc
application
=
nautilus_application_dup_singleton
();
if
(
NAUTILUS_IS_NAVIGATION_WINDOW
(
undo_manager_source
))
{
parent_is_browser_window
=
TRUE
;
}
else
{
parent_is_browser_window
=
FALSE
;
}
set_up_close_accelerator
(
window
);
nautilus_undo_share_undo_manager
(
G_OBJECT
(
window
),
undo_manager_source
);
...
...
src/nautilus-window-manage-views.c
View file @
0e731404
...
...
@@ -324,6 +324,9 @@ viewed_file_changed_callback (NautilusFile *file,
* file was never seen in the first place.
*/
if
(
slot
->
viewed_file_seen
)
{
/* auto-show existing parent. */
GFile
*
go_to_file
,
*
parent
,
*
location
;
/* Detecting a file is gone may happen in the
* middle of a pending location change, we
* need to cancel it before closing the window
...
...
@@ -339,37 +342,30 @@ viewed_file_changed_callback (NautilusFile *file,
*/
end_location_change
(
slot
);
if
(
NAUTILUS_IS_NAVIGATION_WINDOW
(
window
))
{
/* auto-show existing parent. */
GFile
*
go_to_file
,
*
parent
,
*
location
;
go_to_file
=
NULL
;
location
=
nautilus_file_get_location
(
file
);
parent
=
g_file_get_parent
(
location
);
g_object_unref
(
location
);
if
(
parent
)
{
go_to_file
=
nautilus_find_existing_uri_in_hierarchy
(
parent
);
g_object_unref
(
parent
);
}
go_to_file
=
NULL
;
location
=
nautilus_file_get_location
(
file
);
parent
=
g_file_get_parent
(
location
);
g_object_unref
(
location
);
if
(
parent
)
{
go_to_file
=
nautilus_find_existing_uri_in_hierarchy
(
parent
);
g_object_unref
(
parent
);
}
if
(
go_to_file
!=
NULL
)
{
/* the path bar URI will be set to go_to_uri immediately
* in begin_location_change, but we don't want the
* inexistant children to show up anymore */
if
(
slot
==
slot
->
pane
->
active_slot
)
{
/* multiview-TODO also update NautilusWindowSlot
* [which as of writing doesn't save/store any path bar state]
*/
nautilus_path_bar_clear_buttons
(
NAUTILUS_PATH_BAR
(
NAUTILUS_NAVIGATION_WINDOW_PANE
(
slot
->
pane
)
->
path_bar
));
}
nautilus_window_slot_go_to
(
slot
,
go_to_file
,
FALSE
);
g_object_unref
(
go_to_file
);
}
else
{
nautilus_window_slot_go_home
(
slot
,
FALSE
);
if
(
go_to_file
!=
NULL
)
{
/* the path bar URI will be set to go_to_uri immediately
* in begin_location_change, but we don't want the
* inexistant children to show up anymore */
if
(
slot
==
slot
->
pane
->
active_slot
)
{
/* multiview-TODO also update NautilusWindowSlot
* [which as of writing doesn't save/store any path bar state]
*/
nautilus_path_bar_clear_buttons
(
NAUTILUS_PATH_BAR
(
NAUTILUS_NAVIGATION_WINDOW_PANE
(
slot
->
pane
)
->
path_bar
));
}
nautilus_window_slot_go_to
(
slot
,
go_to_file
,
FALSE
);
g_object_unref
(
go_to_file
);
}
else
{
nautilus_window_
close
(
window
);
nautilus_window_
slot_go_home
(
slot
,
FALSE
);
}
}
}
else
{
...
...
@@ -512,8 +508,7 @@ nautilus_window_slot_open_location_full (NautilusWindowSlot *slot,
g_assert
(
target_window
!=
NULL
);
if
((
flags
&
NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB
)
!=
0
&&
NAUTILUS_IS_NAVIGATION_WINDOW
(
window
))
{
if
((
flags
&
NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB
)
!=
0
)
{
g_assert
(
target_window
==
window
);
slot_flags
=
0
;
...
...
src/nautilus-window-pane.c
View file @
0e731404
...
...
@@ -177,9 +177,7 @@ nautilus_window_pane_slot_close (NautilusWindowPane *pane,
nautilus_window_close_pane
(
pane
);
nautilus_window_set_active_pane
(
window
,
next_pane
);
if
(
NAUTILUS_IS_NAVIGATION_WINDOW
(
window
))
{
nautilus_navigation_window_update_show_hide_menu_items
(
NAUTILUS_NAVIGATION_WINDOW
(
window
));
}
nautilus_navigation_window_update_show_hide_menu_items
(
NAUTILUS_NAVIGATION_WINDOW
(
window
));
}
else
{
nautilus_window_close
(
window
);
}
...
...
src/nautilus-window.c
View file @
0e731404
...
...
@@ -1443,24 +1443,22 @@ nautilus_forget_history (void)
window_node
!=
NULL
;
window_node
=
window_node
->
next
)
{
if
(
NAUTILUS_IS_NAVIGATION_WINDOW
(
window_node
->
data
))
{
NautilusNavigationWindow
*
window
;
NautilusNavigationWindow
*
window
;
window
=
NAUTILUS_NAVIGATION_WINDOW
(
window_node
->
data
);
window
=
NAUTILUS_NAVIGATION_WINDOW
(
window_node
->
data
);
for
(
walk
=
NAUTILUS_WINDOW
(
window_node
->
data
)
->
details
->
panes
;
walk
;
walk
=
walk
->
next
)
{
NautilusWindowPane
*
pane
=
walk
->
data
;
for
(
l
=
pane
->
slots
;
l
!=
NULL
;
l
=
l
->
next
)
{
navigation_slot
=
l
->
data
;
for
(
walk
=
NAUTILUS_WINDOW
(
window_node
->
data
)
->
details
->
panes
;
walk
;
walk
=
walk
->
next
)
{
NautilusWindowPane
*
pane
=
walk
->
data
;
for
(
l
=
pane
->
slots
;
l
!=
NULL
;
l
=
l
->
next
)
{
navigation_slot
=
l
->
data
;
nautilus_navigation_window_slot_clear_back_list
(
navigation_slot
);
nautilus_navigation_window_slot_clear_forward_list
(
navigation_slot
);
}
nautilus_navigation_window_slot_clear_back_list
(
navigation_slot
);
nautilus_navigation_window_slot_clear_forward_list
(
navigation_slot
);
}
nautilus_navigation_window_allow_back
(
window
,
FALSE
);
nautilus_navigation_window_allow_forward
(
window
,
FALSE
);
}
nautilus_navigation_window_allow_back
(
window
,
FALSE
);
nautilus_navigation_window_allow_forward
(
window
,
FALSE
);
}
g_object_unref
(
app
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment