Commit graph

22 commits

Author SHA1 Message Date
Maxim Ermilov
c2211ffe0b Use accessor functions instead direct access
https://bugzilla.gnome.org/show_bug.cgi?id=597888
2010-04-22 17:38:59 +04:00
Javier Jardón
825434bbcd Remove GTK+ deprecated symbols
https://bugzilla.gnome.org/show_bug.cgi?id=572325
2010-04-13 19:34:52 +02:00
Matthias Clasen
de51788c8d Lock all the screens
Gray out all the monitors properly when the typing break is on.

https://bugzilla.gnome.org/show_bug.cgi?id=492974
2010-03-10 12:21:19 +00:00
Jens Granseuer
543251c2c6 [typing-break] Reset timer after suspend
This patch does 2 things:
1) Defines a DrwTimer that we use instead of GTimer. This is just a thin
wrapper around g_get_current_time, and it means we can accurately track
typing/idle periods based on real-world wall-clock time, which GTimer is
apparently not intended to do.

2) The typing monitor has some complicated state handling where it transitions
between an IDLE state and a TYPING state. This transition is based on running a
callback once per second, and checking whether any keystrokes have been
recorded since the last time the callback was called. The actual idle *time* is
tracked separately, independently of these two states, but only when we are in
the IDLE *state* was the idle *time* checked to see if we should reset the
break timer. This leads to a race condition -- if we suspend while in the
TYPING state, then eventually we will wake up, notice that no key press has
happened in the last second, *reset the idle timer*, transition to the IDLE
state, and then check the amount of time on the idle timer. We will thus never
notice the amount of time that the computer was suspended.

I considered making the IDLE/TYPING transition code smarter, but it turns out
the desired behavior for the two states is entirely identical anyway, so rather
than adding more complexity to this pointless code, I just diked it out and
replaced them both by a single state called RUNNING.

Closes bug #430797.
2009-11-11 19:39:57 +01:00
Tim Waugh
1fd84f3672 [typing-break] Increase delay for activating the postpone button to 5s
When the typing break screen is displayed and break postponements are enabled,
there is a 500ms delay before the 'Postpone' button becomes sensitive.
Increase that delay to 5000ms (5s).

Rationale:
When I'm really focused on something I will click the 'Postpone' button, or
even use the keyboard short-cut Alt-P, so that I can carry on with what I was
doing.  Then later I won't even remember having done it.  This can happen
several times in a row.  I'm sure it happens this way for other people too.

With a 5s delay before a break can be postponed it gives the user time to think
about whether they really need to carry on with what they were doing or if it
can wait after all.

Closes bug #597086.
2009-11-08 11:14:35 +01:00
Jens Granseuer
1a01a9a670 Patch by: Maxim Ermilov <zaspire@rambler.ru>
2009-01-31  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Maxim Ermilov <zaspire@rambler.ru>

	* configure.in: add optional dependency on libcanberra-gtk for bug
	#169473

2009-01-31  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Maxim Ermilov <zaspire@rambler.ru>

	* Makefile.am:
	* drw-break-window.c: (drw_break_window_init), (clock_timeout_cb):
	play a sound when the display is locked or unlocked (bug #169473)

svn path=/trunk/; revision=9224
2009-01-31 16:29:35 +00:00
Jens Granseuer
3b4d3d0a65 Patch by: Andrey Gusev <ronne@list.ru>
2008-07-02  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Andrey Gusev <ronne@list.ru>

	* drw-break-window.c: (drw_break_window_init): make the typing break
	window modal so it properly locks the screen when apps like firefox
	are running in fullscreen mode (bug #441786)

svn path=/trunk/; revision=8772
2008-07-02 20:51:16 +00:00
Jens Granseuer
4bdb8a491a amend previous commit to use GTK_STOCK_STOP instead of "gtk-stop"
2008-03-24  Jens Granseuer  <jensgr@gmx.net>

	* drw-break-window.c: (drw_break_window_init): amend previous commit
	to use GTK_STOCK_STOP instead of "gtk-stop"

svn path=/trunk/; revision=8592
2008-03-24 19:52:24 +00:00
Jens Granseuer
93832db960 new Tango-style icons by David Prieto <frandavid100@gmail.com> (bug
2008-03-24  Jens Granseuer  <jensgr@gmx.net>

	* bar*.png: new Tango-style icons by David Prieto
	<frandavid100@gmail.com> (bug #523965)

	* drw-break-window.c: (drw_break_window_init): replace custom stop icon
	by gtk-stop stock icon
	* Makefile.am:
	* stop.png: remove

svn path=/trunk/; revision=8591
2008-03-24 18:11:37 +00:00
Ross Burton
9fac3c0c5a Bump glib requirement to 2.13, for the ~second-accurate timers.
2007-06-05  Ross Burton  <ross@openedhand.com>

	* configure.in:
	Bump glib requirement to 2.13, for the ~second-accurate timers.

2007-06-05  Ross Burton  <ross@openedhand.com>

	* drw-monitor.c:
	* drw-break-window.c:
	* drwright.c:
	Use the second-accurate timers instead of the millisecond timers,
	in an attempt to use less processor time (#443547).

svn path=/trunk/; revision=7692
2007-06-05 16:55:01 +00:00
William Jon McCann
f600be796a Use compositing to display the typing break window when available. Fixes
2007-02-02  William Jon McCann  <mccann@jhu.edu>

	* drw-break-window.c: (drw_break_window_class_init),
	(drw_break_window_init), (drw_break_window_finalize),
	(drw_break_window_dispose), (drw_break_window_new),
	(postpone_sensitize_cb), (clock_timeout_cb), (postpone_cancel_cb),
	(postpone_entry_key_press_event_cb), (postpone_clicked_cb):
	* drw-break-window.h:
	* drw-utils.c: (window_expose_event), (set_pixmap_background),
	(drw_setup_background):
	* drwright.c: (break_window_map_event_cb), (maybe_change_state),
	(create_secondary_break_windows):
	Use compositing to display the typing break window when
	available.  Fixes #363665.


svn path=/trunk/; revision=7233
2007-02-03 00:42:23 +00:00
Kjartan Maraas
422223acaf Don't redefine GNOMELOCALEDIR. Don't use a const char * to allocate and
2006-11-15  Kjartan Maraas  <kmaraas@gnome.org>

	* Makefile.am: Don't redefine GNOMELOCALEDIR.
	* drw-break-window.c: (postpone_entry_activate_cb):
	Don't use a const char * to allocate and free strings.
2006-11-15 17:21:53 +00:00
Richard Hult
c06dae67d1 Don't display a dialog when the monitor is already running, that's an old
2005-11-27  Richard Hult  <richard@imendio.com>

	* main.c: (main): Don't display a dialog when the monitor is
	already running, that's an old remain from when drwright was a
	standalone app. Fixes bug #307425.

	* drw-break-window.c:
	* drwright.c: (popup_break_cb): Use stock icon from GTK+ instead
	of libgnomeui and use i18n includes from glib. Fixes bug #171664.
2005-11-27 12:30:11 +00:00
Rodrigo Moya
87318c8a81 fixed leaked timer.
2005-08-18  Rodrigo Moya <rodrigo@novell.com>

	* drw-break-window.c (drw_break_window_dispose): fixed leaked timer.
2005-08-18 14:23:00 +00:00
Sebastien Bacher
581c37e2bb Cleanup of gconf and a few other things, patch from Kjartan Maraas
2005-05-22  Sebastien Bacher  <seb128@debian.org>

        * ChangeLog capplets/about-me/e-image-chooser.c
        capplets/accessibility/at-properties/at-startup-session.h
        capplets/accessibility/keyboard/accessibility-keyboard.c
        capplets/background/gnome-wp-info.c
        capplets/common/gconf-property-editor.c
        capplets/common/gnome-theme-apply.c
        capplets/default-applications/gnome-default-applications-properties.c
        capplets/keybindings/gnome-keybinding-properties.c
        capplets/keyboard/gnome-keyboard-properties.c
        capplets/mouse/gnome-mouse-properties.c
        capplets/network/gnome-network-preferences.c
        capplets/sound/sound-properties-capplet.c
        capplets/theme-switcher/gnome-theme-details.c
        capplets/theme-switcher/gnome-theme-manager.c
        capplets/ui-properties/gnome-ui-properties.c
        capplets/windows/gnome-window-properties.c
        gnome-settings-daemon/factory.c
        gnome-settings-daemon/gnome-settings-accessibility-keyboard.c
        gnome-settings-daemon/gnome-settings-background.c
        gnome-settings-daemon/gnome-settings-daemon.c
        gnome-settings-daemon/gnome-settings-daemon.h
        gnome-settings-daemon/gnome-settings-font.c
        gnome-settings-daemon/gnome-settings-keybindings.c
        gnome-settings-daemon/gnome-settings-keybindings.h
        gnome-settings-daemon/gnome-settings-keyboard-xkb.c
        gnome-settings-daemon/gnome-settings-keyboard.c
        gnome-settings-daemon/gnome-settings-locate-pointer.h
        gnome-settings-daemon/gnome-settings-mouse.c
        gnome-settings-daemon/gnome-settings-multimedia-keys.c
        gnome-settings-daemon/gnome-settings-screensaver.c
        gnome-settings-daemon/gnome-settings-sound.c
        gnome-settings-daemon/gnome-settings-xmodmap.c
        gnome-settings-daemon/gnome-settings-xrdb.c
        gnome-settings-daemon/gnome-settings-xsettings.c
        libbackground/applier.c libbackground/applier.h
        libbackground/preferences.c libsounds/sound-properties.c
        libsounds/sound-view.h libwindow-settings/gnome-wm-manager.c
        libwindow-settings/metacity-window-manager.c
        typing-break/drw-break-window.c typing-break/drw-utils.h
        typing-break/drwright.c vfs-methods/fontilus/font-view.c
        vfs-methods/themus/themus-theme-applier.c:
        Cleanup of gconf and a few other things,
        patch from Kjartan Maraas <kmaraas@gnome.org> (Closes: #301945).
2005-05-22 15:46:45 +00:00
Richard Hult
b1786abb42 Remove unecessary frame, fixes a bug with the transparent background.
2004-10-14  Richard Hult  <richard@imendio.com>

	* drw-break-window.c (drw_break_window_init): Remove unecessary
	frame, fixes a bug with the transparent background.
2004-10-13 23:39:47 +00:00
Richard Hult
14b9f41c61 Patch from Markus Berg <mberg@hp.com> to fix bug #123141.
2004-07-28  Richard Hult  <richard@imendio.com>

	* drw-break-window.c: Patch from Markus Berg <mberg@hp.com> to fix
	bug #123141.

	* drwright.c: Remove some cruft. Shorten the warning period a bit.
2004-07-27 23:08:47 +00:00
Richard Hult
f253d7e3c7 Don't make the postpone button focused right away, makes the fix for
2004-02-17  Richard Hult  <richard@imendio.com>

	* drw-break-window.c (drw_break_window_init): Don't make the
	postpone button focused right away, makes the fix for #126179 a
	lot better.

	* drwright.c: Don't create break window if we already have one,
	fixes bug #134455. Don't make about box modal, fixes bug #134594.

	* main.c (main): Remove unused variable.
2004-02-17 10:04:37 +00:00
Richard Hult
bc8fe29fe9 Fixes bug #126179:
2004-02-01  Richard Hult  <richard@imendio.com>

	Fixes bug #126179:

	* drw-break-window.c (drw_break_window_init): Add mnemonic to
	postpone button.

	* drwright.c (maybe_change_state): Grab keyboard so the mnemonic
	actually works.
2004-02-02 00:26:26 +00:00
Richard Hult
05294ea934 Multihead support, fixes bug #119827.
2003-08-24  Richard Hult  <richard@imendio.com>

	* Makefile.am:
	* drw-break-window.c:
	* drwright.c: Multihead support, fixes bug #119827.
2003-08-24 16:29:20 +00:00
Richard Hult
f39c8ca372 Remove this and use gnome-i18n.h instead.
2003-06-27  Richard Hult  <richard@imendio.com>

	* typing-break/drw-intl.h: Remove this and use gnome-i18n.h
	instead.

	* typing-break/Makefile.am: Remove drw-intl.h

	* typing-break/drwright.c:
	* typing-break/drwright.h:
	* typing-break/drw-break-window.c: Merge in changes from drwright.
2003-06-27 15:47:32 +00:00
Jonathan Blandford
56057239d5 added the typing break to CVS from drwright.
Thu Jun 26 07:38:45 2003  Jonathan Blandford  <jrb@gnome.org>

	* typing-break/drwright.c: added the typing break to CVS from
	drwright.
2003-06-26 11:40:10 +00:00