summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArx Cruz <arxcruz@gnome.org>2015-05-29 13:53:25 +0200
committerArx Cruz <arxcruz@gnome.org>2015-05-29 13:53:25 +0200
commit8fcde2b8423526eb1f2ab8bbe8e07a0350283927 (patch)
treed56152b30bf0dd26caade7341938cedd6aabeafd
parentFix typo in documentation (diff)
downloadzenity-8fcde2b8423526eb1f2ab8bbe8e07a0350283927.tar.gz
zenity-8fcde2b8423526eb1f2ab8bbe8e07a0350283927.tar.bz2
zenity-8fcde2b8423526eb1f2ab8bbe8e07a0350283927.zip
Fix uninitialized progress_bar error
-rw-r--r--src/progress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/progress.c b/src/progress.c
index d8ecea52..8e458c66 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -292,6 +292,8 @@ zenity_progress (ZenityData *data, ZenityProgressData *progress_data)
dialog = GTK_WIDGET (gtk_builder_get_object (builder,
"zenity_progress_dialog"));
+ progress_bar = gtk_builder_get_object (builder, "zenity_progress_bar");
+
g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (zenity_progress_dialog_response), data);
@@ -337,8 +339,6 @@ zenity_progress (ZenityData *data, ZenityProgressData *progress_data)
if (progress_data->dialog_text)
gtk_label_set_markup (GTK_LABEL (text), g_strcompress (progress_data->dialog_text));
- progress_bar = gtk_builder_get_object (builder, "zenity_progress_bar");
-
if (progress_data->percentage > -1)
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar),
progress_data->percentage/100.0);
bgstack15