[nautilus] window: fold function into only caller
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window: fold function into only caller
- Date: Sat, 23 May 2015 19:37:26 +0000 (UTC)
commit 174c892a9eed5967f026e72dd7ff494b85718ffa
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat May 23 12:17:44 2015 -0700
window: fold function into only caller
src/nautilus-window.c | 21 +++++----------------
1 files changed, 5 insertions(+), 16 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index fb26117..cbaf3ac 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -83,8 +83,6 @@ static void mouse_forward_button_changed (gpointer callbac
static void use_extra_mouse_buttons_changed (gpointer callback_data);
static void nautilus_window_initialize_actions (NautilusWindow *window);
static GtkWidget * nautilus_window_ensure_location_entry (NautilusWindow *window);
-void nautilus_window_prompt_for_location (NautilusWindow *window,
- GFile *location);
/* Sanity check: highest mouse button value I could find was 14. 5 is our
* lower threshold (well-documented to be the one of the button events for the
@@ -377,10 +375,14 @@ action_prompt_for_location_root (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
+ NautilusWindow *window = user_data;
GFile *location;
+ GtkWidget *entry;
location = g_file_new_for_path ("/");
- nautilus_window_prompt_for_location (NAUTILUS_WINDOW (user_data), location);
+ entry = nautilus_window_ensure_location_entry (window);
+ nautilus_location_entry_set_location (NAUTILUS_LOCATION_ENTRY (entry), location);
+
g_object_unref (location);
}
@@ -884,19 +886,6 @@ nautilus_window_get_notebook (NautilusWindow *window)
return window->priv->notebook;
}
-void
-nautilus_window_prompt_for_location (NautilusWindow *window,
- GFile *location)
-{
- GtkWidget *entry;
-
- g_return_if_fail (NAUTILUS_IS_WINDOW (window));
- g_return_if_fail (G_IS_FILE (location));
-
- entry = nautilus_window_ensure_location_entry (window);
- nautilus_location_entry_set_location (NAUTILUS_LOCATION_ENTRY (entry), location);
-}
-
/* Code should never force the window taller than this size.
* (The user can still stretch the window taller if desired).
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]