Commit Graph

502 Commits

Author SHA1 Message Date
Matthias Clasen
596da84312 Make GtkEntry a no-window widget
Use input-only windows for capturing input, and just draw onto
the parent window. This allows themes to make entries with rounded
corners. Patch by Boram Park.

https://bugzilla.gnome.org/show_bug.cgi?id=632736
2010-10-21 13:17:33 +02:00
Emmanuele Bassi
9f9edb662e settings: Move setting property registration in gtksettings.c
Some GtkSettings property are registered by other classes. This leads
to the "interesting" issue that setting GtkSettings:gtk-button-images
requires that the GtkButton class is referenced first - or that a
GtkButton is created.

https://bugzilla.gnome.org/show_bug.cgi?id=632538
2010-10-20 10:34:25 +01:00
Javier Jardón
eac1959d2c Move destroy signal to GtkWidget
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Benjamin Otte
90beb8a514 entry: Use gtk_cairo_transform_to_window() 2010-09-26 15:11:46 +02:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
34c6e35152 entry: Get rid of gdk_drawable_get_size() usage 2010-09-26 15:11:44 +02:00
Benjamin Otte
67284a57de API: Get rid of gtk_draw_insertion_cursor()
and rename gtk_cairo_draw_insertion_cursor() to
gtk_draw_insertion_cursor().
2010-09-26 15:11:43 +02:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
d13a2ad66a entry: Remove gtk_entry_is_drawable() checks when painting 2010-09-26 15:11:35 +02:00
Benjamin Otte
c412c1c752 entry: Port to draw signal 2010-09-26 15:11:35 +02:00
Benjamin Otte
696989d499 entry: Split else ifs into separate if statements
Preparation for the draw vfunc
2010-09-26 15:11:35 +02:00
Benjamin Otte
ec4be3619f entry: Add bug reference to workaround 2010-09-26 15:11:35 +02:00
Benjamin Otte
2ee8fdb79b gtk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
e8a6bad00b gtk: Don't set colormap anymore when creating GDK windows
Colormaps are about to be removed, so not using them sounds like an
awesome idea.
2010-09-26 15:11:31 +02:00
Benjamin Otte
3d340d7449 text: Make _gtk_text_util_create_drag_icon() return a surface
And change its callers to handle it that way.
2010-09-26 15:03:00 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
efbf04236e Change GtkEditable typedef from GtkEditableClass to GtkEditabeInterface
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=323904
2010-09-17 19:57:09 +02:00
Javier Jardón
8345760fdb gtkentry: remove unnneded check in map/unmap functions 2010-09-15 03:28:24 +02:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Javier Jardón
9e81022bf6 Use gtk_size_request_get_size() instead deprecated gtk_widget_get_child_requisition()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629177
2010-09-13 21:26:01 +02:00
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Benjamin Otte
78ccc74879 entry: Use the same state for the flat box of text area and icons 2010-09-03 17:01:06 +02:00
Matthias Clasen
399580f9e1 Remove GtkEntry::state-hint
This was a style property 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.
2010-09-01 20:21:21 -04:00
Matthias Clasen
29aa3818a4 Remove deprecated text and text_length field in GtkEntry
These fields have been superseded by GtkEntryBuffer.
2010-08-28 22:27:36 -04:00
Javier Jardón
65266d971e gtk/gtkentry.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:27 +02:00
Javier Jardón
4ddff2691b gtk/gtkentry.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Philip Withnall
3eb197b51f Bug 596125 — Property string fixes 2010-08-10 09:23:49 +01:00
Benjamin Otte
d203b830a9 entry: replace gdk_draw_pixbuf() call with Cairo version 2010-07-26 16:42:46 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
William Jon McCann
85e3f22c19 Show lock warning for num lock as well as caps lock
https://bugzilla.gnome.org/show_bug.cgi?id=623239
2010-07-01 21:46:08 -04:00
Colin Walters
905f988166 Revert "Add length to gtk_tree_path_get_indices"
This reverts commit eebb16eb1a.

Was an accidental commit.
2010-06-28 14:15:10 -04:00
Colin Walters
eebb16eb1a Add length to gtk_tree_path_get_indices
The old version wasn't introspectable as it didn't have a length
return parameter.  Also, delete gtk_tree_path_get_indices_with_depth,
since it's no longer needed.
2010-06-28 13:50:36 -04:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Matthias Clasen
bb91ebcb8f Fix signal parameters in GtkEntryCompletion
The ::match-selected and ::cursor-on-match signal were emitted
with the internal filter model instead of the user-provided model.

Fixes bug #555087.
2010-05-21 23:50:46 -04:00
Matthias Clasen
77d4d3cdae Merge branch 'gtk-2-90'
Conflicts:
	gtk/gtkentry.h
2010-05-06 22:55:02 -04:00
Javier Jardón
713f2b638e Use event instead key in the previous patch 2010-05-05 04:06:17 +02:00
Javier Jardón
7692a427a6 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:14:28 +02:00
Christian Dywan
90d514a8a5 Remove deprecated GtkEntry functions 2010-05-03 01:51:18 +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