summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk/broadway/gdkeventsource.c3
-rw-r--r--gdk/gdkevents.c40
-rw-r--r--gdk/gdkeventsprivate.h10
-rw-r--r--gdk/macos/gdkmacosdisplay-translate.c3
-rw-r--r--gdk/macos/gdkmacossurface.c3
-rw-r--r--gdk/wayland/gdkdevice-wayland.c3
-rw-r--r--gdk/win32/gdkevents-win32.c143
-rw-r--r--gdk/win32/gdksurface-win32.h8
-rw-r--r--gdk/x11/gdkdevicemanager-xi2.c3
-rw-r--r--gtk/deprecated/gtktreeview.c182
-rw-r--r--gtk/gtkdropdown.c43
-rw-r--r--gtk/gtkimcontext.c3
-rw-r--r--gtk/gtkimcontextime.c123
-rw-r--r--gtk/gtkimcontextsimple.c3
-rw-r--r--gtk/gtkmain.c3
-rw-r--r--gtk/gtksingleselection.c8
-rw-r--r--tests/testmountoperation.c6
17 files changed, 264 insertions, 323 deletions
diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c
index 045c8f3040..7aa496d370 100644
--- a/gdk/broadway/gdkeventsource.c
+++ b/gdk/broadway/gdkeventsource.c
@@ -262,7 +262,8 @@ _gdk_broadway_events_got_input (GdkDisplay *display,
message->key.state,
FALSE,
&translated,
- &translated);
+ &translated,
+ NULL);
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, message->base.serial);
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 3e68b26579..890dbf01a1 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -1517,6 +1517,16 @@ gdk_button_event_get_button (GdkEvent *event)
* An event related to a key-based device.
*/
+static void
+gdk_key_event_finalize (GdkEvent *event)
+{
+ GdkKeyEvent *self = (GdkKeyEvent *) event;
+
+ g_free (self->compose_sequence);
+
+ GDK_EVENT_SUPER (event)->finalize (event);
+}
+
static GdkModifierType
gdk_key_event_get_state (GdkEvent *event)
{
@@ -1528,7 +1538,7 @@ gdk_key_event_get_state (GdkEvent *event)
static const GdkEventTypeInfo gdk_key_event_info = {
sizeof (GdkKeyEvent),
NULL,
- NULL,
+ gdk_key_event_finalize,
gdk_key_event_get_state,
NULL,
NULL,
@@ -1552,6 +1562,10 @@ GDK_DEFINE_EVENT_TYPE (GdkKeyEvent, gdk_key_event,
* @is_modifier: whether the event is a modifiers only event
* @translated: the translated key data for the given @state
* @no_lock: the translated key data without the given @state
+ * @compose_sequence: (transfer none) (nullable):
+ * The compose sequence string, either partial or only the
+ * final composed string, if that can be determined at event
+ * creation time. Used by selected IM modules.
*
* Creates a new `GdkKeyEvent`.
*
@@ -1566,7 +1580,8 @@ gdk_key_event_new (GdkEventType type,
GdkModifierType state,
gboolean is_modifier,
GdkTranslatedKey *translated,
- GdkTranslatedKey *no_lock)
+ GdkTranslatedKey *no_lock,
+ char *compose_sequence)
{
g_return_val_if_fail (type == GDK_KEY_PRESS ||
type == GDK_KEY_RELEASE, NULL);
@@ -1579,6 +1594,7 @@ gdk_key_event_new (GdkEventType type,
self->key_is_modifier = is_modifier;
self->translated[0] = *translated;
self->translated[1] = *no_lock;
+ self->compose_sequence = g_strdup (compose_sequence);
return event;
}
@@ -1609,6 +1625,26 @@ gdk_key_event_get_translated_key (GdkEvent *event,
return &(self->translated[0]);
}
+/*< private >
+ * gdk_key_event_get_compose_sequence:
+ * @event: (type GdkKeyEvent): a key event
+ *
+ * Extracts the compose sequence string from a key event.
+ *
+ * Returns: (transfer none): the compose sequence string
+ */
+char *
+gdk_key_event_get_compose_sequence (GdkEvent *event)
+{
+ GdkKeyEvent *self = (GdkKeyEvent *) event;
+
+ g_return_val_if_fail (GDK_IS_EVENT (event), 0);
+ g_return_val_if_fail (GDK_IS_EVENT_TYPE (event, GDK_KEY_PRESS) ||
+ GDK_IS_EVENT_TYPE (event, GDK_KEY_RELEASE), FALSE);
+
+ return self->compose_sequence;
+}
+
/**
* gdk_key_event_get_keyval:
* @event: (type GdkKeyEvent): a key event
diff --git a/gdk/gdkeventsprivate.h b/gdk/gdkeventsprivate.h
index a36c5d100b..aad8218b37 100644
--- a/gdk/gdkeventsprivate.h
+++ b/gdk/gdkeventsprivate.h
@@ -259,6 +259,9 @@ typedef struct {
* @keycode: the raw code of the key that was pressed or released.
* @translated: the result of translating @keycode. First with the full
* @state, then while ignoring Caps Lock.
+ * @compose_sequence: optional string for use by selected IM modules.
+ * Contains either partial compose sequences or the final composed
+ * string of the keystroke sequence.
*
* Describes a key press or key release event.
*/
@@ -270,6 +273,7 @@ struct _GdkKeyEvent
guint32 keycode;
gboolean key_is_modifier;
GdkTranslatedKey translated[2];
+ char *compose_sequence;
};
/*
@@ -470,7 +474,8 @@ GdkEvent * gdk_key_event_new (GdkEventType type,
GdkModifierType modifiers,
gboolean is_modifier,
GdkTranslatedKey *translated,
- GdkTranslatedKey *no_lock);
+ GdkTranslatedKey *no_lock,
+ char *compose_sequence);
GdkEvent * gdk_focus_event_new (GdkSurface *surface,
GdkDevice *device,
@@ -597,6 +602,8 @@ GdkEvent * gdk_grab_broken_event_new (GdkSurface *surface,
GdkTranslatedKey * gdk_key_event_get_translated_key (GdkEvent *event,
gboolean no_lock);
+char * gdk_key_event_get_compose_sequence (GdkEvent *event);
+
typedef enum
{
/* Following flag is set for events on the event queue during
@@ -626,7 +633,6 @@ void _gdk_event_queue_flush (GdkDisplay *display);
double * gdk_event_dup_axes (GdkEvent *event);
-
G_END_DECLS
#endif /* __GDK_EVENTS_PRIVATE_H__ */
diff --git a/gdk/macos/gdkmacosdisplay-translate.c b/gdk/macos/gdkmacosdisplay-translate.c
index 7eaa6dca03..502a9a8cac 100644
--- a/gdk/macos/gdkmacosdisplay-translate.c
+++ b/gdk/macos/gdkmacosdisplay-translate.c
@@ -431,7 +431,8 @@ fill_key_event (GdkMacosDisplay *display,
state,
is_modifier,
&translated,
- &no_lock);
+ &no_lock,
+ NULL);
}
static GdkEvent *
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index 46074a5d9d..b847ea0ff4 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -944,7 +944,8 @@ _gdk_macos_surface_synthesize_null_key (GdkMacosSurface *self)
0,
FALSE,
&translated,
- &no_lock);
+ &no_lock,
+ NULL);
_gdk_event_queue_append (display, event);
}
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index cd314b6d67..98e08ecb5f 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -2205,7 +2205,8 @@ deliver_key_event (GdkWaylandSeat *seat,
device_get_modifiers (seat->logical_pointer),
_gdk_wayland_keymap_key_is_modifier (keymap, key),
&translated,
- &no_lock);
+ &no_lock,
+ NULL);
_gdk_wayland_display_deliver_event (seat->display, event);
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index cdabceeca8..60fd778a4a 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1857,7 +1857,8 @@ gdk_event_translate (MSG *msg,
0,
FALSE,
&translated,
- &translated);
+ &translated,
+ NULL);
_gdk_win32_append_event (event);
}
break;
@@ -1906,8 +1907,12 @@ gdk_event_translate (MSG *msg,
GdkTranslatedKey translated;
GdkTranslatedKey no_lock;
BYTE key_state[256];
- wchar_t wbuf[100];
- int ccount = 0;
+ GArray *translation;
+ MSG msg2;
+ int level = 0;
+ int effective_group = 0;
+ GdkModifierType consumed = 0;
+ char *composed = NULL;
/* Ignore key messages intended for the IME */
if (msg->wParam == VK_PROCESSKEY || in_ime_composition)
@@ -1929,33 +1934,40 @@ gdk_event_translate (MSG *msg,
API_CALL (GetKeyboardState, (key_state));
- ccount = 0;
+ keyval = GDK_KEY_VoidSymbol;
+ keycode = msg->wParam;
- if (msg->wParam == VK_PACKET)
+ /* Get the WinAPI translation of the WM_KEY messages to characters.
+
+ The WM_CHAR messages are generated by a previous call to TranslateMessage() and always
+ follow directly after the corresponding WM_KEY* messages.
+ There could be 0 or more WM_CHAR messages following (for example dead keys don't generate
+ WM_CHAR messages - they generate WM_DEAD_CHAR instead, but we are not interested in those
+ messages). */
+
+ translation = g_array_sized_new (FALSE, FALSE, sizeof (gunichar2), 2);
+ while (PeekMessageW (&msg2, msg->hwnd, 0, 0, 0) && (msg2.message == WM_CHAR || msg2.message == WM_SYSCHAR))
{
- ccount = ToUnicode (VK_PACKET, HIWORD (msg->lParam), key_state, wbuf, 1, 0);
- if (ccount == 1)
- {
- if (wbuf[0] >= 0xD800 && wbuf[0] < 0xDC00)
- {
- if (msg->message == WM_KEYDOWN)
- impl->leading_surrogate_keydown = wbuf[0];
- else
- impl->leading_surrogate_keyup = wbuf[0];
-
- /* don't emit an event */
- return_val = TRUE;
- break;
- }
- else
- {
- /* wait until an event is created */;
- }
- }
+ /* The character is encoded in WPARAM as UTF-16. */
+ gunichar2 c = msg2.wParam;
+
+ /* Append character to translation string. */
+ g_array_append_val (translation, c);
+
+ /* Remove message from queue */
+ GetMessageW (&msg2, msg->hwnd, 0, 0);
}
- keyval = GDK_KEY_VoidSymbol;
- keycode = msg->wParam;
+ if (translation->len > 0)
+ composed = g_utf16_to_utf8 ((gunichar2*)translation->data,
+ translation->len, NULL, NULL, NULL);
+
+ g_array_unref (translation);
+ translation = NULL;
+
+ /* Ignore control sequences like Backspace */
+ if (composed && g_unichar_iscntrl (g_utf8_get_char (composed)))
+ g_clear_pointer (&composed, g_free);
if (HIWORD (msg->lParam) & KF_EXTENDED)
{
@@ -1985,61 +1997,20 @@ gdk_event_translate (MSG *msg,
state = build_key_event_state (key_state);
group = get_active_group ();
- if (msg->wParam == VK_PACKET && ccount == 1)
- {
- if (wbuf[0] >= 0xD800 && wbuf[0] < 0xDC00)
- {
- g_assert_not_reached ();
- }
- else if (wbuf[0] >= 0xDC00 && wbuf[0] < 0xE000)
- {
- wchar_t leading;
-
- if (msg->message == WM_KEYDOWN)
- leading = impl->leading_surrogate_keydown;
- else
- leading = impl->leading_surrogate_keyup;
-
- keyval = gdk_unicode_to_keyval ((leading - 0xD800) * 0x400 + wbuf[0] - 0xDC00 + 0x10000);
- }
- else
- {
- keyval = gdk_unicode_to_keyval (wbuf[0]);
- }
-
- translated.keyval = keyval;
- translated.consumed = 0;
- translated.layout = 0;
- translated.level = 0;
-
- no_lock = translated;
- }
- else
- {
- int level = 0;
- int effective_group = 0;
- GdkModifierType consumed = 0;
-
- gdk_keymap_translate_keyboard_state ((GdkKeymap*) win32_keymap, keycode, state, group,
- &keyval, &effective_group, &level, &consumed);
- translated.keyval = keyval;
- translated.consumed = consumed;
- translated.layout = effective_group;
- translated.level = level;
-
- gdk_keymap_translate_keyboard_state ((GdkKeymap*) win32_keymap, keycode,
- state & ~GDK_LOCK_MASK, group, &keyval,
- &effective_group, &level, &consumed);
- no_lock.keyval = keyval;
- no_lock.consumed = consumed;
- no_lock.layout = effective_group;
- no_lock.level = level;
- }
-
- if (msg->message == WM_KEYDOWN)
- impl->leading_surrogate_keydown = 0;
- else
- impl->leading_surrogate_keyup = 0;
+ gdk_keymap_translate_keyboard_state ((GdkKeymap*) win32_keymap, keycode, state, group,
+ &keyval, &effective_group, &level, &consumed);
+ translated.keyval = keyval;
+ translated.consumed = consumed;
+ translated.layout = effective_group;
+ translated.level = level;
+
+ gdk_keymap_translate_keyboard_state ((GdkKeymap*) win32_keymap, keycode,
+ state & ~GDK_LOCK_MASK, group, &keyval,
+ &effective_group, &level, &consumed);
+ no_lock.keyval = keyval;
+ no_lock.consumed = consumed;
+ no_lock.layout = effective_group;
+ no_lock.level = level;
/* Only one release key event is fired when both shift keys are pressed together
and then released. In order to send the missing event, press events for shift
@@ -2087,10 +2058,12 @@ gdk_event_translate (MSG *msg,
state,
is_modifier,
&translated,
- &no_lock);
+ &no_lock,
+ composed);
_gdk_win32_append_event (event);
+ g_free (composed);
return_val = TRUE;
}
break;
@@ -2169,7 +2142,8 @@ gdk_event_translate (MSG *msg,
build_key_event_state (key_state),
FALSE,
&translated,
- &translated);
+ &translated,
+ NULL);
_gdk_win32_append_event (event);
@@ -2182,7 +2156,8 @@ gdk_event_translate (MSG *msg,
build_key_event_state (key_state),
FALSE,
&translated,
- &translated);
+ &translated,
+ NULL);
_gdk_win32_append_event (event);
}
diff --git a/gdk/win32/gdksurface-win32.h b/gdk/win32/gdksurface-win32.h
index cff41117ef..22daa8faa7 100644
--- a/gdk/win32/gdksurface-win32.h
+++ b/gdk/win32/gdksurface-win32.h
@@ -235,14 +235,6 @@ struct _GdkWin32Surface
/* The cursor that GDK set for this window via GdkDevice */
GdkWin32HCursor *cursor;
- /* When VK_PACKET sends us a leading surrogate, it's stashed here.
- * Later, when another VK_PACKET sends a tailing surrogate, we make up
- * a full unicode character from them, or discard the leading surrogate,
- * if the next key is not a tailing surrogate.
- */
- wchar_t leading_surrogate_keydown;
- wchar_t leading_surrogate_keyup;
-
/* Window size hints */
int hint_flags;
GdkGeometry hints;
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 566d519809..02ceb2f110 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1595,7 +1595,8 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
state,
gdk_x11_keymap_key_is_modifier (keymap, xev->detail),
&translated,
- &no_lock);
+ &no_lock,
+ NULL);
if (ev->evtype == XI_KeyPress)
set_user_time (event);
diff --git a/gtk/deprecated/gtktreeview.c b/gtk/deprecated/gtktreeview.c
index 201db8cba8..7d8abeca14 100644
--- a/gtk/deprecated/gtktreeview.c
+++ b/gtk/deprecated/gtktreeview.c
@@ -7547,7 +7547,7 @@ column_sizing_notify (GObject *object,
* Only enable this option if all rows are the same height and all
* columns are of type %GTK_TREE_VIEW_COLUMN_FIXED.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
@@ -7597,7 +7597,7 @@ gtk_tree_view_set_fixed_height_mode (GtkTreeView *tree_view,
*
* Returns: %TRUE if @tree_view is in fixed height mode
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_fixed_height_mode (GtkTreeView *tree_view)
@@ -10172,7 +10172,7 @@ gtk_tree_view_adjustment_changed (GtkAdjustment *adjustment,
*
* Returns: A newly created `GtkTreeView` widget.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GtkWidget *
gtk_tree_view_new (void)
@@ -10188,7 +10188,7 @@ gtk_tree_view_new (void)
*
* Returns: A newly created `GtkTreeView` widget.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GtkWidget *
gtk_tree_view_new_with_model (GtkTreeModel *model)
@@ -10208,7 +10208,7 @@ gtk_tree_view_new_with_model (GtkTreeModel *model)
*
* Returns: (transfer none) (nullable): A `GtkTreeModel`
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GtkTreeModel *
gtk_tree_view_get_model (GtkTreeView *tree_view)
@@ -10229,7 +10229,7 @@ gtk_tree_view_get_model (GtkTreeView *tree_view)
* set, it will remove it before setting the new model. If @model is %NULL,
* then it will unset the old model.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_model (GtkTreeView *tree_view,
@@ -10383,7 +10383,7 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
*
* Returns: (transfer none): A `GtkTreeSelection` object.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GtkTreeSelection *
gtk_tree_view_get_selection (GtkTreeView *tree_view)
@@ -10468,7 +10468,7 @@ gtk_tree_view_do_set_vadjustment (GtkTreeView *tree_view,
*
* Returns: Whether the headers are visible or not.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_headers_visible (GtkTreeView *tree_view)
@@ -10487,7 +10487,7 @@ gtk_tree_view_get_headers_visible (GtkTreeView *tree_view)
*
* Sets the visibility state of the headers.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
@@ -10540,7 +10540,7 @@ gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
* Resizes all columns to their optimal width. Only works after the
* treeview has been realized.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_columns_autosize (GtkTreeView *tree_view)
@@ -10572,7 +10572,7 @@ gtk_tree_view_columns_autosize (GtkTreeView *tree_view)
*
* Allow the column title buttons to be clicked.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view,
@@ -10606,7 +10606,7 @@ gtk_tree_view_set_headers_clickable (GtkTreeView *tree_view,
*
* Returns: %TRUE if all header columns are clickable, otherwise %FALSE
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view)
@@ -10631,7 +10631,7 @@ gtk_tree_view_get_headers_clickable (GtkTreeView *tree_view)
* Cause the `GtkTreeView`::row-activated signal to be emitted
* on a single click instead of a double click.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
@@ -10658,7 +10658,7 @@ gtk_tree_view_set_activate_on_single_click (GtkTreeView *tree_view,
*
* Returns: %TRUE if row-activated will be emitted on a single click
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view)
@@ -10684,7 +10684,7 @@ gtk_tree_view_get_activate_on_single_click (GtkTreeView *tree_view)
*
* Returns: The number of columns in @tree_view after appending.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
int
gtk_tree_view_append_column (GtkTreeView *tree_view,
@@ -10706,7 +10706,7 @@ gtk_tree_view_append_column (GtkTreeView *tree_view,
*
* Returns: The number of columns in @tree_view after removing.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
int
gtk_tree_view_remove_column (GtkTreeView *tree_view,
@@ -10776,7 +10776,7 @@ gtk_tree_view_remove_column (GtkTreeView *tree_view,
*
* Returns: The number of columns in @tree_view after insertion.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
int
gtk_tree_view_insert_column (GtkTreeView *tree_view,
@@ -10847,7 +10847,7 @@ gtk_tree_view_insert_column (GtkTreeView *tree_view,
*
* Returns: The number of columns in @tree_view after insertion.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
int
gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view,
@@ -10906,7 +10906,7 @@ gtk_tree_view_insert_column_with_attributes (GtkTreeView *tree_view,
*
* Returns: number of columns in the tree view post-insert
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
int
gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_view,
@@ -10941,7 +10941,7 @@ gtk_tree_view_insert_column_with_data_func (GtkTreeView *tree_vie
*
* Returns: The number of columns in the @tree_view
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
guint
gtk_tree_view_get_n_columns (GtkTreeView *tree_view)
@@ -10963,7 +10963,7 @@ gtk_tree_view_get_n_columns (GtkTreeView *tree_view)
* Returns: (nullable) (transfer none): The `GtkTreeViewColumn`, or %NULL if the
* position is outside the range of columns.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GtkTreeViewColumn *
gtk_tree_view_get_column (GtkTreeView *tree_view,
@@ -10991,7 +10991,7 @@ gtk_tree_view_get_column (GtkTreeView *tree_view,
*
* Returns: (element-type GtkTreeViewColumn) (transfer container): A list of `GtkTreeViewColumn`s
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GList *
gtk_tree_view_get_columns (GtkTreeView *tree_view)
@@ -11012,7 +11012,7 @@ gtk_tree_view_get_columns (GtkTreeView *tree_view)
* Moves @column to be after to @base_column. If @base_column is %NULL, then
* @column is placed in the first position.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_move_column_after (GtkTreeView *tree_view,
@@ -11073,7 +11073,7 @@ gtk_tree_view_move_column_after (GtkTreeView *tree_view,
* If you do not want expander arrow to appear in your tree, set the
* expander column to a hidden column.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_expander_column (GtkTreeView *tree_view,
@@ -11102,7 +11102,7 @@ gtk_tree_view_set_expander_column (GtkTreeView *tree_view,
*
* Returns: (transfer none) (nullable): The expander column.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GtkTreeViewColumn *
gtk_tree_view_get_expander_column (GtkTreeView *tree_view)
@@ -11136,7 +11136,7 @@ gtk_tree_view_get_expander_column (GtkTreeView *tree_view)
* @tree_view reverts to the default behavior of allowing all columns to be
* dropped everywhere.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view,
@@ -11170,7 +11170,7 @@ gtk_tree_view_set_column_drag_function (GtkTreeView *tree_view,
*
* If either @tree_x or @tree_y are -1, then that direction isn’t scrolled.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
@@ -11219,7 +11219,7 @@ gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
* model. If the model changes before the @tree_view is realized, the centered
* path will be modified to reflect this change.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
@@ -11324,7 +11324,7 @@ gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
*
* Activates the cell determined by @path and @column.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_row_activated (GtkTreeView *tree_view,
@@ -11373,7 +11373,7 @@ gtk_tree_view_expand_all_emission_helper (GtkTreeRBTree *tree,
*
* Recursively expands all nodes in the @tree_view.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_expand_all (GtkTreeView *tree_view)
@@ -11407,7 +11407,7 @@ gtk_tree_view_expand_all (GtkTreeView *tree_view)
*
* Recursively collapses all visible, expanded nodes in @tree_view.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_collapse_all (GtkTreeView *tree_view)
@@ -11449,7 +11449,7 @@ gtk_tree_view_collapse_all (GtkTreeView *tree_view)
* Expands the row at @path. This will also expand all parent rows of
* @path as necessary.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_expand_to_path (GtkTreeView *tree_view,
@@ -11580,7 +11580,7 @@ gtk_tree_view_real_expand_row (GtkTreeView *tree_view,
*
* Returns: %TRUE if the row existed and had children
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_expand_row (GtkTreeView *tree_view,
@@ -11720,7 +11720,7 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view,
*
* Returns: %TRUE if the row was collapsed.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_collapse_row (GtkTreeView *tree_view,
@@ -11782,7 +11782,7 @@ gtk_tree_view_map_expanded_rows_helper (GtkTreeView *tree_view,
*
* Calls @func on all expanded rows.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view,
@@ -11813,7 +11813,7 @@ gtk_tree_view_map_expanded_rows (GtkTreeView *tree_view,
*
* Returns: %TRUE if #path is expanded.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_row_expanded (GtkTreeView *tree_view,
@@ -11842,7 +11842,7 @@ gtk_tree_view_row_expanded (GtkTreeView *tree_view,
*
* Returns: %TRUE if the tree can be reordered.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_reorderable (GtkTreeView *tree_view)
@@ -11874,7 +11874,7 @@ gtk_tree_view_get_reorderable (GtkTreeView *tree_view)
* reordering is allowed. If more control is needed, you should probably
* handle drag and drop manually.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
@@ -12000,7 +12000,7 @@ gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
* The returned `GtkTreePath` must be freed with gtk_tree_path_free() when
* you are done with it.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_get_cursor (GtkTreeView *tree_view,
@@ -12045,7 +12045,7 @@ gtk_tree_view_get_cursor (GtkTreeView *tree_view,
* If @path is invalid for @model, the current cursor (if any) will be unset
* and the function will return without failing.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_cursor (GtkTreeView *tree_view,
@@ -12080,7 +12080,7 @@ gtk_tree_view_set_cursor (GtkTreeView *tree_view,
* If @path is invalid for @model, the current cursor (if any) will be unset
* and the function will return without failing.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view,
@@ -12168,7 +12168,7 @@ gtk_tree_view_set_cursor_on_cell (GtkTreeView *tree_view,
*
* Returns: %TRUE if a row exists at that coordinate.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
@@ -12325,7 +12325,7 @@ gtk_tree_view_get_cell_area_y_offset (GtkTreeView *tree_view,
* gtk_cell_renderer_render(). This function is only valid if @tree_view is
* realized.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_get_cell_area (GtkTreeView *tree_view,
@@ -12453,7 +12453,7 @@ gtk_tree_view_get_row_y_offset (GtkTreeView *tree_view,
* returned by gtk_tree_view_get_cell_area(), which returns only the cell
* itself, excluding surrounding borders and the tree expander area.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_get_background_area (GtkTreeView *tree_view,
@@ -12505,7 +12505,7 @@ gtk_tree_view_get_background_area (GtkTreeView *tree_view,
* Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
* scrollable area of the tree.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_get_visible_rect (GtkTreeView *tree_view,
@@ -12540,7 +12540,7 @@ gtk_tree_view_get_visible_rect (GtkTreeView *tree_view,
* Converts widget coordinates to coordinates for the
* tree (the full scrollable area of the tree).
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view,
@@ -12572,7 +12572,7 @@ gtk_tree_view_convert_widget_to_tree_coords (GtkTreeView *tree_view,
* Converts tree coordinates (coordinates in full scrollable area of the tree)
* to widget coordinates.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view,
@@ -12603,7 +12603,7 @@ gtk_tree_view_convert_tree_to_widget_coords (GtkTreeView *tree_view,
*
* Converts widget coordinates to coordinates for the bin_window.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
@@ -12632,7 +12632,7 @@ gtk_tree_view_convert_widget_to_bin_window_coords (GtkTreeView *tree_view,
*
* Converts bin_window coordinates to widget relative coordinates.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
@@ -12662,7 +12662,7 @@ gtk_tree_view_convert_bin_window_to_widget_coords (GtkTreeView *tree_view,
* Converts tree coordinates (coordinates in full scrollable area of the tree)
* to bin_window coordinates.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view,
@@ -12692,7 +12692,7 @@ gtk_tree_view_convert_tree_to_bin_window_coords (GtkTreeView *tree_view,
* Converts bin_window coordinates to coordinates for the
* tree (the full scrollable area of the tree).
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view,
@@ -12726,7 +12726,7 @@ gtk_tree_view_convert_bin_window_to_tree_coords (GtkTreeView *tree_view,
*
* Returns: %TRUE, if valid paths were placed in @start_path and @end_path.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
gboolean
gtk_tree_view_get_visible_range (GtkTreeView *tree_view,
@@ -12810,7 +12810,7 @@ gtk_tree_view_get_visible_range (GtkTreeView *tree_view,
* Returns: %TRUE if the area at the given coordinates is blank,
* %FALSE otherwise.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
gboolean
gtk_tree_view_is_blank_at_pos (GtkTreeView *tree_view,
@@ -12906,7 +12906,7 @@ unset_reorderable (GtkTreeView *tree_view)
* Turns @tree_view into a drag source for automatic DND. Calling this
* method sets `GtkTreeView`:reorderable to %FALSE.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
@@ -12940,7 +12940,7 @@ gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view,
* Turns @tree_view into a drop destination for automatic DND. Calling
* this method sets `GtkTreeView`:reorderable to %FALSE.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
@@ -12981,7 +12981,7 @@ gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view,
* gtk_tree_view_enable_model_drag_source(). Calling this method sets
* `GtkTreeView`:reorderable to %FALSE.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view)
@@ -13015,7 +13015,7 @@ gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view)
* gtk_tree_view_enable_model_drag_dest(). Calling this method sets
* `GtkTreeView`:reorderable to %FALSE.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view)
@@ -13054,7 +13054,7 @@ gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view)
* Sets the row that is highlighted for feedback.
* If @path is %NULL, an existing highlight is removed.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view,
@@ -13121,7 +13121,7 @@ gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view,
*
* Gets information about the row that is highlighted for feedback.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view,
@@ -13167,7 +13167,7 @@ gtk_tree_view_get_drag_dest_row (GtkTreeView *tree_view,
* Returns: whether there is a row at the given position, %TRUE if this
* is indeed the case.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view,
@@ -13280,7 +13280,7 @@ gtk_treeview_snapshot_border (GtkSnapshot *snapshot,
*
* Returns: (transfer full) (nullable): a newly-allocated surface of the drag icon.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GdkPaintable *
gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
@@ -13438,7 +13438,7 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
* Note that even if this is %FALSE, the user can still initiate a search
* using the “start-interactive-search” key binding.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_enable_search (GtkTreeView *tree_view,
@@ -13466,7 +13466,7 @@ gtk_tree_view_set_enable_search (GtkTreeView *tree_view,
*
* Returns: whether or not to let the user search interactively
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
gboolean
gtk_tree_view_get_enable_search (GtkTreeView *tree_view)
@@ -13487,7 +13487,7 @@ gtk_tree_view_get_enable_search (GtkTreeView *tree_view)
*
* Returns: the column the interactive search code searches in.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
int
gtk_tree_view_get_search_column (GtkTreeView *tree_view)
@@ -13514,7 +13514,7 @@ gtk_tree_view_get_search_column (GtkTreeView *tree_view)
* Note that @column refers to a column of the current model. The search
* column is reset to -1 when the model is changed.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_search_column (GtkTreeView *tree_view,
@@ -13540,7 +13540,7 @@ gtk_tree_view_set_search_column (GtkTreeView *tree_view,
*
* Returns: the currently used compare function for the search code.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
GtkTreeViewSearchEqualFunc
@@ -13564,7 +13564,7 @@ gtk_tree_view_get_search_equal_func (GtkTreeView *tree_view)
* that somewhat like strcmp() returning 0 for equality
* `GtkTreeView`SearchEqualFunc returns %FALSE on matches.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view,
@@ -13597,7 +13597,7 @@ gtk_tree_view_set_search_equal_func (GtkTreeView *tree_view,
*
* Returns: (transfer none) (nullable): the entry currently in use as search entry.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
GtkEditable *
gtk_tree_view_get_search_entry (GtkTreeView *tree_view)
@@ -13623,7 +13623,7 @@ gtk_tree_view_get_search_entry (GtkTreeView *tree_view)
* @entry will make the interactive search code use the built-in popup
* entry again.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_search_entry (GtkTreeView *tree_view,
@@ -14294,7 +14294,7 @@ gtk_tree_view_stop_editing (GtkTreeView *tree_view,
* Currently, this works only for the selection modes
* %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
@@ -14320,7 +14320,7 @@ gtk_tree_view_set_hover_selection (GtkTreeView *tree_view,
*
* Returns: %TRUE if @tree_view is in hover selection mode
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_hover_selection (GtkTreeView *tree_view)
@@ -14341,7 +14341,7 @@ gtk_tree_view_get_hover_selection (GtkTreeView *tree_view)
* Hover expansion makes rows expand or collapse if the pointer
* moves over them.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_hover_expand (GtkTreeView *tree_view,
@@ -14367,7 +14367,7 @@ gtk_tree_view_set_hover_expand (GtkTreeView *tree_view,
*
* Returns: %TRUE if @tree_view is in hover expansion mode
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_hover_expand (GtkTreeView *tree_view)
@@ -14388,7 +14388,7 @@ gtk_tree_view_get_hover_expand (GtkTreeView *tree_view)
* is %GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
* multiple rows by dragging the mouse.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view,
@@ -14416,7 +14416,7 @@ gtk_tree_view_set_rubber_banding (GtkTreeView *tree_view,
*
* Returns: %TRUE if rubber banding in @tree_view is enabled.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view)
@@ -14436,7 +14436,7 @@ gtk_tree_view_get_rubber_banding (GtkTreeView *tree_view)
* Returns: %TRUE if a rubber banding operation is currently being
* done in @tree_view.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
gboolean
gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view)
@@ -14460,7 +14460,7 @@ gtk_tree_view_is_rubber_banding_active (GtkTreeView *tree_view)
*
* Returns: the current row separator function.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
GtkTreeViewRowSeparatorFunc
gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view)
@@ -14483,7 +14483,7 @@ gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view)
* whether a row should be drawn as a separator. If the row separator
* function is %NULL, no separators are drawn. This is the default value.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
**/
void
gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
@@ -14516,7 +14516,7 @@ gtk_tree_view_set_row_separator_func (GtkTreeView *tree_view,
* Returns: a `GtkTreeView`GridLines value indicating which grid lines
* are enabled.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
GtkTreeViewGridLines
gtk_tree_view_get_grid_lines (GtkTreeView *tree_view)
@@ -14536,7 +14536,7 @@ gtk_tree_view_get_grid_lines (GtkTreeView *tree_view)
*
* Sets which grid lines to draw in @tree_view.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
@@ -14567,7 +14567,7 @@ gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
* Returns: %TRUE if tree lines are drawn in @tree_view, %FALSE
* otherwise.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
gboolean
gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view)
@@ -14587,7 +14587,7 @@ gtk_tree_view_get_enable_tree_lines (GtkTreeView *tree_view)
* Sets whether to draw lines interconnecting the expanders in @tree_view.
* This does not have any visible effects for lists.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view,
@@ -14626,7 +14626,7 @@ gtk_tree_view_set_enable_tree_lines (GtkTreeView *tree_view,
* gtk_tree_view_set_level_indentation().
* This does not have any visible effects for lists.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_show_expanders (GtkTreeView *tree_view,
@@ -14654,7 +14654,7 @@ gtk_tree_view_set_show_expanders (GtkTreeView *tree_view,
* Returns: %TRUE if expanders are drawn in @tree_view, %FALSE
* otherwise.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
gboolean
gtk_tree_view_get_show_expanders (GtkTreeView *tree_view)
@@ -14677,7 +14677,7 @@ gtk_tree_view_get_show_expanders (GtkTreeView *tree_view)
* indentation will be used.
* This does not have any visible effects for lists.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_level_indentation (GtkTreeView *tree_view,
@@ -14700,7 +14700,7 @@ gtk_tree_view_set_level_indentation (GtkTreeView *tree_view,
* Returns: the amount of extra indentation for child levels in
* @tree_view. A return value of 0 means that this feature is disabled.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
int
gtk_tree_view_get_level_indentation (GtkTreeView *tree_view)
@@ -14722,7 +14722,7 @@ gtk_tree_view_get_level_indentation (GtkTreeView *tree_view)
* See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
* See also gtk_tooltip_set_tip_area().
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view,
@@ -14755,7 +14755,7 @@ gtk_tree_view_set_tooltip_row (GtkTreeView *tree_view,
*
* See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
@@ -14854,7 +14854,7 @@ gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
*
* Returns: whether or not the given tooltip context points to a row
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
gboolean
gtk_tree_view_get_tooltip_context (GtkTreeView *tree_view,
@@ -14973,7 +14973,7 @@ gtk_tree_view_set_tooltip_query_cb (GtkWidget *widget,
* Note that the signal handler sets the text with gtk_tooltip_set_markup(),
* so &, <, etc have to be escaped in the text.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
void
gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
@@ -15017,7 +15017,7 @@ gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
* Returns: the index of the tooltip column that is currently being
* used, or -1 if this is disabled.
*
- * Deprecated: 4.12: Use GtkListView and GtkColumnView instead
+ * Deprecated: 4.10: Use GtkListView and GtkColumnView instead
*/
int
gtk_tree_view_get_tooltip_column (GtkTreeView *tree_view)
diff --git a/gtk/gtkdropdown.c b/gtk/gtkdropdown.c
index 3441e67ea1..c47e35eae8 100644
--- a/gtk/gtkdropdown.c
+++ b/gtk/gtkdropdown.c
@@ -198,11 +198,9 @@ selection_changed (GtkSingleSelection *selection,
{
GtkDropDown *self = data;
guint selected;
- gpointer item;
GtkFilter *filter;
selected = gtk_single_selection_get_selected (GTK_SINGLE_SELECTION (self->selection));
- item = gtk_single_selection_get_selected_item (GTK_SINGLE_SELECTION (self->selection));
if (selected == GTK_INVALID_LIST_POSITION)
{
@@ -211,7 +209,14 @@ selection_changed (GtkSingleSelection *selection,
else
{
gtk_stack_set_visible_child_name (GTK_STACK (self->button_stack), "item");
- gtk_list_item_widget_update (GTK_LIST_ITEM_WIDGET (self->button_item), selected, item, FALSE);
+ }
+
+ if (selected != gtk_list_item_widget_get_position (GTK_LIST_ITEM_WIDGET (self->button_item)))
+ {
+ gtk_list_item_widget_update (GTK_LIST_ITEM_WIDGET (self->button_item),
+ selected,
+ gtk_single_selection_get_selected_item (GTK_SINGLE_SELECTION (self->selection)),
+ FALSE);
}
/* reset the filter so positions are 1-1 */
@@ -221,6 +226,26 @@ selection_changed (GtkSingleSelection *selection,
gtk_single_selection_set_selected (GTK_SINGLE_SELECTION (self->popup_selection), selected);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
+}
+
+static void
+selection_item_changed (GtkSingleSelection *selection,
+ GParamSpec *pspec,
+ gpointer data)
+{
+ GtkDropDown *self = data;
+ gpointer item;
+
+ item = gtk_single_selection_get_selected_item (GTK_SINGLE_SELECTION (self->selection));
+
+ if (item != gtk_list_item_widget_get_item (GTK_LIST_ITEM_WIDGET (self->button_item)))
+ {
+ gtk_list_item_widget_update (GTK_LIST_ITEM_WIDGET (self->button_item),
+ gtk_single_selection_get_selected (GTK_SINGLE_SELECTION (self->selection)),
+ item,
+ FALSE);
+ }
+
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
}
@@ -289,7 +314,10 @@ gtk_drop_down_dispose (GObject *object)
g_clear_object (&self->model);
if (self->selection)
- g_signal_handlers_disconnect_by_func (self->selection, selection_changed, self);
+ {
+ g_signal_handlers_disconnect_by_func (self->selection, selection_changed, self);
+ g_signal_handlers_disconnect_by_func (self->selection, selection_item_changed, self);
+ }
g_clear_object (&self->filter_model);
g_clear_pointer (&self->expression, gtk_expression_unref);
g_clear_object (&self->selection);
@@ -805,7 +833,10 @@ gtk_drop_down_set_model (GtkDropDown *self,
gtk_list_view_set_model (GTK_LIST_VIEW (self->popup_list), NULL);
if (self->selection)
- g_signal_handlers_disconnect_by_func (self->selection, selection_changed, self);
+ {
+ g_signal_handlers_disconnect_by_func (self->selection, selection_changed, self);
+ g_signal_handlers_disconnect_by_func (self->selection, selection_item_changed, self);
+ }
g_clear_object (&self->selection);
g_clear_object (&self->filter_model);
@@ -831,7 +862,9 @@ gtk_drop_down_set_model (GtkDropDown *self,
g_object_unref (selection);
g_signal_connect (self->selection, "notify::selected", G_CALLBACK (selection_changed), self);
+ g_signal_connect (self->selection, "notify::selected-item", G_CALLBACK (selection_item_changed), self);
selection_changed (GTK_SINGLE_SELECTION (self->selection), NULL, self);
+ selection_item_changed (GTK_SINGLE_SELECTION (self->selection), NULL, self);
}
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
diff --git a/gtk/gtkimcontext.c b/gtk/gtkimcontext.c
index 3772d58db4..26f33b2cbe 100644
--- a/gtk/gtkimcontext.c
+++ b/gtk/gtkimcontext.c
@@ -607,7 +607,8 @@ gtk_im_context_filter_key (GtkIMContext *context,
state,
FALSE, /* FIXME */
&translated,
- &no_lock);
+ &no_lock,
+ NULL);
ret = GTK_IM_CONTEXT_GET_CLASS (context)->filter_keypress (context, key);
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index 33a69f45c5..a2ecd61aee 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -34,6 +34,7 @@
#include "imm-extra.h"
#include "gdk/gdkkeysyms.h"
+#include "gdk/gdkeventsprivate.h"
#include "gdk/win32/gdkwin32.h"
#include "gtk/gtkimmodule.h"
#include "gtk/deprecated/gtkstylecontextprivate.h"
@@ -61,9 +62,6 @@ typedef enum {
GTK_WIN32_IME_FOCUS_BEHAVIOR_FOLLOW,
} GtkWin32IMEFocusBehavior;
-#define IS_DEAD_KEY(k) \
- ((k) >= GDK_KEY_dead_grave && (k) <= (GDK_KEY_dead_dasia+1))
-
struct _GtkIMContextIMEPrivate
{
/* When pretend_empty_preedit is set to TRUE,
@@ -81,7 +79,6 @@ struct _GtkIMContextIMEPrivate
* https://gitlab.gnome.org/GNOME/gtk/commit/c255ba68fc2c918dd84da48a472e7973d3c00b03
*/
gboolean pretend_empty_preedit;
- guint32 dead_key_keyval;
GtkWin32IMEFocusBehavior focus_behavior;
};
@@ -277,134 +274,26 @@ gtk_im_context_ime_set_client_widget (GtkIMContext *context,
context_ime->client_surface = surface;
}
-static gunichar
-_gtk_im_context_ime_dead_key_unichar (guint keyval,
- gboolean spacing)
-{
- switch (keyval)
- {
-#define CASE(keysym, unicode, spacing_unicode) \
- case GDK_KEY_dead_##keysym: return (spacing) ? spacing_unicode : unicode;
-
- CASE (grave, 0x0300, 0x0060);
- CASE (acute, 0x0301, 0x00b4);
- CASE (circumflex, 0x0302, 0x005e);
- CASE (tilde, 0x0303, 0x007e); /* Also used with perispomeni, 0x342. */
- CASE (macron, 0x0304, 0x00af);
- CASE (breve, 0x0306, 0x02d8);
- CASE (abovedot, 0x0307, 0x02d9);
- CASE (diaeresis, 0x0308, 0x00a8);
- CASE (hook, 0x0309, 0);
- CASE (abovering, 0x030A, 0x02da);
- CASE (doubleacute, 0x030B, 0x2dd);
- CASE (caron, 0x030C, 0x02c7);
- CASE (abovecomma, 0x0313, 0); /* Equivalent to psili */
- CASE (abovereversedcomma, 0x0314, 0); /* Equivalent to dasia */
- CASE (horn, 0x031B, 0); /* Legacy use for psili, 0x313 (or 0x343). */
- CASE (belowdot, 0x0323, 0);
- CASE (cedilla, 0x0327, 0x00b8);
- CASE (ogonek, 0x0328, 0); /* Legacy use for dasia, 0x314.*/
- CASE (iota, 0x0345, 0);
-
-#undef CASE
- default:
- return 0;
- }
-}
-
-static void
-_gtk_im_context_ime_commit_unichar (GtkIMContextIME *context_ime,
- gunichar c)
-{
- char utf8[10];
- int len;
-
- if (context_ime->priv->dead_key_keyval != 0)
- {
- gunichar combining;
-
- combining =
- _gtk_im_context_ime_dead_key_unichar (context_ime->priv->dead_key_keyval,
- FALSE);
- g_unichar_compose (c, combining, &c);
- }
-
- len = g_unichar_to_utf8 (c, utf8);
- utf8[len] = 0;
-
- g_signal_emit_by_name (context_ime, "commit", utf8);
- context_ime->priv->dead_key_keyval = 0;
-}
-
static gboolean
gtk_im_context_ime_filter_keypress (GtkIMContext *context,
GdkEvent *event)
{
GtkIMContextIME *context_ime;
- gboolean retval = FALSE;
- guint32 c;
- GdkModifierType state, consumed_modifiers, no_text_input_mask;
- guint keyval;
+ char *compose_sequence = NULL;
g_return_val_if_fail (GTK_IS_IM_CONTEXT_IME (context), FALSE);
g_return_val_if_fail (event, FALSE);
- if (gdk_event_get_event_type ((GdkEvent *) event) == GDK_KEY_RELEASE)
- return FALSE;
-
- no_text_input_mask = GDK_ALT_MASK|GDK_CONTROL_MASK;
-
- state = gdk_event_get_modifier_state ((GdkEvent *) event);
- consumed_modifiers = gdk_key_event_get_consumed_modifiers (event);
-
- if (state & no_text_input_mask & ~consumed_modifiers)
- return FALSE;
-
context_ime = GTK_IM_CONTEXT_IME (context);
- if (!context_ime->focus)
- return FALSE;
-
- if (!GDK_IS_SURFACE (context_ime->client_surface))
- return FALSE;
-
- keyval = gdk_key_event_get_keyval ((GdkEvent *) event);
-
- if (keyval == GDK_KEY_space &&
- context_ime->priv->dead_key_keyval != 0)
+ compose_sequence = gdk_key_event_get_compose_sequence (event);
+ if (compose_sequence)
{
- c = _gtk_im_context_ime_dead_key_unichar (context_ime->priv->dead_key_keyval, TRUE);
- context_ime->priv->dead_key_keyval = 0;
- _gtk_im_context_ime_commit_unichar (context_ime, c);
+ g_signal_emit_by_name (context_ime, "commit", compose_sequence);
return TRUE;
}
- c = gdk_keyval_to_unicode (keyval);
-
- if (c && !g_unichar_iscntrl(c))
- {
- _gtk_im_context_ime_commit_unichar (context_ime, c);
- retval = TRUE;
- }
- else if (IS_DEAD_KEY (keyval))
- {
- gunichar dead_key;
-
- dead_key = _gtk_im_context_ime_dead_key_unichar (keyval, FALSE);
-
- /* Emulate double input of dead keys */
- if (dead_key && keyval == context_ime->priv->dead_key_keyval)
- {
- c = _gtk_im_context_ime_dead_key_unichar (context_ime->priv->dead_key_keyval, TRUE);
- context_ime->priv->dead_key_keyval = 0;
- _gtk_im_context_ime_commit_unichar (context_ime, c);
- _gtk_im_context_ime_commit_unichar (context_ime, c);
- }
- else
- context_ime->priv->dead_key_keyval = keyval;
- }
-
- return retval;
+ return FALSE;
}
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index a0682bd617..8eede2b243 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -663,7 +663,8 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
gdk_event_get_modifier_state (event),
FALSE,
&translated,
- &translated);
+ &translated,
+ NULL);
gtk_im_context_filter_keypress (context, tmp_event);
gdk_event_unref (tmp_event);
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index dfa9e399ef..95e6d3f59a 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1084,7 +1084,8 @@ rewrite_event_for_toplevel (GdkEvent *event)
gdk_key_event_get_keycode (event),
gdk_event_get_modifier_state (event),
gdk_key_event_is_modifier (event),
- key, key_no_lock);
+ key, key_no_lock,
+ gdk_key_event_get_compose_sequence (event));
}
static gboolean
diff --git a/gtk/gtksingleselection.c b/gtk/gtksingleselection.c
index fb5c1ad435..7e06575872 100644
--- a/gtk/gtksingleselection.c
+++ b/gtk/gtksingleselection.c
@@ -200,7 +200,6 @@ gtk_single_selection_items_changed_cb (GListModel *model,
{
self->selected += added - removed;
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
}
else
{
@@ -216,7 +215,6 @@ gtk_single_selection_items_changed_cb (GListModel *model,
{
self->selected = position + i;
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
}
g_object_unref (item);
@@ -226,6 +224,8 @@ gtk_single_selection_items_changed_cb (GListModel *model,
}
if (i == added)
{
+ guint old_selected = self->selected;
+
/* the item really was deleted */
g_clear_object (&self->selected_item);
if (self->autoselect)
@@ -266,7 +266,9 @@ gtk_single_selection_items_changed_cb (GListModel *model,
g_clear_object (&self->selected_item);
self->selected = GTK_INVALID_LIST_POSITION;
}
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
+ if (old_selected != self->selected)
+ g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
+ /* the item was deleted above, so this is guaranteed to be new, even if the position didn't change */
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
}
}
diff --git a/tests/testmountoperation.c b/tests/testmountoperation.c
index 4c908a7c64..a255e644ef 100644
--- a/tests/testmountoperation.c
+++ b/tests/testmountoperation.c
@@ -148,11 +148,11 @@ main (int argc, char *argv[])
GPid pid;
pids = g_array_new (TRUE, FALSE, sizeof (GPid));
- pid = 1000;
+ pid = (GPid)1000;
g_array_append_val (pids, pid);
- pid = 2000;
+ pid = (GPid)2000;
g_array_append_val (pids, pid);
- pid = 3000;
+ pid = (GPid)3000;
g_array_append_val (pids, pid);
g_signal_emit_by_name (op, "show-processes", "Foo\nbar", pids, choices);