summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/calendar.c5
-rw-r--r--src/entry.c3
-rw-r--r--src/fileselection.c4
-rw-r--r--src/msg.c5
-rw-r--r--src/progress.c3
-rw-r--r--src/text.c2
-rw-r--r--src/tree.c3
7 files changed, 9 insertions, 16 deletions
diff --git a/src/calendar.c b/src/calendar.c
index 2d297786..5936aef2 100644
--- a/src/calendar.c
+++ b/src/calendar.c
@@ -107,17 +107,16 @@ zenity_calendar_dialog_response (GtkWidget *widget, int response, gpointer data)
g_date_free (date);
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
- gtk_main_quit ();
break;
case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
- gtk_main_quit ();
break;
default:
/* Esc dialog */
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break;
- }
+ }
+ gtk_main_quit ();
}
diff --git a/src/entry.c b/src/entry.c
index 36ff704a..4d242160 100644
--- a/src/entry.c
+++ b/src/entry.c
@@ -98,12 +98,10 @@ zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data)
if (text != NULL)
g_print ("%s\n", text);
- gtk_main_quit ();
break;
case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
- gtk_main_quit ();
break;
default:
@@ -111,4 +109,5 @@ zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data)
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break;
}
+ gtk_main_quit ();
}
diff --git a/src/fileselection.c b/src/fileselection.c
index a783b34a..995ba03f 100644
--- a/src/fileselection.c
+++ b/src/fileselection.c
@@ -94,18 +94,16 @@ zenity_fileselection_dialog_response (GtkWidget *widget, int response, gpointer
g_slist_free(selections);
g_free(separator);
- gtk_main_quit ();
break;
case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
- gtk_main_quit ();
break;
default:
/* Esc dialog */
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
- gtk_main_quit ();
break;
}
+ gtk_main_quit ();
}
diff --git a/src/msg.c b/src/msg.c
index 013fc721..27284472 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -126,16 +126,15 @@ zenity_msg_dialog_response (GtkWidget *widget, int response, gpointer data)
switch (response) {
case GTK_RESPONSE_OK:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
- gtk_main_quit ();
break;
case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
- gtk_main_quit ();
break;
default:
- zen_data->exit_code = 1;
+ zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break;
}
+ gtk_main_quit ();
}
diff --git a/src/progress.c b/src/progress.c
index 5804e88a..373c5b82 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -220,7 +220,6 @@ zenity_progress_dialog_response (GtkWidget *widget, int response, gpointer data)
switch (response) {
case GTK_RESPONSE_OK:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
- gtk_main_quit ();
break;
case GTK_RESPONSE_CANCEL:
@@ -230,7 +229,6 @@ zenity_progress_dialog_response (GtkWidget *widget, int response, gpointer data)
*/
kill (getppid (), 1);
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
- gtk_main_quit ();
break;
default:
@@ -238,4 +236,5 @@ zenity_progress_dialog_response (GtkWidget *widget, int response, gpointer data)
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break;
}
+ gtk_main_quit ();
}
diff --git a/src/text.c b/src/text.c
index 88c08620..b70bed0a 100644
--- a/src/text.c
+++ b/src/text.c
@@ -175,7 +175,6 @@ zenity_text_dialog_response (GtkWidget *widget, int response, gpointer data)
g_print (gtk_text_buffer_get_text (zen_text_data->buffer, &start, &end, 0));
}
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
- gtk_main_quit ();
break;
default:
@@ -183,4 +182,5 @@ zenity_text_dialog_response (GtkWidget *widget, int response, gpointer data)
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break;
}
+ gtk_main_quit ();
}
diff --git a/src/tree.c b/src/tree.c
index e828dfc3..fed58e2a 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -564,12 +564,10 @@ zenity_tree_dialog_response (GtkWidget *widget, int response, gpointer data)
}
zenity_tree_dialog_output ();
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
- gtk_main_quit ();
break;
case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
- gtk_main_quit ();
break;
default:
@@ -577,4 +575,5 @@ zenity_tree_dialog_response (GtkWidget *widget, int response, gpointer data)
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break;
}
+ gtk_main_quit ();
}
bgstack15