Commit Graph

316 Commits

Author SHA1 Message Date
Matthias Clasen
d02831a46b make it compile 2006-06-08 04:10:09 +00:00
Matthias Clasen
6ea0b7d046 Adjust Delete insensitivity 2006-06-08 03:51:21 +00:00
Matthias Clasen
e1e8a9b504 Make drops end up at the right spot. (#342072, Yevgen Muntyan)
2006-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_drag_data_received): Make drops
	end up at the right spot.  (#342072,  Yevgen Muntyan)
2006-05-18 16:42:56 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Matthias Clasen
660f089880 Improve positioning of the menu when popped up by keynav. (#334987,
2006-04-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (popup_position_func): Improve positioning
	of the menu when popped up by keynav.  (#334987, Christian
	Persch)
2006-04-27 18:50:39 +00:00
Matthias Clasen
adf11020fd Fix typos in property blurbs. (#338772, Clytie Siddall)
2006-04-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksettings.c (gtk_settings_class_init):
	* gtk/gtkentry.c (gtk_entry_class_init): Fix typos
	in property blurbs.  (#338772, Clytie Siddall)
2006-04-17 12:59:01 +00:00
Michael Natterer
f98506b1f3 renamed last-char-timeout to password-hint-timeout and store all its data
2006-03-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkentry.c: renamed last-char-timeout to
	password-hint-timeout and store all its data in a struct attached
	as QData.

	* gtk/gtkcellrendererspin.c: fix typo in #include.
2006-03-22 16:17:52 +00:00
Michael Natterer
eb313fc8e4 applied modified patch from maemo-gtk which allows the most recently
2006-03-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkentry.c: applied modified patch from maemo-gtk which
	allows the most recently entered character in a hidden entry to be
	shown for a configurable period of time. Fixes bug #334560.
2006-03-22 14:06:40 +00:00
Michael Natterer
1d2bcff97d applied refactored patch from maemo-gtk that replaces the INNER_BORDER
2006-03-10  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkentry.[ch]: applied refactored patch from maemo-gtk that
	replaces the INNER_BORDER define by an "inner-border" style
	property of type GtkBorder. Additionally, add an "inner-border"
	object property plus API which allows to override any theme
	border, to allow pixel-perfect positioning of entries for inline
	editing. Fixes bug #333922.

	* gtk/gtk.symbols: add the new public functions.
2006-03-10 10:30:36 +00:00
Michael Natterer
3961acfb68 make sure that the text_area_width is always >= 0. Fixes bug #316712 (Dan
2006-03-08  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkentry.c (gtk_entry_adjust_scroll): make sure that the
	text_area_width is always >= 0. Fixes bug #316712 (Dan Winship).
2006-03-08 14:04:53 +00:00
Matthias Clasen
ea6731b779 Remove an unused variable.
2006-01-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_drag_data_received): Remove
	an unused variable.
2006-01-15 04:44:26 +00:00
Matthias Clasen
a7a85ac867 Shrink the private structs of these a bit.
2006-01-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.[hc]:
	* gtk/gtklabel.[hc]: Shrink the private structs of these a bit.
2006-01-08 07:54:43 +00:00
Matthias Clasen
438e7e9040 When deleting words, delete preceding whitespace as well. (#325358, Akkana
2006-01-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_delete_from_cursor): When deleting
	words, delete preceding whitespace as well.  (#325358,  Akkana Peck)
2006-01-03 03:56:44 +00:00
Matthias Clasen
36a2bde0d1 Connect to notify instead of multiple detailed signals.
2005-12-31  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkaction.c:
        * gtk/gtkentry.c: Connect to notify instead of multiple
        detailed signals.
2005-12-31 07:06:31 +00:00
Michael Natterer
f41db86239 implement boolean property "truncate-multiline" which, when enabled,
2005-12-19  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkentry.c: implement boolean property "truncate-multiline"
	which, when enabled, truncates multi-line pastes or drops to their
	first line. Fixes bug #322252.

	* gtk/gtkfilechooserentry.c (gtk_file_chooser_entry_init): enable
	truncate-multiline here.
2005-12-19 19:03:51 +00:00
Matthias Clasen
fce9359e47 Include gtkimcontextsimple.h (#322235, Kazuki IWAMOTO)
2005-11-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c: Include gtkimcontextsimple.h  (#322235,
	Kazuki IWAMOTO)
2005-11-23 14:35:05 +00:00
Matthias Clasen
c8bab6c3d5 Turn off input methods in invisible entries, since they are confusing.
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	Turn off input methods in invisible entries, since
	they are confusing.  (#317002, James Su)

	* gtk/gtkentry.c (gtk_entry_set_visibility): Toggle input
	methods if visibility changes.
	(popup_targets_received): Don't show the input method
	menu if the entry is invisible.
2005-11-18 19:13:11 +00:00
Matthias Clasen
f2724a2515 Add settings to hide the input method and Unicode control character
2005-10-24  Matthias Clasen  <mclasen@redhat.com>

        Add settings to hide the input method and Unicode control character
        submenus in the context menus of GtkEntry and GtkTextView.

        * gdk/x11/gdkevents-x11.c: Map GTK+ settings to X settings.

        * gtk/gtksettings.c (gtk_settings_class_init): Declare GTK+ settings here.

        * gtk/gtktextview.c (popup_targets_received):
        * gtk/gtkentry.c (popup_targets_received): Use the settings here.
2005-10-24 20:01:57 +00:00
Johan Dahlin
a8a097c08f Mention NULL in documentation.
* gtk/gtkentry.c (gtk_entry_set_completion): Mention NULL in
    documentation.
2005-09-20 15:20:11 +00:00
Matthias Clasen
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +00:00
Matthias Clasen
4957e325c0 Let GDK_Return pass through in some more cases.
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
	Let GDK_Return pass through in some more cases.

	* gtk/gtkentry.c (gtk_entry_key_press): Reset the im context before
	activating the entry.
2005-09-13 18:50:39 +00:00
Matthias Clasen
af89d145f7 Use gdk_atom_intern_static_string() where appropriate.
* gtk/*.c:  Use gdk_atom_intern_static_string() where
	appropriate.
2005-09-11 05:48:27 +00:00
Matthias Clasen
a809ae2a81 Disconnect idle handlers on destroy to avoid problems when they are called
2005-09-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_destroy): Disconnect idle handlers
	on destroy to avoid problems when they are called on a destroyed
	widget.  (#315135, John Cupitt)
2005-09-02 19:48:53 +00:00
Matthias Clasen
ade8ec4c4e Add bindings for Ctrl-Shift-A to unselect all. (#309301, Kathy Fernandes)
2005-09-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_class_init):
	* gtk/gtktextview.c (gtk_text_view_class_init): Add bindings
	for Ctrl-Shift-A to unselect all.  (#309301, Kathy Fernandes)
2005-09-02 18:23:10 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
f4bbe8f0de Also intern static strings passed to g_object_set_data() 2005-08-31 17:58:55 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00
Matthias Clasen
fc8d9dc2bd Add key bindings to make C-/ select all and C-\ unselect all. (#309301,
2005-08-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_class_init): Add key bindings to
	make C-/ select all and C-\ unselect all.  (#309301,
	Kathy Fernandez)
2005-08-30 18:38:17 +00:00
Matthias Clasen
cc39b38159 Fix some unused code. (#313946, Christian Persch)
2005-08-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_draw_frame): Fix some unused
	code.  (#313946, Christian Persch)
2005-08-30 16:09:03 +00:00
Matthias Clasen
a8bbf97a30 More typo fixes 2005-08-29 23:52:32 +00:00
Matthias Clasen
4dfca1aa6b Construct the "Select All" menuitem from stock.
2005-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (popup_targets_received):
	* gtk/gtkentry.c (popup_targets_received): Construct
	the "Select All" menuitem from stock.

	* gtk/stock-icons/stock_select_all_{16,24}.png:
	* gtk/stock-icons/Makefile.am:
	* gtk/gtkiconfactory.c:
	* gtk/gtkstock.h:
	* gtk/gtkstock.c: Add a "Select All" stock item.  (#78545,
	Calum Benson)
2005-08-29 20:01:28 +00:00
Matthias Clasen
b358753ae0 Clarify that the returned layout must not be modified.
2005-08-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_get_layout): Clarify that the
	returned layout must not be modified.
2005-08-21 01:57:01 +00:00
Kristian Rietveld
c45de61fcb don't iterate past the end of the string, so pango_layout_get_cursor_pos()
2005-07-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkentry.c (gtk_entry_move_forward_word): don't iterate
	past the end of the string, so pango_layout_get_cursor_pos() won't
	complain. (#309211, Tommi Komulainen).
2005-07-19 21:09:03 +00:00
Matthias Clasen
0fce36bbc5 Don't treat whitespace as words for keynav, pointed out by Owen Taylor.
2005-07-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_move_forward_word):
	(gtk_entry_move_backward_word): Don't treat whitespace as
	words for keynav, pointed out by Owen Taylor.
2005-07-15 15:30:47 +00:00
Matthias Clasen
13a341e0e9 When dragging text, use a drag icon showing the (ellipsized) text that is
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	When dragging text, use a drag icon showing the (ellipsized)
	text that is being dragged: (#161132, Kevin Duffus, patch
	by Carlos Garnacho Parro)

	* gtk/gtktextutil.h:
	* gtk/gtktextutil.c (_gtk_text_util_create_drag_icon): Add
	a function to create a pixmap for use when dragging text.

	* gtk/gtktextview.c (gtk_text_view_start_selection_dnd):
	* gtk/gtklabel.c (gtk_label_motion):
	* gtk/gtkentry.c (gtk_entry_motion_notify): Use a drag icon
	showing the text being dragged.

2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_move_forward_word)
	(gtk_entry_move_backward_word): Match the text view change
	to allow selecting whitespace with double-click.
2005-07-11 17:51:54 +00:00
Matthias Clasen
6bd2df1ad5 Add a property to suppress the popup for single matches. (#154711)
2005-05-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkentrycompletion.c: Add a property to suppress the
	popup for single matches.  (#154711)

	* gtk/gtkentry.c (gtk_entry_completion_timeout): Respect it here.

	* gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_set_action):
	Use it here.
2005-05-26 20:36:36 +00:00
Matthias Clasen
911a8a63c3 Don't blink the cursor if the entry is not editable. (#304171,Nikos
2005-05-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (cursor_blinks): Don't blink the cursor if
	the entry is not editable.  (#304171,Nikos Kouremenos)
2005-05-16 21:14:05 +00:00
Owen Taylor
dda40ca71a Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to
2005-05-11  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
	to draw the swatch in to avoid having an extraneous window.

	* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
	color when !has_opacity.

2005-05-10  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
	files for Cairo convenience functionality.

	* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
	convenience functions to add GdkRectangle, GdkRegion to a cairo path.

	* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
	gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().

	* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
	gdk_drawable_create_cairo_context() to gdk_cairo_create().

	* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
	Rename gdk_pixbuf_set_as_cairo_source() to
	gdk_cairo_set_source_pixbuf().

	* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
	gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
	Adjust for renames.

	* gdk/gdk.symbols: Update.

	* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
	coordinate system problem that was causing the wrong portions
	to be invalidated.

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
	gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
	gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
	gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
	gtk/gtkcellview.c (gtk_cell_view_expose)
	gtk/gtkdnd.c (gtk_drag_highlight_expose)
	gtk/gtkentry.c (gtk_entry_draw_text)
	gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.

	* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
	GTK+ style ... use instance-private data and standard names for
	private structure, etc. Move function docs inline.

	* gtk/gtkcalendar.[ch]: Switch to drawing everything in
	expose. Switch drawing to Cairo.

	* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
	gtk_calendar_freeze/thaw
2005-05-11 19:16:19 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
	GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
	their G_ counterparts, but also mark the name, nick
	and blurb as static.

	* gtk/*.c: Mark param spec strings as static, using
	the new macros.
2005-03-22 02:14:55 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gtk/grk.symbols: Group symbols by header and source file.
	* gtk/makegtkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegtkalias.pl -def
	* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
	this file.
	* gtk/*.c: Include gtkalias.h after the other headers,
	include gtkaliasdef.c at the bottom.
	* gtk/*.h: Small cleanups.
2005-03-20 07:01:23 +00:00
Matthias Clasen
0e86016442 Document that inline completion requires text-column to be set.
2005-03-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_class_init):
	Document that inline completion requires text-column to be set.
	(gtk_entry_completion_compute_prefix): Return NULL if text-column
	is not set.

	* gtk/gtkentry.c (check_completion_callback): Call
	gtk_entry_completion_complete() before inserting the prefix,
	otherwise the prefix may depend on (random) state of the
	filter model.
2005-03-15 15:00:11 +00:00
Matthias Clasen
263bce4445 x
2005-03-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init):
	* gtk/gtkrange.c (gtk_range_class_init):
	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
	* gtk/gtktexttag.c (gtk_text_tag_class_init):
	* gtk/gtktextview.c (gtk_text_view_class_init):
	* gtk/gtkscrollbar.c (gtk_scrollbar_class_init):
	* gtk/gtknotebook.c (gtk_notebook_class_init):
	* gtk/gtkentry.c (gtk_entry_class_init):
	* gtk/gtkexpander.c (gtk_expander_class_init):
	* gtk/gtkarrow.c (gtk_arrow_class_init):
	* gtk/gtkalignment.c (gtk_alignment_class_init):
	* gtk/gtkbutton.c (gtk_button_class_init):
	* gtk/gtklabel.c (gtk_label_class_init):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_class_init):
	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init): x
	* gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init):
	* gtk/gtktreeview.c (gtk_tree_view_class_init):
	* gtk/gtkbox.c (gtk_box_class_init):
	* gtk/gtkwindow.c (gtk_window_class_init, gtk_window_class_init):
	* gtk/gtkcontainer.c (gtk_container_class_init):
	* gtk/gtkwidget.c (gtk_widget_class_init):
	* gtk/gtkobject.c (gtk_object_class_init): Use canonical names
	when registering param specs.
2005-03-09 04:04:40 +00:00
Matthias Clasen
2d6557175f Avoid spurious selection of RTL direction if the widget does not have
2005-02-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_create_layout): Avoid spurious
	selection of RTL direction if the widget does not have
	focus.  (#164125, Frederic Crozat)
2005-02-04 15:37:48 +00:00
Matthias Clasen
1d0c7ea1bb Fix many instances of "the the" in docs and comments. (#165815, Masao
2005-02-01  Matthias Clasen  <mclasen@redhat.com>

	* */*.c: Fix many instances of "the the" in docs and
	comments.  (#165815, Masao Mutoh)
2005-02-01 18:15:09 +00:00
Matthias Clasen
d5102464a3 Don't allow -1 as minimum-key-length. (gtk_entry_completion_set_model):
2005-01-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_class_init):
	Don't allow -1 as minimum-key-length.
	(gtk_entry_completion_set_model): Add missing notification.
	(gtk_entry_completion_set_minimum_key_length): Add missing
	notification, allow setting minimum-key-length to 0.  (#165194,
	Vincent Ladeuil)
2005-01-26 06:46:51 +00:00
Matthias Clasen
65f799ab2d Prefer LTR over RTL if the keymap is neutral. 2005-01-16 03:43:26 +00:00
Anders Carlsson
21ad6be6ad Really handle a NULL model, fixes #137211 for real.
2004-10-25  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtkentry.c: (gtk_entry_completion_timeout):
	* gtk/gtkentrycompletion.c: (gtk_entry_completion_set_model),
	(gtk_entry_completion_get_model), (gtk_entry_completion_complete):
	Really handle a NULL model, fixes #137211 for real.

	* gtk/gtkfilechooserentry.c:
	(gtk_file_chooser_entry_maybe_update_directory):
	Remove _clear, #137211 is fixed.

	* tests/testentrycompletion.c: (main):
	Add completion with an empty model.
2004-10-26 15:53:32 +00:00
Matthias Clasen
81229a1b0b Document how to use info with text/image targets.
2004-10-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c: Document how to use info with text/image
	targets.

	* gtk/gtkselection.h:
	* gtk/gtkselection.c (gtk_target_list_add_text_targets):
	(gtk_target_list_add_image_targets): Add info argument.

	* gtk/gtkcalendar.c (gtk_calendar_motion_notify):
	* gtk/gtkentry.c (gtk_entry_init):
	* gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.
2004-10-22 17:27:06 +00:00