Commit Graph

40 Commits

Author SHA1 Message Date
3ea7be06f0 enlarge the text box to accomodate the time info in different locales.
* e-dateedit.c: (create_children): enlarge the text box to accomodate
        the time info in different locales.

svn path=/trunk/; revision=25041
2004-03-12 08:44:23 +00:00
88040b5329 Create the arrows in these widgets as GTK_SHADOW_NONE, since the default
2004-02-26  Rodney Dawes  <dobey@ximian.com>

	* e-cell-renderer-combo.c (ecrc_get_size):
	* e-dateedit.c (create_children):
	* e-dropdown-button.c (e_dropdown_button_construct): Create the
	arrows in these widgets as GTK_SHADOW_NONE, since the default arrow
	type in GTK+ 2.x is flat triangle arrows, and shadow types are
	generally ignored for arrows anyway, and so we don't look ugly with
	themes that handle shadow types on arrows correctly

svn path=/trunk/; revision=24900
2004-02-26 22:20:15 +00:00
c65fbd94c0 Fix for bugzilla bug #51624 and #51627.
2003-12-04  Harry Lu <harry.lu@sun.com>

        Fix for bugzilla bug #51624 and #51627.

        * e-calendar-item.c: (e_calendar_item_selection_add_days):
        set the date to the first day of the month so that user can use
        keyboard's arrow key to select a date.
        (e_calendar_item_set_selection_if_emission): only set selection_changed
        if emission is TRUE.
        * e-calendar.c: (e_calendar_init): add back the "clicked" handler so
        that user can use keyboard to click the button.
         (e_calendar_start_auto_move): no need to move since it is already
        handled by the clicked handler
        (e_calendar_on_prev_clicked), (e_calendar_on_next_clicked): move the
        month here.
        * e-dateedit.c: (e_date_edit_show_date_popup): use gdk_window_focus
        instead of gdk_keyboard_grab so that the focus won't lost if user click
        the button with keyboard.
        (hide_date_popup): no need to call gdk_keyboard_ungrab.

svn path=/trunk/; revision=23642
2003-12-05 02:01:46 +00:00
88d4fd5eac Fixes #1245. ECalendar should be usable with the keyboard
2003-09-19  Bolian Yin <bolian.yin@sun.com>

        Fixes #1245. ECalendar should be usable with the keyboard

        *misc/e-calendar-item.c (e_calendar_item_focus): new func, focus handler.
        (e_calendar_item_key_press_event): new func, key press event handler
        (e_calendar_item_selection_add_days, e_calendar_item_stop_selecting): helpers.
        (e_calendar_item_ensure_days_visible, e_calendar_item_set_selection_if_emission):
         add the flag to control if we should emit e-calendar signals.
        (e_calendar_item_class_init): register focus handler.
        (e_calendar_item_event): add code for GDK_FOCUS_CHANGE and GDK_KEY_PRESS.

        *misc/e-calendar.c (e_calendar_focus): new func, focus handler
        (e_calendar_button_has_focus): new func, if prev/next button has focus.
        (e_calendar_on_next_clicked, e_calendar_on_prev_clicked): click signal handler
         for prev/next buttons.
        (e_calendar_set_focusable): set if the e-calendar is focusable

        *misc/e-dateedit.c (e_date_edit_show_date_popup, hide_date_popup): grab/ungrab gdk keyboard.

svn path=/trunk/; revision=22632
2003-09-22 03:19:00 +00:00
15c8a15ba1 Fixes #15638.
2003-08-27  Hans Petter Jansson  <hpj@ximian.com>

	Fixes #15638.

	* misc/e-dateedit.c (rebuild_time_popup): Make 12-hour time format
	not be zero-padded. Right-align time labels so digits line up.

svn path=/trunk/; revision=22394
2003-08-28 14:27:46 +00:00
9cafe346c6 Added a handler for GtkWidget::mnemonic_activate().
2003-07-11  Federico Mena Quintero  <federico@ximian.com>

	* e-dateedit.c (e_date_edit_mnemonic_activate): Added a handler
	for GtkWidget::mnemonic_activate().

	* e-url-entry.c (mnemonic_activate): Likewise.

svn path=/trunk/; revision=21804
2003-07-13 19:29:03 +00:00
79f2149fd1 Fixes #43775
2003-05-29  JP Rosevear  <jpr@ximian.com>

	Fixes #43775

	* e-calendar-item.c (layout_set_day_text): calculate the day
	character correctly
	(e_calendar_item_draw_month): use it

	* e-dateedit.c (rebuild_time_popup): use e_utf8_strftime
	(e_date_edit_update_date_entry): ditto
	(e_date_edit_update_time_entry): ditto

	* e-calendar-item.c (layout_set_day_text): calculate the day
	character correctly
	(e_calendar_item_draw_month): use e_utf8_strftime and above
	(e_calendar_item_show_popup_menu): use e_utf8_strftime
	(e_calendar_item_recalc_sizes): use layout_set_day_text

svn path=/trunk/; revision=21352
2003-05-30 17:32:31 +00:00
a972ac3590 [ fixes bug #42177 ] remove the CAN_FOCUS flag.
2003-05-11  Chris Toshok  <toshok@ximian.com>

	[ fixes bug #42177 ]
	* e-dateedit.c (e_date_edit_init): remove the CAN_FOCUS flag.

svn path=/trunk/; revision=21146
2003-05-11 21:57:25 +00:00
fa9dddd005 Remove this so that GtkContainer's destroy method will destroy all of the
* e-dateedit.c (e_date_edit_forall): Remove this so that
        GtkContainer's destroy method will destroy all of the internal
        widgets. (This is how other compound-widgets-that-aren't-
        meant-to-be-used-as-containers behave.) #41458

svn path=/trunk/; revision=21003
2003-04-29 16:59:12 +00:00
f446063c57 Same as below.
2003-02-25  Jeffrey Stedfast  <fejj@ximian.com>

	* e-dateedit.c (on_date_popup_date_selected): Same as below.

	* e-cell-date-edit.c (e_cell_date_edit_on_ok_clicked): Also
	updated to use the new GDate API from glib 2.0

	* test-calendar.c (on_selection_changed): Fixed to use glib 2.0's
	GDate API.

	* e-calendar-item.c (e_calendar_item_get_week_number): Port to
	glib 2.0's GDate API.
	(e_calendar_item_set_selection): Same.

	* e-search-bar.c (append_xml_menu_item): Use
	g_string_append_printf instead of g_string_sprintfa since the
	latter is now deprecated.
	(setup_bonobo_menus): Same.

	* e-filter-bar.c (do_advanced): Use gtk_window_set_resizable()

	* e-charset-picker.c: Fixes to make it build cleanly with
	-DG_DISABLE_DEPRECATED
	(add_charset): Escape _'s so we don't get underline weirdness due
	to GtkLabel thinking the _ means to underline the next char.
	(e_charset_picker_bonobo_ui_populate): Same here.

svn path=/trunk/; revision=20048
2003-02-25 07:03:46 +00:00
4a84630875 Don't request combo boxes that are 0 pixels tall. (position_date_popup):
2003-02-01  Hans Petter Jansson  <hpj@ximian.com>

	* e-dateedit.c (create_children): Don't request combo boxes that are
	0 pixels tall.
	(position_date_popup): Make this work when the button doesn't have
	its own window.

svn path=/trunk/; revision=19704
2003-02-02 03:07:00 +00:00
4354c0ac03 Add include of gnome-dialog.h
2002-11-27  Not Zed  <NotZed@Ximian.com>

        * e-charset-picker.c: Add include of gnome-dialog.h

        * *.[ch]: ran fix.sh script over everything.

svn path=/trunk/; revision=18978
2002-12-02 03:28:22 +00:00
f9ea4ba866 port to GObject.
2002-11-11  Chris Toshok  <toshok@ximian.com>

	* e-dateedit.[ch]: port to GObject.

svn path=/trunk/; revision=18717
2002-11-12 03:26:44 +00:00
9c73777f22 First big sync of my GNOME 2 porting work (incomplete, and still
pretty broken).

Weeeeee!

svn path=/trunk/; revision=18503
2002-11-02 08:25:03 +00:00
8b36f00ff0 don't adjust for two digit dates here, the e_time_parse routines do that
2002-08-22  JP Rosevear  <jpr@ximian.com>

	* e-dateedit.c (e_date_edit_parse_date): don't adjust for two
	digit dates here, the e_time_parse routines do that now

svn path=/trunk/; revision=17834
2002-08-22 15:40:39 +00:00
57d95cb3b7 updated to new version from Ximian Setup Tools. Fixes bug #7641.
2001-11-28  Damon Chaplin  <damon@ximian.com>

	* e-map.c: updated to new version from Ximian Setup Tools.
	Fixes bug #7641.

2001-11-27  Damon Chaplin  <damon@ximian.com>

	* e-dateedit.c (e_date_edit_get_date): if allow_no_date_set is FALSE,
	return the last valid date entered, even if the field is currently
	empty. Fixes bug #15749.

svn path=/trunk/; revision=14817
2001-11-28 22:11:07 +00:00
9ab4c3e6cd set both the date and the time of day in one call, creating only a single
2001-11-05  JP Rosevear  <jpr@ximian.com>

	* e-dateedit.c (e_date_edit_set_date_and_time_of_day): set both
	the date and the time of day in one call, creating only a single
	changed signal

	* e-dateedit.h: add proto

svn path=/trunk/; revision=14602
2001-11-06 00:05:54 +00:00
9590a301d5 emit signal when time set to none/empty.
2001-10-30  Damon Chaplin  <damon@ximian.com>

	* e-dateedit.c (e_date_edit_set_time_of_day): emit signal when time
	set to none/empty.

svn path=/trunk/; revision=14502
2001-10-30 23:28:27 +00:00
cf4dbf9ee3 ref the ECalendarItem and check if it gets destroyed, to try to avoid a
2001-10-29  Damon Chaplin  <damon@ximian.com>

	* e-calendar-item.c (e_calendar_item_signal_emission_idle_cb): ref
	the ECalendarItem and check if it gets destroyed, to try to avoid a
	free memory write.

	* e-dateedit.c (e_date_edit_set_time_of_day): allow setting the time
	to empty by passing hour as -1.

svn path=/trunk/; revision=14394
2001-10-30 01:37:52 +00:00
08fb7329cb Fixing the license text.
svn path=/trunk/; revision=14212
2001-10-27 16:59:46 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
46dd4414b9 clear the struct tm fields to keep purify happy.
2001-10-23  Damon Chaplin  <damon@ximian.com>

	* e-dateedit.c (e_date_edit_check_date_changed):
	(e_date_edit_check_time_changed): clear the struct tm fields to keep
	purify happy.

svn path=/trunk/; revision=13959
2001-10-23 21:38:27 +00:00
093c2a884d Keep us from reading tmp_tm uninitialized, so purify won't complain.
2001-10-20  Jon Trowbridge  <trow@ximian.com>

	* e-dateedit.c (e_date_edit_check_date_changed): Keep us from
	reading tmp_tm uninitialized, so purify won't complain.

svn path=/trunk/; revision=13831
2001-10-20 22:57:19 +00:00
f0c38138fa grab focus to the date entry or the time entry, depending on which is
2001-09-18  Damon Chaplin  <damon@ximian.com>

	* e-dateedit.c (e_date_edit_grab_focus): grab focus to the date entry
	or the time entry, depending on which is visible. Fixes bug #7237.

svn path=/trunk/; revision=13185
2001-09-27 03:43:07 +00:00
6d1f104d1e add prototype for e_date_edit_set_editable.
2001-09-16  Chris Toshok  <toshok@ximian.com>

	* e-dateedit.h: add prototype for e_date_edit_set_editable.

	* e-dateedit.c (e_date_edit_set_editable): new function, analogous
	to gtk_entry_set_editable: let's the user select but not edit (or
	in this case, bring up the calendar view.)

svn path=/trunk/; revision=12867
2001-09-17 02:58:58 +00:00
a7da845f7f added e_date_edit_get/set_make_time_insensitive() which makes the time
2001-08-16  Damon Chaplin  <damon@ximian.com>

	* e-dateedit.c: added e_date_edit_get/set_make_time_insensitive()
	which makes the time field insensitive rather than hiding it.
	I'm not sure we're going to actually use this now, though.

svn path=/trunk/; revision=12135
2001-08-16 23:25:45 +00:00
b3b1380f85 Fixes bug #2901.
2001-07-16  Federico Mena Quintero  <federico@ximian.com>

	Fixes bug #2901.

	* e-dateedit.c (e_date_edit_parse_date): Use e_time_parse_date().
	(e_date_edit_parse_time): Use e_time_parse_time().

svn path=/trunk/; revision=11137
2001-07-16 21:25:01 +00:00
bacd3a85a4 added functions to set a callback to get the current time, which is used
2001-07-02  Damon Chaplin  <damon@ximian.com>

	* e-calendar-item.c:
	* e-cell-date-edit.c:
	* e-dateedit.c: added functions to set a callback to get the current
	time, which is used instead of localtime(). We need this as we have to
	use our own timezones.

svn path=/trunk/; revision=10728
2001-07-03 04:12:17 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
0345c9047d Added #include <glib.h> and moved corresponding local headers to the top.
2001-04-24  Kjartan Maraas  <kmaraas@gnome.org>

	* e-calendar-item.c, e-calendar.c, e-cell-date-edit.c,
	e-clipped-label.c: Added #include <glib.h> and moved
	corresponding local headers to the top.

svn path=/trunk/; revision=9540
2001-04-24 09:26:28 +00:00
af777b08ca More header fixes. Same. Same. Same here. More header fixes. Same here.
2001-04-04  Kjartan Maraas  <kmaraas@gnome.org>

	* e-calendar.c: More header fixes.
	* e-cell-date-edit.c: Same.
	* e-dateedit.[ch]: Same.
	* e-title-bar.c: Same here.
	* e-search-bar.c: More header fixes.
	* test-calendar.c: Same here.

svn path=/trunk/; revision=9178
2001-04-04 18:46:01 +00:00
45a037eef5 #include <time.h>
2000-12-14  Federico Mena Quintero  <federico@helixcode.com>

	* e-dateedit.h: #include <time.h>

svn path=/trunk/; revision=7034
2000-12-15 00:06:07 +00:00
cc43237879 updated to emit "changed" when appropriate, which turned out to be
2000-10-26  Damon Chaplin  <damon@helixcode.com>

	* e-dateedit.[hc]: updated to emit "changed" when appropriate, which
	turned out to be amazingly difficult :(
	Also added e_date_edit_get/set_date() to get/set just the date.
	Added e_date_edit_date_is_valid() & e_date_edit_time_is_valid() so
	you can check if the user has tried to enter an invalid date.
	(All the get_date/time functions return the last valid date entered.)

	* test-dateedit.c: updated a bit.

svn path=/trunk/; revision=6672
2000-11-26 23:10:17 +00:00
9bbf4be3ac Removed the "time_changed" signal, since it was never being emitted in the
2000-11-02  Federico Mena Quintero  <federico@helixcode.com>

	* e-dateedit.h (EDateEditClass): Removed the "time_changed"
	signal, since it was never being emitted in the first place.  Time
	values *are* both date and time together anyways, so whenever one
	changes we should notify about the whole date/time value being
	changed.
	Renamed the remaining "date_changed" signal to just "changed".

	* e-dateedit.c (e_date_edit_class_init): Do not create the
	"time_changed" signal; rename the other one to "changed".
	(set_time): Moved the core functionality from
	e_date_edit_set_time() to here.  This function just sets the
	widgets' values without emitting any signals.
	(e_date_edit_set_time): Emit the "changed" signal unconditionally.
	This is to be consistent with the rest of the GTK+ widgets, and it
	actually makes writing client code easier.
	(e_date_edit_new): Use set_time().
	(on_date_popup_now_button_clicked): Do not emit the signal here.
	(on_date_popup_none_button_clicked): Likewise.
	(e_date_edit_set_time_of_day): Emit the signal, since we do not
	call e_date_edit_set_time().

svn path=/trunk/; revision=6367
2000-11-03 18:15:54 +00:00
c3abfc7154 Do not unref the cal_popup since we already destroyed it.
2000-10-27  Federico Mena Quintero  <federico@helixcode.com>

	* e-dateedit.c (e_date_edit_destroy): Do not unref the cal_popup
	since we already destroyed it.

svn path=/trunk/; revision=6244
2000-10-28 00:48:42 +00:00
fb19241a19 fixed to recalculate min_cell_width/height in case the show_week_numbers
2000-10-11  Damon Chaplin  <damon@helixcode.com>

	* e-calendar-item.c (e_calendar_item_recalc_sizes): fixed to
	recalculate min_cell_width/height in case the show_week_numbers option
	is changed.

	* e-dateedit.c: added support for hiding the date field, and added
	get/set_time_of_day() functions to get/set just the time.

svn path=/trunk/; revision=5854
2000-10-11 18:03:52 +00:00
32d2e7c670 better i18n of strftime strings.
2000-09-30  Damon Chaplin  <damon@helixcode.com>

	* e-calendar-item.c:
	* e-dateedit.c: better i18n of strftime strings.

svn path=/trunk/; revision=5645
2000-09-30 15:26:53 +00:00
bfa2f69ce5 use pixmaps instead of GtkArrows to look better. Also set the canvas
2000-09-23  Damon Chaplin  <damon@helixcode.com>

	* e-calendar.c: use pixmaps instead of GtkArrows to look better.
	Also set the canvas window's background when realized so that we can
	set the button reliefs to none.

2000-09-22  Damon Chaplin  <damon@helixcode.com>

	* test-dateedit.c: updated a bit, adding a few EDateEdits with
	different options.

	* e-calendar-item.c (e_calendar_item_set_selection): aborted any
	current selection operation and initialize all of the selection fields.
	(e_calendar_item_unmap): new function to abort any current selection
	operation. Otherwise GnomeCanvas gets in a muddle about grabs.

	* e-dateedit.c: marked some strftime()/strptime() format strings for
	translation and used "%m/%d/%Y" instead of "%x" so we get the complete
	year number. Also changed e_date_edit_get_time() so it returns -2 if
	it can't parse the date or time, and -1 if it is explicitly set to
	None.
	(e_date_edit_parse_date): new function to parse the date string and
	add on the current century if a year of 0-99 is entered.

2000-09-21  Damon Chaplin  <damon@helixcode.com>

	* e-dateedit.c (on_date_button_clicked): only check return of strptime
	for NULL. It should now select the correct day set in the popup.

	* e-calendar.c:
	* e-calendar-item.c:
	* test-calendar.c: removed support for buttons within the ECalendar.
	It is cleaner to add them outside it, as EDateEdit does.

svn path=/trunk/; revision=5561
2000-09-24 16:16:20 +00:00
69f1890908 set this to 4 to specify how much X/Open we want with that.
* e-dateedit.c (_XOPEN_SOURCE): set this to 4 to specify how much
	X/Open we want with that.

svn path=/trunk/; revision=5491
2000-09-18 19:55:34 +00:00
3ef38d9cc0 added e-dateedit.[hc] and the test-dateedit app.
2000-09-11  Damon Chaplin  <damon@helixcode.com>

	* Makefile.am (libemiscwidgets_a_SOURCES): added e-dateedit.[hc]
	and the test-dateedit app.

	* e-dateedit.[hc]: new widget to use instead of GnomeDateEdit. It
	uses the new ECalendar widget for the calendar and also supports
	"None", "Today" and "Now" buttons, and goes away with a single click.

	* test-dateedit.c: app to test the EDateEdit widget.

	* e-calendar-item.c: updated to support the EDateEdit better,
	mainly by adding the "move_selection_when_moving" arg so we can turn
	it off to keep the same day selected when changing the months shown.

svn path=/trunk/; revision=5304
2000-09-10 23:22:51 +00:00