summaryrefslogtreecommitdiff
path: root/src/caja-location-bar.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-06-14 09:30:32 +0200
committerZenWalker <[email protected]>2019-06-17 15:18:27 +0200
commitef29013fdfd0df5d4a3cc6c5a8fb1583aabef952 (patch)
tree51c2c4afb9259ec97ba3303591bbc8e946f277d9 /src/caja-location-bar.c
parentcbd6b367e9b05c08bff88ee1cfa03c09c7ee2558 (diff)
downloadcaja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.bz2
caja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.xz
src: reduce the scope of some variables
Diffstat (limited to 'src/caja-location-bar.c')
-rw-r--r--src/caja-location-bar.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/caja-location-bar.c b/src/caja-location-bar.c
index 5016677f..14d99a6f 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);