nautilus r14198 - in branches/multiview: . src
- From: cneumair svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14198 - in branches/multiview: . src
- Date: Mon, 26 May 2008 20:14:42 +0000 (UTC)
Author: cneumair
Date: Mon May 26 20:14:42 2008
New Revision: 14198
URL: http://svn.gnome.org/viewvc/nautilus?rev=14198&view=rev
Log:
2008-05-26 Christian Neumair <cneumair gnome org>
* src/nautilus-navigation-window-menus.c (reload_tab_menu),
(nautilus_navigation_window_initialize_tabs_menu):
* src/nautilus-window-manage-views.c
(viewed_file_changed_callback), (nautilus_window_slot_go_home),
(got_file_info_for_view_selection_callback), (create_content_view):
* src/nautilus-window-menus.c (action_close_window_slot_callback):
* src/nautilus-window-slot.h:
* src/nautilus-window.c (nautilus_window_go_home):
Add *_go_home() API to slots and use it, make tab menu code compile.
Rename close action function names.
Modified:
branches/multiview/ChangeLog
branches/multiview/src/nautilus-navigation-window-menus.c
branches/multiview/src/nautilus-window-manage-views.c
branches/multiview/src/nautilus-window-menus.c
branches/multiview/src/nautilus-window-slot.h
branches/multiview/src/nautilus-window.c
Modified: branches/multiview/src/nautilus-navigation-window-menus.c
==============================================================================
--- branches/multiview/src/nautilus-navigation-window-menus.c (original)
+++ branches/multiview/src/nautilus-navigation-window-menus.c Mon May 26 20:14:42 2008
@@ -444,10 +444,12 @@
}
static void
-update_tab_menu (NautilusNavigationWindow *window)
+reload_tab_menu (NautilusNavigationWindow *window)
{
g_assert (NAUTILUS_IS_NAVIGATION_WINDOW (window));
+ /* multiview-TODO rebuild (not yet existing) tab list */
+
update_tab_action_sensitivity (window);
}
@@ -455,16 +457,16 @@
nautilus_navigation_window_initialize_tabs_menu (NautilusNavigationWindow *window)
{
g_signal_connect_object (window->notebook, "page-added",
- G_CALLBACK (refresh_tab_actions), window, G_CONNECT_SWAPPED);
+ G_CALLBACK (reload_tab_menu), window, G_CONNECT_SWAPPED);
g_signal_connect_object (window->notebook, "page-removed",
- G_CALLBACK (refresh_tab_actions), window, G_CONNECT_SWAPPED);
+ G_CALLBACK (reload_tab_menu), window, G_CONNECT_SWAPPED);
g_signal_connect_object (window->notebook, "page-reordered",
- G_CALLBACK (refresh_tab_actions), window, G_CONNECT_SWAPPED);
+ G_CALLBACK (reload_tab_menu), window, G_CONNECT_SWAPPED);
g_signal_connect_object (window->notebook, "switch-page",
- G_CALLBACK (refresh_tab_action_sensitivity), window,
+ G_CALLBACK (update_tab_action_sensitivity), window,
G_CONNECT_SWAPPED | G_CONNECT_AFTER);
- refresh_tab_actions (window);
+ reload_tab_menu (window);
}
static void
Modified: branches/multiview/src/nautilus-window-manage-views.c
==============================================================================
--- branches/multiview/src/nautilus-window-manage-views.c (original)
+++ branches/multiview/src/nautilus-window-manage-views.c Mon May 26 20:14:42 2008
@@ -268,9 +268,6 @@
g_list_free_1 (link);
}
-/*
- * multiview-TODO: handle this on a per-slot basis
- */
static void
handle_go_elsewhere (NautilusWindowSlot *slot, GFile *location)
{
@@ -379,7 +376,6 @@
g_object_unref (parent);
}
- /* multiview-TODO make _go_to_*() slot-specific */
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
@@ -391,10 +387,10 @@
nautilus_path_bar_clear_buttons (NAUTILUS_PATH_BAR (NAUTILUS_NAVIGATION_WINDOW (window)->path_bar));
}
- nautilus_window_go_to (NAUTILUS_WINDOW (window), go_to_file);
+ nautilus_window_slot_go_to (slot, go_to_file);
g_object_unref (go_to_file);
} else {
- nautilus_window_go_home (NAUTILUS_WINDOW (window));
+ nautilus_window_slot_go_home (slot);
}
} else {
nautilus_window_close (window);
@@ -654,7 +650,19 @@
nautilus_window_slot_open_location_full (slot, location,
NAUTILUS_WINDOW_OPEN_ACCORDING_TO_MODE,
flags, selection);
-}
+}
+
+void
+nautilus_window_slot_go_home (NautilusWindowSlot *slot)
+{
+ GFile *home;
+
+ g_return_if_fail (NAUTILUS_IS_WINDOW_SLOT (slot));
+
+ home = g_file_new_for_path (g_get_home_dir ());
+ nautilus_window_slot_open_location (slot, home, FALSE);
+ g_object_unref (home);
+}
#if 0
static char *
@@ -1102,13 +1110,13 @@
if (!nautilus_is_root_directory (location)) {
if (!nautilus_is_home_directory (location)) {
- nautilus_window_go_home (NAUTILUS_WINDOW (window));
+ nautilus_window_slot_go_home (NAUTILUS_WINDOW (window)->details->active_slot);
} else {
GFile *root;
root = g_file_new_for_path ("/");
/* the last fallback is to go to a known place that can't be deleted! */
- nautilus_window_go_to (NAUTILUS_WINDOW (window), root);
+ nautilus_window_slot_go_to (NAUTILUS_WINDOW (window)->details->active_slot, location);
g_object_unref (root);
}
} else {
@@ -1228,7 +1236,7 @@
} else {
/* Something is busted, there was no location to load.
Just load the homedir. */
- nautilus_window_go_home (NAUTILUS_WINDOW (window));
+ nautilus_window_slot_go_home (slot);
}
}
Modified: branches/multiview/src/nautilus-window-menus.c
==============================================================================
--- branches/multiview/src/nautilus-window-menus.c (original)
+++ branches/multiview/src/nautilus-window-menus.c Mon May 26 20:14:42 2008
@@ -192,16 +192,12 @@
}
static void
-action_close_window_callback (GtkAction *action,
- gpointer user_data)
+action_close_window_slot_callback (GtkAction *action,
+ gpointer user_data)
{
NautilusWindow *window;
NautilusWindowSlot *slot;
- /* multiview-TODO rename this action, decide
- * whether we need a "close all" action
- */
-
window = NAUTILUS_WINDOW (user_data);
slot = window->details->active_slot;
@@ -662,7 +658,7 @@
/* name, stock id */ { "Close", GTK_STOCK_CLOSE,
/* label, accelerator */ N_("_Close"), "<control>W",
/* tooltip */ N_("Close this folder"),
- G_CALLBACK (action_close_window_callback) },
+ G_CALLBACK (action_close_window_slot_callback) },
{ "Backgrounds and Emblems", NULL,
N_("_Backgrounds and Emblems..."),
NULL, N_("Display patterns, colors, and emblems that can be used to customize appearance"),
Modified: branches/multiview/src/nautilus-window-slot.h
==============================================================================
--- branches/multiview/src/nautilus-window-slot.h (original)
+++ branches/multiview/src/nautilus-window-slot.h Mon May 26 20:14:42 2008
@@ -123,8 +123,8 @@
#define nautilus_window_slot_go_to_with_selection(slot,location,new_selection) \
nautilus_window_slot_open_location_with_selection(slot, location, new_selection, FALSE)
-void nautilus_window_slot_go_home (NautilusWindow *window);
-void nautilus_window_slot_go_up (NautilusWindow *window,
+void nautilus_window_slot_go_home (NautilusWindowSlot *slot);
+void nautilus_window_slot_go_up (NautilusWindowSlot *slot,
gboolean close_behind);
void nautilus_window_slot_set_content_view_widget (NautilusWindowSlot *slot,
Modified: branches/multiview/src/nautilus-window.c
==============================================================================
--- branches/multiview/src/nautilus-window.c (original)
+++ branches/multiview/src/nautilus-window.c Mon May 26 20:14:42 2008
@@ -407,16 +407,9 @@
void
nautilus_window_go_home (NautilusWindow *window)
{
- NautilusWindowSlot *slot;
- GFile *home;
-
g_return_if_fail (NAUTILUS_IS_WINDOW (window));
- slot = window->details->active_slot;
-
- home = g_file_new_for_path (g_get_home_dir ());
- nautilus_window_slot_open_location (slot, home, FALSE);
- g_object_unref (home);
+ nautilus_window_slot_go_home (window->details->active_slot);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]