[planner: 38/61] Replace GDK_<keyname> with GDK_KEY_<keyname>
- From: Mart Raudsepp <mraudsepp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [planner: 38/61] Replace GDK_<keyname> with GDK_KEY_<keyname>
- Date: Sat, 12 Jun 2021 17:30:26 +0000 (UTC)
commit 31fa7efd8db915df3d34fb202cf62ca61b4e730e
Author: Mart Raudsepp <leio gentoo org>
Date: Sun Dec 27 17:25:07 2020 +0200
Replace GDK_<keyname> with GDK_KEY_<keyname>
The new names were added in GTK-2.22 and old are gone in GTK3
src/planner-calendar.c | 20 ++++++++++----------
src/planner-cell-renderer-popup.c | 12 ++++++------
src/planner-eds-plugin.c | 2 +-
src/planner-popup-entry.c | 4 ++--
src/planner-task-tree.c | 8 ++++----
5 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/src/planner-calendar.c b/src/planner-calendar.c
index 33aece88..5d7b1d39 100644
--- a/src/planner-calendar.c
+++ b/src/planner-calendar.c
@@ -2611,8 +2611,8 @@ planner_calendar_key_press (GtkWidget *widget,
switch (event->keyval)
{
- case GDK_KP_Left:
- case GDK_Left:
+ case GDK_KEY_KP_Left:
+ case GDK_KEY_Left:
return_val = TRUE;
if (event->state & GDK_CONTROL_MASK)
{
@@ -2634,8 +2634,8 @@ planner_calendar_key_press (GtkWidget *widget,
calendar->focus_col);
}
break;
- case GDK_KP_Right:
- case GDK_Right:
+ case GDK_KEY_KP_Right:
+ case GDK_KEY_Right:
return_val = TRUE;
if (event->state & GDK_CONTROL_MASK)
{
@@ -2657,8 +2657,8 @@ planner_calendar_key_press (GtkWidget *widget,
calendar->focus_col);
}
break;
- case GDK_KP_Up:
- case GDK_Up:
+ case GDK_KEY_KP_Up:
+ case GDK_KEY_Up:
return_val = TRUE;
if (event->state & GDK_CONTROL_MASK)
{
@@ -2675,8 +2675,8 @@ planner_calendar_key_press (GtkWidget *widget,
calendar->focus_col);
}
break;
- case GDK_KP_Down:
- case GDK_Down:
+ case GDK_KEY_KP_Down:
+ case GDK_KEY_Down:
return_val = TRUE;
if (event->state & GDK_CONTROL_MASK)
{
@@ -2693,8 +2693,8 @@ planner_calendar_key_press (GtkWidget *widget,
calendar->focus_col);
}
break;
- case GDK_KP_Space:
- case GDK_space:
+ case GDK_KEY_KP_Space:
+ case GDK_KEY_space:
row = calendar->focus_row;
col = calendar->focus_col;
day = calendar->day[row][col];
diff --git a/src/planner-cell-renderer-popup.c b/src/planner-cell-renderer-popup.c
index 9168fe5a..258344c7 100644
--- a/src/planner-cell-renderer-popup.c
+++ b/src/planner-cell-renderer-popup.c
@@ -447,15 +447,15 @@ mcrp_key_press_event (GtkWidget *popup_window,
GdkEventKey *event,
PlannerCellRendererPopup *cell)
{
- if (event->keyval != GDK_Escape &&
- event->keyval != GDK_Return &&
- event->keyval != GDK_KP_Enter &&
- event->keyval != GDK_ISO_Enter &&
- event->keyval != GDK_3270_Enter) {
+ if (event->keyval != GDK_KEY_Escape &&
+ event->keyval != GDK_KEY_Return &&
+ event->keyval != GDK_KEY_KP_Enter &&
+ event->keyval != GDK_KEY_ISO_Enter &&
+ event->keyval != GDK_KEY_3270_Enter) {
return FALSE;
}
- if (event->keyval == GDK_Escape) {
+ if (event->keyval == GDK_KEY_Escape) {
cell->editing_canceled = TRUE;
} else {
cell->editing_canceled = FALSE;
diff --git a/src/planner-eds-plugin.c b/src/planner-eds-plugin.c
index 0dd5dc49..23847341 100644
--- a/src/planner-eds-plugin.c
+++ b/src/planner-eds-plugin.c
@@ -836,7 +836,7 @@ eds_search_key_pressed (GtkEntry *entry,
GtkTreeIter iter;
ESource *source;
- if (event->keyval == GDK_Return) {
+ if (event->keyval == GDK_KEY_Return) {
if (gtk_combo_box_get_active_iter (priv->select_group, &iter)) {
gtk_tree_model_get (priv->groups_model, &iter,
COL_GROUP_OBJECT, &source, -1);
diff --git a/src/planner-popup-entry.c b/src/planner-popup-entry.c
index d8a0594b..9471c722 100644
--- a/src/planner-popup-entry.c
+++ b/src/planner-popup-entry.c
@@ -146,7 +146,7 @@ gtk_cell_editable_key_press_event (GtkEntry *entry,
GdkEventKey *key_event,
PlannerPopupEntry *widget)
{
- if (key_event->keyval == GDK_Escape) {
+ if (key_event->keyval == GDK_KEY_Escape) {
widget->editing_canceled = TRUE;
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (widget));
@@ -165,7 +165,7 @@ mpw_key_press_event (GtkWidget *box,
PlannerPopupEntry *widget = PLANNER_POPUP_ENTRY (box);
GdkEvent tmp_event;
- if (key_event->keyval == GDK_Escape) {
+ if (key_event->keyval == GDK_KEY_Escape) {
widget->editing_canceled = TRUE;
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (widget));
diff --git a/src/planner-task-tree.c b/src/planner-task-tree.c
index b3c81f7f..82d1d54c 100644
--- a/src/planner-task-tree.c
+++ b/src/planner-task-tree.c
@@ -1291,10 +1291,10 @@ task_tree_tree_view_key_release_event (GtkTreeView *tree_view,
PlannerTaskTree *tree)
{
if (!(event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK))) {
- if (event->keyval & (GDK_Up | GDK_Page_Up | GDK_KP_Up |
- GDK_KP_Page_Up | GDK_Pointer_Up | GDK_ISO_Move_Line_Up |
- GDK_Down | GDK_Page_Down | GDK_KP_Down | GDK_KP_Page_Down |
- GDK_Pointer_Down | GDK_ISO_Move_Line_Down)) {
+ if (event->keyval & (GDK_KEY_Up | GDK_KEY_Page_Up | GDK_KEY_KP_Up |
+ GDK_KEY_KP_Page_Up | GDK_KEY_Pointer_Up | GDK_KEY_ISO_Move_Line_Up |
+ GDK_KEY_Down | GDK_KEY_Page_Down | GDK_KEY_KP_Down | GDK_KEY_KP_Page_Down |
+ GDK_KEY_Pointer_Down | GDK_KEY_ISO_Move_Line_Down)) {
GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view);
GList *list = gtk_tree_selection_get_selected_rows (selection, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]