diff options
author | Sebastien Bacher <seb128@ubuntu.com> | 2019-04-03 22:56:05 +0200 |
---|---|---|
committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-04-03 22:56:05 +0200 |
commit | adf17243a6b6d0cac2d7302b4443ac0bceb8575d (patch) | |
tree | e619c7f2e7ce628e9950ae3e1451fcde8e210cc3 /src | |
parent | New upstream version 3.30.0 (diff) | |
parent | Bump to 3.32.0 (diff) | |
download | zenity-adf17243a6b6d0cac2d7302b4443ac0bceb8575d.tar.gz zenity-adf17243a6b6d0cac2d7302b4443ac0bceb8575d.tar.bz2 zenity-adf17243a6b6d0cac2d7302b4443ac0bceb8575d.zip |
New upstream version 3.32.0
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.in | 100 | ||||
-rw-r--r-- | src/progress.c | 23 |
2 files changed, 96 insertions, 27 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index b457fd9a..b96e2c1d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -165,7 +165,17 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/zenity-about.Po \ + ./$(DEPDIR)/zenity-calendar.Po ./$(DEPDIR)/zenity-color.Po \ + ./$(DEPDIR)/zenity-entry.Po \ + ./$(DEPDIR)/zenity-fileselection.Po \ + ./$(DEPDIR)/zenity-forms.Po ./$(DEPDIR)/zenity-main.Po \ + ./$(DEPDIR)/zenity-msg.Po ./$(DEPDIR)/zenity-notification.Po \ + ./$(DEPDIR)/zenity-option.Po ./$(DEPDIR)/zenity-password.Po \ + ./$(DEPDIR)/zenity-progress.Po ./$(DEPDIR)/zenity-scale.Po \ + ./$(DEPDIR)/zenity-text.Po ./$(DEPDIR)/zenity-tree.Po \ + ./$(DEPDIR)/zenity-util.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -287,7 +297,6 @@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ WEBKIT_CFLAGS = @WEBKIT_CFLAGS@ WEBKIT_LIBS = @WEBKIT_LIBS@ XGETTEXT = @XGETTEXT@ @@ -425,8 +434,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -527,22 +536,28 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-about.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-calendar.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-color.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-entry.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-fileselection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-forms.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-msg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-notification.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-option.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-password.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-progress.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-scale.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-text.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-tree.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-about.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-calendar.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-color.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-entry.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-fileselection.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-forms.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-msg.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-notification.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-option.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-password.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-progress.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-scale.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-text.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-tree.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zenity-util.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -855,7 +870,10 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -928,7 +946,22 @@ clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/zenity-about.Po + -rm -f ./$(DEPDIR)/zenity-calendar.Po + -rm -f ./$(DEPDIR)/zenity-color.Po + -rm -f ./$(DEPDIR)/zenity-entry.Po + -rm -f ./$(DEPDIR)/zenity-fileselection.Po + -rm -f ./$(DEPDIR)/zenity-forms.Po + -rm -f ./$(DEPDIR)/zenity-main.Po + -rm -f ./$(DEPDIR)/zenity-msg.Po + -rm -f ./$(DEPDIR)/zenity-notification.Po + -rm -f ./$(DEPDIR)/zenity-option.Po + -rm -f ./$(DEPDIR)/zenity-password.Po + -rm -f ./$(DEPDIR)/zenity-progress.Po + -rm -f ./$(DEPDIR)/zenity-scale.Po + -rm -f ./$(DEPDIR)/zenity-text.Po + -rm -f ./$(DEPDIR)/zenity-tree.Po + -rm -f ./$(DEPDIR)/zenity-util.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -974,7 +1007,22 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/zenity-about.Po + -rm -f ./$(DEPDIR)/zenity-calendar.Po + -rm -f ./$(DEPDIR)/zenity-color.Po + -rm -f ./$(DEPDIR)/zenity-entry.Po + -rm -f ./$(DEPDIR)/zenity-fileselection.Po + -rm -f ./$(DEPDIR)/zenity-forms.Po + -rm -f ./$(DEPDIR)/zenity-main.Po + -rm -f ./$(DEPDIR)/zenity-msg.Po + -rm -f ./$(DEPDIR)/zenity-notification.Po + -rm -f ./$(DEPDIR)/zenity-option.Po + -rm -f ./$(DEPDIR)/zenity-password.Po + -rm -f ./$(DEPDIR)/zenity-progress.Po + -rm -f ./$(DEPDIR)/zenity-scale.Po + -rm -f ./$(DEPDIR)/zenity-text.Po + -rm -f ./$(DEPDIR)/zenity-tree.Po + -rm -f ./$(DEPDIR)/zenity-util.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -995,7 +1043,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ diff --git a/src/progress.c b/src/progress.c index 1a5a68fd..00bb8aaa 100644 --- a/src/progress.c +++ b/src/progress.c @@ -105,6 +105,27 @@ zenity_progress_update_time_remaining (ZenityProgressData *progress_data) { } } +static float +stof(const char* s) { + float rez = 0, fact = 1; + if (*s == '-') { + s++; + fact = -1; + } + for (int point_seen = 0; *s; s++) { + if (*s == '.' || *s == ',') { + point_seen = 1; + continue; + } + int d = *s - '0'; + if (d >= 0 && d <= 9) { + if (point_seen) fact /= 10.0f; + rez = rez * 10.0f + (float)d; + } + } + return rez * fact; +} + static gboolean zenity_progress_handle_stdin ( GIOChannel *channel, GIOCondition condition, gpointer data) { @@ -190,7 +211,7 @@ zenity_progress_handle_stdin ( continue; /* Now try to convert the thing to a number */ - percentage = CLAMP (atoi (string->str), 0, 100); + percentage = CLAMP (stof (string->str), 0, 100); gtk_progress_bar_set_fraction ( GTK_PROGRESS_BAR (progress_bar), percentage / 100.0); |