Commit Graph

480 Commits

Author SHA1 Message Date
Michael Natterer
7be2ea823d Bug 659406 - Abstract what triggers a context menu
Add _gtk_button_event_triggers_context_menu() and use it instead
of checking for event->button == 3, so context menus are invoked
correctly on the Mac.
2011-09-19 00:32:52 +02:00
Michael Natterer
2666c0e71f app: abstract which modifiers are used for extending and modifying selections
which are SHIFT and MOD2 on the Mac, and SHIFT and CONTROL otherwise.
Use the new define all over the place and rename variables and
members to not say "shift" or "control".
2011-09-17 20:05:33 +02:00
Javier Jardón
1516be6f69 gtk: Use 'const' instead G_RETURN_CONST 2011-06-15 19:03:44 +01:00
Matthias Clasen
d69cbfd374 Document some GtkEntry functions as going away in GTK+ 3
https://bugzilla.gnome.org/show_bug.cgi?id=646773
2011-04-06 00:44:13 -04:00
Pavel Holejsovsky
6e178a69fc [GI] Add missing (out) and (array) annotations
Backported from master commit 2fb1c064.
2011-03-16 10:45:35 +01:00
Matthias Clasen
9862894317 Don't use GDK_NONE when GDK_SELECTION_CLIPBOARD is meant 2011-03-14 10:18:35 -04:00
Martin Pitt
e48f5b4073 Backport a lot of GI transfer annotations
This dramatically improves using GTK2 with g-i.

Taken from master commit e0aa12eb0a without the non-documentation changes.
2011-01-10 14:43:00 -06:00
Matthias Clasen
b2bd11618f Don't access GdkDragContext fields directly
Instead use the accessors.
2010-12-21 09:54:13 -05:00
Tristan Van Berkom
53ff5679f7 Fixed gtk_entry_set_icon_tooltip_text & markup to not crash
Setting this property before the icon is actually set was
resulting in a crash (found by way of Glade bug 606103).
2010-12-17 18:17:45 +09:00
Michael Natterer
95f588dc78 gtk: draw the progress only on the text area
so it doesn't extend under GtkSpinButton's buttons.
2010-11-16 19:28:12 +01:00
Kristian Rietveld
3258af741e Use gdk_window_ accessors instead of gdk_drawable_ accessors if possible
The gdk_drawable_ accessors were deprecated.  Removes a lot of
compile-time warnings and eventually also makes things work again
on Mac (miscompile due to the missing prototypes).
2010-10-19 10:37:15 +02:00
Matthias Clasen
9f08f69f4b Don't use newly deprecated gdk_drawable apis
https://bugzilla.gnome.org/show_bug.cgi?id=631697
2010-10-08 14:39:17 -04:00
Matthias Clasen
49e18a29b2 Deprecate 'opt-in' style properties
The following style properties are there to let theme engines 'opt-in'
to more correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct behaviour,
and these properties will no longer be there in GTK+ 3:
GtkEntry::state-hint
GtkTreeView::row-ending-details
GtkRange::trough-side-details
GtkRange::stepper-position-details
GtkRange::activate-slider
2010-09-01 22:19:20 -04:00
Benjamin Otte
92055d8d32 entry: replace gdk_draw_pixbuf() call with Cairo version 2010-08-07 02:39:21 +02:00
Javier Jardón
489657f305 Use event instead key in the previous patch 2010-05-05 04:08:23 +02:00
Javier Jardón
fc35cd9bfe Added api to reset the im context in GtkTextView and GtkEntry
Also, added api to allow an input method to internally handle
key press and release events in the GtkTextView and GtkEntry
cases.
This is simply a wrapper to the gtk_im_context_filter_keypress()
function, but It's added to not access the ->im_context
directly.
Based on a Christian Dywan patch

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=163251
2010-05-05 03:16:15 +02:00
Matthias Clasen
5f29a679f8 Avoid spurious notifications from GtkEntry
Using gtk_entry_set_buffer() in dispose() causes problematic
notifications, so just get rid of the buffer manually. See bug 613241.
2010-03-19 23:24:33 -04:00
Tristan Van Berkom
e8c0920494 Refixed patch for bug 612505.
New patch makes sure to update the display even when
the GtkEntry's buffer is set to NULL, it also breaks the
reference to the buffer in ->dispose() instead of ->finalize().
2010-03-14 16:29:42 -04:00
Matthias Clasen
c55e0fc372 Fix tests 2010-03-13 00:49:10 -05:00
Matthias Clasen
233281fd39 Recompute label contents when the buffer changes
Also reset cursor positions to avoid assertions.
This fixes bug 612505, patch by Tristan Van Berkom.
2010-03-12 15:59:59 -05:00
Javier Jardón
32b9aeaadd Don't use GTK_WIDGET_STATE in internal code anymore
Use gtk_widget_get/set_state() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-09 02:40:17 +01:00
Javier Jardón
1934de4b65 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
Use new API instead: gtk_widget_set_realized ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-06 11:51:33 +01:00
Javier Jardón
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01:00
Javier Jardón
1fe7d3cefd Deprecate widget flag: GTK_WIDGET_MAPPED
Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:19:03 +01:00
Javier Jardón
483a5a9e1a Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_FOCUS)
Use new API instead: gtk_widget_set_can_focus ()
2010-03-02 04:42:54 +01:00
Javier Jardón
214a023e91 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 07:52:07 +01:00
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 06:11:01 +01:00
Javier Jardón
64f526d34e Deprecate widget flag: GTK_WIDGET_SENSITIVE
Use gtk_widget_get_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 05:59:23 +01:00
Javier Jardón
a27d5a2c9e Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 05:32:51 +01:00
Javier Jardón
4f78f70b15 Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 04:55:55 +01:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Michael Natterer
2f9c4be0a8 Bug 607778 - Add accessors for GtkEntry's windows
Add gtk_entry_get_text_window() and get_icon_window() so we can
distinguigh them in expose-event callbacks.
2010-01-22 17:20:01 +01:00
Christian Dywan
90f72a0d8f Implement "preedit-changed" in GtkEntry and GtkTextView
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=602284
2010-01-11 10:59:26 +01:00
Javier Jardón
ccf17a828b [docs] Add missing "Deprecated: 2.x" to the api doc comments 2010-01-11 06:25:59 +01:00
Jean Brefort
808e698ea7 fix critical in gtk_editable_insert_text 2010-01-07 16:40:49 +01:00
Hiroyuki Ikezoe
702ee3b350 [gtk] GtkCellEditable::editing-cancelled should be writable
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=604881

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2009-12-19 01:21:22 +01:00
Hiroyuki Ikezoe
d3fab727ae Use g_value_dup_string instead.
g_value_get_string and g_strdup should be replaced by
g_value_dup_string.
2009-12-18 20:51:03 +01:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Cody Russell
0f33ad4ee1 Added editing_canceled property to GtkCellEditable
GTK_ENTRY()->editing_canceled should really have been a parameter of the
GtkCellEditable::editing-done signal, it should be a property on the cell
editable interface

https://bugzilla.gnome.org/show_bug.cgi?id=594962
2009-10-21 18:55:24 +02:00
Mart Raudsepp
0633ba0163 Fix more GtkEntry Since tags.
progress-border and invisible-char style properties had wrong amount
of colons for gtk-doc (signal markup instead of properties), so the
Since tags didn't seem to get picked up.
GtkEntry:invisible-char also had a wrong Since: 2.22, fixed to 2.18.
2009-09-22 11:25:28 +03:00
Mart Raudsepp
9ea2bfe73f Add missing Since: 2.16 for gtk_entry_[set/get]_icon_drag_source 2009-09-22 11:25:28 +03:00
Carlos Garcia Campos
c51830f453 Do not emit action-activated signal when there are not actions selected
This was causing problems for epiphanys location entry, reported
in bug 593481.
2009-08-29 20:36:28 -04:00
Pascal Terjan
047a91322c Show the icon window back after changing pixbuf
Otherwise, there is no way to get icons to show again after calling
_clear() once. Reported in bug 593135.
2009-08-29 20:27:23 -04:00
Matthias Clasen
20dc8509f8 Complete the get_buffer() conversion
There was one direct buffer access in gtk_entry_real_delete_text
leftover, and it promptly made our testsuite fail.
2009-07-17 15:09:35 -04:00
Tristan Van Berkom
51149246c0 Fixed crashes when GtkEntry's internal buffer is not available (bug 588395)
To fix this I replaced the code that creates an internal buffer
at init and construction time with code that creates a buffer
at _get_buffer() time, this is the same as GtkTextView does and
fixes the crashes for me.
2009-07-16 23:52:46 -04:00
Matthias Clasen
9a3af66a21 Avoid gratitious behaviour change
gtk_entry_set_text() used to emit the ::delete-text, ::insert-text
signals. Changing to GtkEntryBuffer should not change this.
2009-07-15 18:25:02 -04:00
Matthias Clasen
0e8fe66f09 Fix some problems with prelighting of icons in entries 2009-07-13 14:48:10 -04:00
Matthias Clasen
ea3184f129 Make gtk_editable_get_chars work as before
It used to return actual entry contents, regardless of visiblity.
Make it do that again. This was reported in bug 588461.
2009-07-13 13:37:35 -04:00
Michael Natterer
b664c328b4 Create a buffer in init() so subclasses can use the entry in their init() 2009-07-10 20:27:33 +02:00
Stef Walter
eab02f697a GtkEntryBuffer holds text for GtkEntry
Adds a 'model' type buffer for GtkEntry in which the actual
textual data is stored. GtkEntryBuffer can be subclassed.

Among other things, this allows GtkEntry to be used for secrets
that need to be stored in non-pageable memory. It also allows
buffers to be shared by entries.

See bug #576801.
2009-07-08 20:41:53 -05:00