summaryrefslogtreecommitdiff
path: root/src/caja-file-management-properties.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-file-management-properties.c
parentcbd6b367e9b05c08bff88ee1cfa03c09c7ee2558 (diff)
downloadcaja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.bz2
caja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.xz
src: reduce the scope of some variables
Diffstat (limited to 'src/caja-file-management-properties.c')
-rw-r--r--src/caja-file-management-properties.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c
index 764a988c..b3e9bcc1 100644
--- a/src/caja-file-management-properties.c
+++ b/src/caja-file-management-properties.c
@@ -201,13 +201,14 @@ caja_file_management_properties_size_group_create (GtkBuilder *builder,
{
GtkSizeGroup *size_group;
int i;
- char *item_name;
- GtkWidget *widget;
+ GtkWidget *widget = NULL;
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
for (i = 0; i < items; i++)
{
+ char *item_name;
+
item_name = g_strdup_printf ("%s_%d", prefix, i);
widget = GTK_WIDGET (gtk_builder_get_object (builder, item_name));
gtk_size_group_add_widget (size_group, widget);
@@ -222,7 +223,6 @@ preferences_show_help (GtkWindow *parent,
char const *sect_id)
{
GError *error = NULL;
- GtkWidget *dialog;
char *help_string;
g_assert (helpfile != NULL);
@@ -237,6 +237,8 @@ preferences_show_help (GtkWindow *parent,
if (error)
{
+ GtkWidget *dialog;
+
dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
@@ -259,10 +261,10 @@ caja_file_management_properties_dialog_response_cb (GtkDialog *parent,
int response_id,
GtkBuilder *builder)
{
- char *section;
-
if (response_id == GTK_RESPONSE_HELP)
{
+ char *section;
+
switch (gtk_notebook_get_current_page (GTK_NOTEBOOK (gtk_builder_get_object (builder, "notebook1"))))
{
default:
@@ -1109,8 +1111,8 @@ bind_builder_radio (GtkBuilder *builder,
const char *prefs,
const char **values)
{
- GtkWidget *button;
int i;
+ GtkWidget *button = NULL;
for (i = 0; widget_names[i] != NULL; i++) {
button = GTK_WIDGET (gtk_builder_get_object (builder, widget_names[i]));