Commit Graph

58 Commits

Author SHA1 Message Date
Aurélio A. Heckert 0f413e6a23 Makes progress to consider the decimal from percent update
Implements stof alternative to atof, to ignore locale settings.

This also helps the time remaining calculation for long tasks.
2018-06-18 18:09:17 -03:00
Arx Cruz 4eddb202ca Fix style
Fixing style in all zenity code, removing useless spaces,
empty lines, all code in 80 columns, etc.
2017-04-07 14:00:42 +02:00
Arx Cruz d063797fdf Fixing GLib-CRITICAL messages 2015-10-02 14:35:06 +02:00
Arx Cruz 8fcde2b842 Fix uninitialized progress_bar error 2015-05-29 13:53:25 +02:00
Arx Cruz a0fa643f1c Merge branch 'jjardon/no_deprecated'
Conflicts:
	src/msg.c
2015-04-21 13:51:23 +02:00
Gama Anderson ba5ea0386d ADD gchar **extra_label TO struct ZenityData
this is done to keep the name of the extra buttons

ADD general option "extra-button" with string array as argument

	This will upon consecutive calls save the name of buttons in an array of strings

To all MODES, except notification.c and about.c ADD
  if (data->extra_label) {
    gint i=0;
    while(data->extra_label[i]!=NULL){
      gtk_dialog_add_button (GTK_DIALOG (dialog), data->extra_label[i], i);
      i++;
    }
  }

	This add the extra buttons to the dialog. The response is the number of the button

To all MODES response, except notification.c and about.c ADD
    default:
      if (response < g_strv_length(zen_data->extra_label))
        printf("%s\n",zen_data->extra_label[response]);

	This will print the button name to stdout when they are pressed

ADD question option "switch"

	This will suppress the standard "ok" and "cancel" button in question. This just wort in combination with --extra-button, otherwise error is raised.

	https://bugzilla.gnome.org/show_bug.cgi?id=118016
2015-04-21 13:00:44 +02:00
Javier Jardón 6fcbb80fd1 Do not use an icon for Cancel/OK buttons
GTK+ documentation recommends to not use an icons, but use
"_OK"/"_Cancel" labels instead
2015-03-22 09:16:16 +00:00
Arx Cruz b5460887fb Bug #700249 - Progress dialog does not wrap 2014-10-22 15:35:22 +02:00
Arx Cruz b44b2fb33d Fixing g_timeout_add calls 2014-10-21 16:32:14 +02:00
Arx Cruz 6ac663ea05 Fixing remain g_timeout_add
Finish switch g_timeout_add for g_timeout_add_seconds
2014-10-21 16:06:23 +02:00
Scott Pakin 673550b6d3 Added time-remaining support to progress bars
Introduced a --time-remaining command-line option that uses the time
and percent complete to extrapolate the time remaining until progress
reaches 100%.
2014-10-21 15:22:11 +02:00
Weitian Leung 009523d5da added attach option for transient window 2013-08-31 00:26:51 -03:00
Arx Cruz c89ce9c381 Bug #653468. Fixed by Kurt Miller <kurt@intricatesoftware.com>.
Fix the broken auto-close option in progress and list dialogs.
2013-06-04 16:27:48 -03:00
Arx Cruz 1ac1da63f8 But #674881 - Timeout option overriding normal exit code 2013-03-05 16:56:24 -03:00
Florian Müllner 0628bd3291 util: Add an option to request dialogs being modal
As WMs cannot open windows themselves, Mutter uses zenity to open
"Force Quit" dialogs for unresponsive windows; as those are strongly
tied to the corresponding window, it makes sense to make them modal
(in particular when attaching them to their parent).

https://bugzilla.gnome.org/show_bug.cgi?id=684322
2012-09-25 18:46:12 -04:00
Colin Walters 5dd7442bd5 Fix various compiler warnings (two serious)
Missing sentinels can cause crashes.  The others are just style.
2012-08-12 12:20:07 -04:00
Arx Cruz cb5f17a2df Wrong unref object 2012-04-19 17:32:59 -03:00
Arx Cruz 1e88554c3f Fix for Bug 567663. Now the --pulsate option works properly 2012-04-19 16:11:22 -03:00
Arx Cruz 6768a40e99 Fix for bug #611297 Now Zenity have --ok-label and --cancel-label in all dialogs. This patch doesn't break old zenity scripts. 2011-07-26 14:02:45 -03:00
Arx Cruz d60e5eeeb3 Now if you use --timeout option, the return code will be properly handled
The default behavior will be done (ie. user click on ok button)
The return code will be 5
2011-06-17 10:51:00 -03:00
Arx Cruz b39ad33c35 Bug 651948 - zenity list does not return default value when timeout is over 2011-06-16 11:34:01 -03:00
Arx Cruz ef3a33a142 Fix for bug 540560.
Patch by Victor Ananjevsky <ananasik at gmail dot com>
2011-01-02 22:57:42 -02:00
Philippe Gauthier 1570a2bbf0 Use g_timeout_add_seconds instead g_timeout_add
The calls to g_timeout_add are replaced with g_timeout_add_seconds to
reduce the number or program wake ups. See the GNOME Goal description:
http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds
2010-05-27 20:49:45 -03:00
Huzaifa Sidhpurwala 3c17a5a887 Bug 593926 - --progress needs a --nocancel option 2010-02-23 18:07:08 +00:00
Lucas Rocha f0dfc8a820 [progress] Improve code to update of percentage 2009-08-10 03:22:05 +01:00
Lucas Rocha a66e4df5d1 Bug 556198 – Support toggling pulsate in progressbar 2009-08-10 03:12:16 +01:00
Lucas Rocha fa0349545d [progress] Factor out function to control pulsate 2009-08-10 03:08:46 +01:00
Lucas Rocha 54b171ff82 [progress] coding style fixes 2009-08-10 03:07:59 +01:00
Lucas Rocha 25ec1ed3bb [progress] Remove duplicate code when returning 2009-08-08 11:21:24 +01:00
Lucas Rocha 5c6a48f684 [progress] Cosmetic fix in code comment 2009-08-08 10:51:52 +01:00
Felix Riemann 3f33966167 Bug 578393 – convert from libglade to GtkBuilder 2009-07-20 10:23:32 +02:00
Lucas Rocha 8b16d4d412 added timeout option to all dialogs (Fixes bug #160654). Based on patch
2007-08-13  Lucas Rocha  <lucasr@gnome.org>

	* src/*.c: added timeout option to all dialogs (Fixes bug #160654).
	Based on patch from Muthiah Annamalai <gnumuthu@users.sf.net>.

svn path=/trunk/; revision=1231
2007-08-13 20:36:29 +00:00
Lucas Rocha adee9db566 general cleanups for build warnings (Fixes bug #416196). Patch from
2007-05-14  Lucas Rocha  <lucasr@gnome.org>

	* src/progress.c (zenity_progress_handle_stdin), src/option.c
	(zenity_create_context), src/about.c, src/notification.c
	(zenity_notification_handle_stdin): general cleanups for 
	build warnings (Fixes bug #416196). Patch from Kjartan 
	Maraas <kmaraas@gnome.org>.

svn path=/trunk/; revision=1208
2007-05-14 21:26:08 +00:00
Lucas Rocha 09c4a49800 add "auto-kill" option to progress dialog. Now the user can choose whether
2006-12-02  Lucas Rocha  <lucasr@gnome.org>

	* src/zenity.h, src/progress.c, src/option.c: add "auto-kill" option
	to progress dialog. Now the user can choose whether to kill parent
	process or not (Fixes bug #310824). Patch from Diego Escalante Urrelo
	<diego@aureal.com.pe>.
2006-12-02 10:54:45 +00:00
Lucas Rocha 5547de9384 make it possible to add new lines and markup in the dialog text.
2005-11-15  Lucas Rocha  <lucasr@cvs.gnome.org>

        * src/calendar.c, src/progress.c, src/tree.c: make
        it possible to add new lines and markup in the dialog
        text.
2005-11-15 04:14:35 +00:00
Lucas Rocha 21f7bc6a54 general code cleanups. Contribution from Benoît Dejean.
2005-07-08  Lucas Rocha  <lucasr@cvs.gnome.org>

	* src/about.c, src/calendar.c, src/fileselection.c,
	src/option.c, src/progress.c, src/text.c, src/tree.c,
	src/util.c: general code cleanups. Contribution from
	Benoît Dejean.
2005-07-08 23:21:34 +00:00
Lucas Almeida Rocha 4c328078b6 Include cleanups (config.h) 2005-07-06 20:13:11 +00:00
Glynn Foster 6abd93050f COPYING, src/about.c, src/calendar.c, src/eggtrayicon.c, src/entry.c,
2005-04-25  Glynn Foster  <glynn.foster@sun.com>

	* COPYING, src/about.c, src/calendar.c, src/eggtrayicon.c,
	* src/entry.c, src/fileselection.c, src/main.c, src/msg.c,
	* src/notification.c, src/option.c, src/progress.c,
	* src/text.c, src/tree.c, src/util.c: Update the FSF address
	to point to 51 Franklin Street, Fifth Floor as per forwarded
	mail from Alvaro Lopez Ortega.
2005-04-25 03:20:45 +00:00
Glynn Foster 6bac2fb947 If auto-close, close the dialog when the input stream finds an EOF.
2005-02-07  Glynn Foster  <glynn.foster@sun.com>

	* src/progress.c: If auto-close, close the dialog when
	the input stream finds an EOF.
2005-02-07 01:56:02 +00:00
Kjartan Maraas ca975e8399 Add missing header. Same ANSIfication. Closes bug #152851.
2004-09-17  Kjartan Maraas  <kmaraas@gnome.org>

	* src/progress.c: Add missing header.
	* src/tree.c: Same
	* src/util.c: (transient_get_xterm),
	(transient_get_xterm_toplevel): ANSIfication.
	Closes bug #152851.
2004-09-17 08:57:21 +00:00
Glynn Foster 3e05834b4c Add new notification icon. Update for new files. Restructure code a little
2004-09-13  Glynn Foster  <glynn.foster@sun.com>

	* data/Makefile.am, data/zenity-notification.png: Add new
	notification icon.
	* src/Makefile.am: Update for new files.
	* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
	src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
	little bit for new utility functions for setting window icons.
	* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
	support.
	* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
	Add support for notification area.
	* data/zenity.1, help/*: Update docs for notification and new file
	selection changes.
2004-09-13 07:51:51 +00:00
Glynn Foster 63661a6ea0 src/calendar.c, src/entry.c, src/fileselection.c, Cleanup fixes from Paul
2004-07-19  Glynn Foster  <glynn.foster@sun.com>

	* src/calendar.c, src/entry.c, src/fileselection.c,
	* src/msg.c, src/progress.c, src/text.c, src/tree.c: Cleanup
	fixes from Paul Bolle.
2004-07-19 01:13:40 +00:00
Glynn Foster 6c68b70ca3 Patch from Luke Suchocki to send HUP to parent instead of itself. Fixes
2004-06-18  Glynn Foster  <glynn.foster@sun.com>

	* THANKS, src/about.c, src/progress.c: Patch
	from Luke Suchocki to send HUP to parent
	instead of itself. Fixes #144542.
2004-06-17 23:38:39 +00:00
Glynn Foster 62785ed80f Add from the 2 Sebastian's, and make email addresses more spam proof.
2004-04-26  Glynn Foster  <glynn.foster@sun.com>

	* THANKS, src/about.c: Add from the 2 Sebastian's, and make
	email addresses more spam proof.
	* src/calendar.c, src/entry.c, src/fileselection.c, src/msg.c,
	* src/progress.c, src/text.c, src/tree.c, src/util.c,
	* src/util.h: Patch from Sebastian Kapfer to make all zenity
	dialogs transients of the parent xterm. Fixes #136226.
	* src/zenity.glade: Patch from Sebastian Heinlein to
	improve things HIG wise. Fixes #140745.
2004-04-26 04:41:25 +00:00
Glynn Foster b43bbda2e2 Patch from Darren Adams <darrenadams@dsl.pipex.com> to make sure the new
2004-03-19  Glynn Foster  <glynn.foster@sun.com>

	* src/calendar.c, src/entry.c, src/fileselection.c,
	src/msg.c, src/progress.c, src/text.c, src/tree.c:
	Patch from Darren Adams <darrenadams@dsl.pipex.com> to make
	sure the new file chooser resizes nicely. Sanitize the default
	setting of the other widgets.
	* configure.in, src/util.c: Lose gconf dependancy since we
	don't currently use it, although arguably we should to detect
	which help browser we're supposed to run :/
	* THANKS, src/about.c: Add Darren to the list.
2004-03-19 02:28:30 +00:00
Mike Newman af594b60e9 *** empty log message *** 2003-06-13 22:01:48 +00:00
Mike Newman 5bade6fe6a Support user-defined return values via env vars, like dialog did. 2003-06-07 14:41:56 +00:00
Glynn Foster 65cb873430 Fix up some build warnings as reported by Ross Burton and his amazing gcc
2003-06-04  Glynn Foster  <glynn.foster@sun.com>

	* src/about.c, src/main.c, src/msg.c,
	src/progress.c, src/tree.c, src/util.c: Fix up some build warnings
	as reported by Ross Burton and his amazing gcc 3.3 techno machine.
2003-06-04 12:53:46 +00:00
Mike Newman 626d95b752 Add --auto-close option to progress dialog. Closes dialog when 100% has been reached. Also update docs for new option. Fixes #114125. 2003-06-03 21:52:16 +00:00
Mike Newman 25d20adbd1 Fix typo in gdialog wrapper. Sensitize OK button in progress when 100% reached. 2003-05-24 09:15:50 +00:00