summaryrefslogtreecommitdiff
path: root/src/caja-window-menus.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-window-menus.c
parentcbd6b367e9b05c08bff88ee1cfa03c09c7ee2558 (diff)
downloadcaja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.bz2
caja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.xz
src: reduce the scope of some variables
Diffstat (limited to 'src/caja-window-menus.c')
-rw-r--r--src/caja-window-menus.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/caja-window-menus.c b/src/caja-window-menus.c
index 6c4e884d..7eeb93bf 100644
--- a/src/caja-window-menus.c
+++ b/src/caja-window-menus.c
@@ -141,9 +141,7 @@ should_open_in_new_tab (void)
static void
activate_bookmark_in_menu_item (GtkAction *action, gpointer user_data)
{
- CajaWindowSlot *slot;
BookmarkHolder *holder;
- GFile *location;
holder = (BookmarkHolder *)user_data;
@@ -153,6 +151,9 @@ activate_bookmark_in_menu_item (GtkAction *action, gpointer user_data)
}
else
{
+ CajaWindowSlot *slot;
+ GFile *location;
+
location = caja_bookmark_get_location (holder->bookmark);
slot = caja_window_get_active_slot (holder->window);
caja_window_slot_go_to (slot,
@@ -431,12 +432,13 @@ static void
show_hidden_files_preference_callback (gpointer callback_data)
{
CajaWindow *window;
- GtkAction *action;
window = CAJA_WINDOW (callback_data);
if (window->details->show_hidden_files_mode == CAJA_WINDOW_SHOW_HIDDEN_FILES_DEFAULT)
{
+ GtkAction *action;
+
action = gtk_action_group_get_action (window->details->main_action_group, CAJA_ACTION_SHOW_HIDDEN_FILES);
g_assert (GTK_IS_ACTION (action));
@@ -456,12 +458,13 @@ static void
show_backup_files_preference_callback (gpointer callback_data)
{
CajaWindow *window;
- GtkAction *action;
window = CAJA_WINDOW (callback_data);
if (window->details->show_backup_files_mode == CAJA_WINDOW_SHOW_BACKUP_FILES_DEFAULT)
{
+ GtkAction *action;
+
action = gtk_action_group_get_action (window->details->main_action_group, CAJA_ACTION_SHOW_BACKUP_FILES);
g_assert (GTK_IS_ACTION (action));
@@ -593,7 +596,6 @@ action_caja_manual_callback (GtkAction *action,
{
CajaWindow *window;
GError *error;
- GtkWidget *dialog;
error = NULL;
window = CAJA_WINDOW (user_data);
@@ -606,6 +608,8 @@ action_caja_manual_callback (GtkAction *action,
if (error)
{
+ GtkWidget *dialog;
+
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,