diff options
author | Pablo Barciela <[email protected]> | 2019-06-14 09:30:32 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-20 00:07:37 +0200 |
commit | 25ffc1e58eeb5c2faef66eba1ac58bf0ac19ff67 (patch) | |
tree | 2a79eb2b3fe44cf6b49ec1b2bf23092cbef5d6a1 /src/caja-location-bar.c | |
parent | ed722a990406ce48b353c5eb7499fa8662cdff12 (diff) | |
download | caja-25ffc1e58eeb5c2faef66eba1ac58bf0ac19ff67.tar.bz2 caja-25ffc1e58eeb5c2faef66eba1ac58bf0ac19ff67.tar.xz |
src: reduce the scope of some variables
Diffstat (limited to 'src/caja-location-bar.c')
-rw-r--r-- | src/caja-location-bar.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/caja-location-bar.c b/src/caja-location-bar.c index a0f9500a..9ea62b60 100644 --- a/src/caja-location-bar.c +++ b/src/caja-location-bar.c @@ -157,15 +157,9 @@ drag_data_received_callback (GtkWidget *widget, gpointer callback_data) { char **names; - CajaApplication *application; int name_count; - CajaWindow *new_window; CajaNavigationWindow *window; - GdkScreen *screen; gboolean new_windows_for_extras; - char *prompt; - char *detail; - GFile *location; CajaLocationBar *self = CAJA_LOCATION_BAR (widget); g_assert (data != NULL); @@ -190,6 +184,9 @@ drag_data_received_callback (GtkWidget *widget, name_count = g_strv_length (names); if (name_count > 1) { + char *prompt; + char *detail; + prompt = g_strdup_printf (ngettext("Do you want to view %d location?", "Do you want to view %d locations?", name_count), @@ -225,7 +222,11 @@ drag_data_received_callback (GtkWidget *widget, if (new_windows_for_extras) { + CajaApplication *application; + GdkScreen *screen; int i; + CajaWindow *new_window = NULL; + GFile *location = NULL; application = CAJA_WINDOW (window)->application; screen = gtk_window_get_screen (GTK_WINDOW (window)); @@ -558,9 +559,6 @@ void caja_location_bar_set_location (CajaLocationBar *bar, const char *location) { - char *formatted_location; - GFile *file; - g_assert (location != NULL); /* Note: This is called in reaction to external changes, and @@ -573,6 +571,9 @@ caja_location_bar_set_location (CajaLocationBar *bar, } else { + char *formatted_location; + GFile *file; + file = g_file_new_for_uri (location); formatted_location = g_file_get_parse_name (file); g_object_unref (file); |