Add patches submitted upstream

This commit is contained in:
Björn Esser 2017-04-20 00:24:50 +02:00
parent 5620c9b27f
commit 5c82d5e378
15 changed files with 594 additions and 1 deletions

View File

@ -0,0 +1,69 @@
From a7eb80016ca13d33872b558cdb00eac353b3cde1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 22:56:37 +0200
Subject: [PATCH] Replace gdk_display_get_device_manager() Replace
gdk_device_manager_get_client_pointer()
---
src/ygtkmenubutton.c | 8 ++++++--
src/ygtkrichtext.c | 7 +++++--
src/ygtkwizard.c | 8 ++++++--
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/ygtkmenubutton.c b/src/ygtkmenubutton.c
index 147279d..be8b46a 100644
--- a/src/ygtkmenubutton.c
+++ b/src/ygtkmenubutton.c
@@ -101,9 +101,13 @@ void ygtk_popup_window_popup (GtkWidget *widget, gint x, gint y, guint activate_
gtk_widget_show (widget);
GdkWindow *window = gtk_widget_get_window (widget);
+
GdkDisplay *display = gdk_window_get_display (window);
- GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
- GdkDevice *pointer = gdk_device_manager_get_client_pointer (device_manager);
+
+ // GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
+ // GdkDevice *pointer = gdk_device_manager_get_client_pointer (device_manager);
+ GdkSeat *seat = gdk_display_get_default_seat (display);
+ GdkDevice *pointer = gdk_seat_get_pointer (seat);
// grab this with your teeth
if (gdk_device_grab (pointer, window, GDK_OWNERSHIP_NONE, TRUE,
diff --git a/src/ygtkrichtext.c b/src/ygtkrichtext.c
index 299fe91..2e0131c 100644
--- a/src/ygtkrichtext.c
+++ b/src/ygtkrichtext.c
@@ -178,8 +178,11 @@ static void set_cursor_if_appropriate (GtkTextView *view, gint wx, gint wy)
GdkWindow *window = gtk_widget_get_window (widget);
GdkDisplay *display = gdk_window_get_display (window);
- GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
- GdkDevice *pointer = gdk_device_manager_get_client_pointer (device_manager);
+
+ // GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
+ // GdkDevice *pointer = gdk_device_manager_get_client_pointer (device_manager);
+ GdkSeat *seat = gdk_display_get_default_seat (display);
+ GdkDevice *pointer = gdk_seat_get_pointer (seat);
gdk_window_get_device_position (window, pointer, &wx, &wy, NULL);
diff --git a/src/ygtkwizard.c b/src/ygtkwizard.c
index 34ccc46..6350c86 100644
--- a/src/ygtkwizard.c
+++ b/src/ygtkwizard.c
@@ -515,8 +515,12 @@ static gboolean ygtk_wizard_header_motion_notify_event (GtkWidget *widget, GdkEv
gdk_window_get_root_origin (event->window, &root_x, &root_y);
GdkDisplay *display = gdk_window_get_display (event->window);
- GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
- GdkDevice *pointer = gdk_device_manager_get_client_pointer (device_manager);
+
+ // GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
+ // GdkDevice *pointer = gdk_device_manager_get_client_pointer (device_manager);
+ GdkSeat *seat = gdk_display_get_default_seat (display);
+ GdkDevice *pointer = gdk_seat_get_pointer (seat);
+
gdk_window_get_device_position (event->window, pointer, &pointer_x, &pointer_y, NULL);
gint x = pointer_x + root_x - header->press_x;

View File

@ -0,0 +1,26 @@
From 7f6cc848f21e9f76c7247e46e934c80c339a0371 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 18:16:16 +0200
Subject: [PATCH] Replace gdk_cursor_new()
---
src/ygtkwizard.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/ygtkwizard.c b/src/ygtkwizard.c
index 69afc2b..34ccc46 100644
--- a/src/ygtkwizard.c
+++ b/src/ygtkwizard.c
@@ -485,7 +485,11 @@ static void ygtk_wizard_header_init (YGtkWizardHeader *header)
static gboolean ygtk_wizard_header_button_press_event (GtkWidget *widget, GdkEventButton *event)
{
if (event->button == 1) {
- GdkCursor *cursor = gdk_cursor_new (GDK_FLEUR);
+ // GdkCursor *cursor = gdk_cursor_new (GDK_FLEUR);
+ GdkCursor *cursor = gdk_cursor_new_for_display (
+ gdk_display_get_default (),
+ GDK_FLEUR);
+
gdk_window_set_cursor (event->window, cursor);
g_object_unref (cursor);

View File

@ -0,0 +1,22 @@
From d963977c528dc694f06ecd52a47c7f2129e1aca0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 17:25:30 +0200
Subject: [PATCH] Replace gtk_alignment_new()
---
src/YGFrame.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/YGFrame.cc b/src/YGFrame.cc
index 02bcbb3..e1a42fa 100644
--- a/src/YGFrame.cc
+++ b/src/YGFrame.cc
@@ -23,7 +23,7 @@ GtkWidget *m_containee;
: YGWidget (ywidget, parent,
GTK_TYPE_FRAME, "shadow-type", GTK_SHADOW_NONE, NULL)
{
- m_containee = gtk_alignment_new (0, 0, 1, 1);
+ m_containee = gtk_widget_new (GTK_TYPE_FRAME, NULL);
// gtk_alignment_set_padding (GTK_ALIGNMENT (m_containee),
// 0, 0, CHILD_INDENTATION, 0);

View File

@ -0,0 +1,30 @@
From 8ab57a0d462e3d65859cd56bcd1b73eacba9740d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 17:13:04 +0200
Subject: [PATCH] Replace gtk_alignment_set_padding()
---
src/YGFrame.cc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/YGFrame.cc b/src/YGFrame.cc
index 4f3e887..02bcbb3 100644
--- a/src/YGFrame.cc
+++ b/src/YGFrame.cc
@@ -24,8 +24,14 @@ GtkWidget *m_containee;
GTK_TYPE_FRAME, "shadow-type", GTK_SHADOW_NONE, NULL)
{
m_containee = gtk_alignment_new (0, 0, 1, 1);
- gtk_alignment_set_padding (GTK_ALIGNMENT (m_containee),
- 0, 0, CHILD_INDENTATION, 0);
+
+ // gtk_alignment_set_padding (GTK_ALIGNMENT (m_containee),
+ // 0, 0, CHILD_INDENTATION, 0);
+ gtk_widget_set_margin_top (m_containee, 0);
+ gtk_widget_set_margin_bottom (m_containee, 0);
+ gtk_widget_set_margin_start (m_containee, CHILD_INDENTATION);
+ gtk_widget_set_margin_end (m_containee, 0);
+
gtk_widget_show (m_containee);
gtk_container_add (GTK_CONTAINER (getWidget()), m_containee);
}

View File

@ -0,0 +1,24 @@
From 509292d88c1cf4bf198aab2d7e5e5d075f301722 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 21:49:06 +0200
Subject: [PATCH] Replace gtk_arrow_new()
---
src/ygtkmenubutton.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/ygtkmenubutton.c b/src/ygtkmenubutton.c
index e825538..147279d 100644
--- a/src/ygtkmenubutton.c
+++ b/src/ygtkmenubutton.c
@@ -247,7 +247,9 @@ void ygtk_menu_button_set_label (YGtkMenuButton *button, const gchar *label)
GtkWidget *hbox, *arrow;
hbox = YGTK_HBOX_NEW(4);
gtk_box_set_homogeneous (GTK_BOX (hbox), FALSE);
- arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN);
+ // arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN);
+ arrow = gtk_image_new_from_icon_name ("pan-down-symbolic",
+ GTK_ICON_SIZE_BUTTON);
button->label = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox), button->label, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), arrow, FALSE, TRUE, 0);

View File

@ -0,0 +1,73 @@
From 1191d564180b0a2ca489fdc762c302cc65a8c876 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 20:37:11 +0200
Subject: [PATCH] Replace gtk_menu_popup()
---
src/YGMenuButton.cc | 4 +++-
src/ygtkmenubutton.c | 6 ++++--
src/ygtktreeview.c | 9 +++++++--
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/YGMenuButton.cc b/src/YGMenuButton.cc
index 5863467..ba6cc58 100644
--- a/src/YGMenuButton.cc
+++ b/src/YGMenuButton.cc
@@ -92,7 +92,9 @@ class YGContextMenu : public YContextMenu, public YGWidget
GtkWidget *menu = getWidget();
doCreateMenu (menu, itemsBegin(), itemsEnd());
gtk_widget_show_all (menu);
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, gtk_get_current_event_time());
+
+ // gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, gtk_get_current_event_time());
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
}
// callbacks
diff --git a/src/ygtkmenubutton.c b/src/ygtkmenubutton.c
index 5ed81a5..e825538 100644
--- a/src/ygtkmenubutton.c
+++ b/src/ygtkmenubutton.c
@@ -191,8 +191,10 @@ static void ygtk_menu_button_show_popup (YGtkMenuButton *button)
guint activate_time = gtk_get_current_event_time();
if (GTK_IS_MENU (popup))
- gtk_menu_popup (GTK_MENU (popup), NULL, NULL, ygtk_menu_button_get_menu_pos,
- button, 0, activate_time);
+ // gtk_menu_popup (GTK_MENU (popup), NULL, NULL, ygtk_menu_button_get_menu_pos,
+ // button, 0, activate_time);
+ gtk_menu_popup_at_pointer (GTK_MENU (popup), NULL);
+
else { // GTK_IS_WINDOW
gint x, y;
ygtk_menu_button_get_popup_pos (button, &x, &y);
diff --git a/src/ygtktreeview.c b/src/ygtktreeview.c
index ad59efd..cf21828 100644
--- a/src/ygtktreeview.c
+++ b/src/ygtktreeview.c
@@ -40,9 +40,11 @@ static void _gtk_widget_destroy (gpointer widget)
static guint32 _popup_time = 0;
static gint _popup_x = 0, _popup_y = 0;
+/*
static void _ygtk_tree_view_menu_position_func (
GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
{ *x = _popup_x; *y = _popup_y; }
+*/
void ygtk_tree_view_popup_menu (YGtkTreeView *view, GtkWidget *menu)
{
@@ -52,8 +54,11 @@ void ygtk_tree_view_popup_menu (YGtkTreeView *view, GtkWidget *menu)
g_object_set_data_full (G_OBJECT (view), "popup", menu, _gtk_widget_destroy);
gtk_menu_attach_to_widget (GTK_MENU (menu), widget, NULL);
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
- _ygtk_tree_view_menu_position_func, widget, 3, _popup_time);
+
+ // gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
+ // _ygtk_tree_view_menu_position_func, widget, 3, _popup_time);
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
+
gtk_widget_show_all (menu);
}

View File

@ -0,0 +1,134 @@
From 2c5c33d978b95bc9dd7613ddfc61810fa42c2ec8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 16:15:11 +0200
Subject: [PATCH] Replace gtk_misc_set_alignment()
---
src/YGDialog.cc | 5 ++++-
src/YGLabel.cc | 5 ++++-
src/YGWidget.cc | 12 ++++++++++--
src/ygtksteps.c | 11 +++++++++--
src/ygtkwizard.c | 12 ++++++++++--
5 files changed, 37 insertions(+), 8 deletions(-)
diff --git a/src/YGDialog.cc b/src/YGDialog.cc
index 8649dba..d811ec1 100644
--- a/src/YGDialog.cc
+++ b/src/YGDialog.cc
@@ -319,7 +319,10 @@ YGDialog::YGDialog (YDialogType dialogType, YDialogColorMode colorMode)
(colorMode == YDialogWarnColor ? "dialog-warning" : "dialog-information",
GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0);
+ // gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0);
+ gtk_widget_set_halign (icon, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (icon, GTK_ALIGN_START);
+
gtk_misc_set_padding (GTK_MISC (icon), 0, 12);
gtk_box_pack_start (GTK_BOX (getWidget()), icon, FALSE, FALSE, 12);
diff --git a/src/YGLabel.cc b/src/YGLabel.cc
index 71f51c4..495bc97 100644
--- a/src/YGLabel.cc
+++ b/src/YGLabel.cc
@@ -15,7 +15,10 @@ class YGLabel : public YLabel, public YGWidget
: YLabel (NULL, text, heading, outputField),
YGWidget (this, parent, GTK_TYPE_LABEL, NULL)
{
- gtk_misc_set_alignment (GTK_MISC (getWidget()), 0.0, 0.5);
+ // gtk_misc_set_alignment (GTK_MISC (getWidget()), 0.0, 0.5);
+ gtk_widget_set_halign (getWidget(), GTK_ALIGN_START);
+ gtk_widget_set_valign (getWidget(), GTK_ALIGN_CENTER);
+
if (outputField) {
gtk_label_set_selectable (GTK_LABEL (getWidget()), TRUE);
gtk_label_set_single_line_mode (GTK_LABEL (getWidget()), TRUE);
diff --git a/src/YGWidget.cc b/src/YGWidget.cc
index 4cfacf4..0afd606 100644
--- a/src/YGWidget.cc
+++ b/src/YGWidget.cc
@@ -247,7 +247,11 @@ YGLabeledWidget::YGLabeledWidget (YWidget *ywidget, YWidget *parent,
// Create the label
m_label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (m_label), 0.0, 0.5);
+
+ // gtk_misc_set_alignment (GTK_MISC (m_label), 0.0, 0.5);
+ gtk_widget_set_halign (m_label, GTK_ALIGN_START);
+ gtk_widget_set_valign (m_label, GTK_ALIGN_CENTER);
+
/* if (label_ori == YD_HORIZ)
gtk_label_set_line_wrap (GTK_LABEL (m_label), TRUE);*/
gtk_widget_show (m_label);
@@ -277,7 +281,11 @@ YGLabeledWidget::YGLabeledWidget (YWidget *ywidget, YWidget *parent,
// Create the label
m_label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (m_label), 0.0, 0.5);
+
+ // gtk_misc_set_alignment (GTK_MISC (m_label), 0.0, 0.5);
+ gtk_widget_set_halign (m_label, GTK_ALIGN_START);
+ gtk_widget_set_valign (m_label, GTK_ALIGN_CENTER);
+
/* if (label_ori == YD_HORIZ)
gtk_label_set_line_wrap (GTK_LABEL (m_label), TRUE);*/
gtk_widget_show (m_label);
diff --git a/src/ygtksteps.c b/src/ygtksteps.c
index d5c0077..eefe2e9 100644
--- a/src/ygtksteps.c
+++ b/src/ygtksteps.c
@@ -140,7 +140,11 @@ gint ygtk_steps_append (YGtkSteps *steps, const gchar *text)
GtkWidget *label = gtk_label_new (text);
GdkRGBA black = { 0.0, 0.0, 0.0, 1.0 };
gtk_widget_override_color (label, GTK_STATE_NORMAL, &black);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+
+ // gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_START);
+
int mark_width = 10;
pango_layout_get_pixel_size (steps->check_mark_layout, &mark_width, NULL);
gtk_misc_set_padding (GTK_MISC (label), mark_width+12, 0);
@@ -155,7 +159,10 @@ void ygtk_steps_append_heading (YGtkSteps *steps, const gchar *heading)
GdkRGBA black = { 0.0, 0.0, 0.0, 1.0 };
gtk_widget_override_color (label, GTK_STATE_NORMAL, &black);
g_object_set_data (G_OBJECT (label), "is-header", GINT_TO_POINTER (1));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+
+ //gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_START);
PangoAttrList *attrbs = pango_attr_list_new();
pango_attr_list_insert (attrbs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
diff --git a/src/ygtkwizard.c b/src/ygtkwizard.c
index 0efc9c4..69afc2b 100644
--- a/src/ygtkwizard.c
+++ b/src/ygtkwizard.c
@@ -161,7 +161,11 @@ static void ygtk_help_dialog_init (YGtkHelpDialog *dialog)
char *label_str = ygutils_mapKBAccel (_("&Find:"));
GtkWidget *bottom_box, *label = gtk_label_new_with_mnemonic (label_str);
g_free (label_str);
- gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
+
+ // gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+
gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->search_entry);
bottom_box = YGTK_HBOX_NEW(2);
@@ -439,7 +443,11 @@ static void ygtk_wizard_header_init (YGtkWizardHeader *header)
header->title = gtk_label_new ("");
gtk_label_set_ellipsize (GTK_LABEL (header->title), PANGO_ELLIPSIZE_END);
- gtk_misc_set_alignment (GTK_MISC (header->title), 0, 0.5);
+
+ // gtk_misc_set_alignment (GTK_MISC (header->title), 0, 0.5);
+ gtk_widget_set_halign (header->title, GTK_ALIGN_START);
+ gtk_widget_set_valign (header->title, GTK_ALIGN_CENTER);
+
ygutils_setWidgetFont (header->title, PANGO_STYLE_NORMAL, PANGO_WEIGHT_BOLD,
PANGO_SCALE_X_LARGE);
GdkRGBA black = { 0.0, 0.0, 0.0, 1.0 };

View File

@ -0,0 +1,46 @@
From a7b7b50c21f6e59b1325143dcbdf8555d4027804 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 16:16:02 +0200
Subject: [PATCH] Replace gtk_misc_set_padding()
---
src/YGDialog.cc | 6 +++++-
src/ygtksteps.c | 8 +++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/YGDialog.cc b/src/YGDialog.cc
index d811ec1..5ebe1eb 100644
--- a/src/YGDialog.cc
+++ b/src/YGDialog.cc
@@ -323,7 +323,11 @@ YGDialog::YGDialog (YDialogType dialogType, YDialogColorMode colorMode)
gtk_widget_set_halign (icon, GTK_ALIGN_CENTER);
gtk_widget_set_valign (icon, GTK_ALIGN_START);
- gtk_misc_set_padding (GTK_MISC (icon), 0, 12);
+ // gtk_misc_set_padding (GTK_MISC (icon), 0, 12);
+ gtk_widget_set_margin_start (icon, 0);
+ gtk_widget_set_margin_end (icon, 0);
+ gtk_widget_set_margin_top (icon, 12);
+ gtk_widget_set_margin_bottom (icon, 12);
gtk_box_pack_start (GTK_BOX (getWidget()), icon, FALSE, FALSE, 12);
gtk_box_pack_start (GTK_BOX (getWidget()), m_containee, TRUE, TRUE, 0);
diff --git a/src/ygtksteps.c b/src/ygtksteps.c
index eefe2e9..292760c 100644
--- a/src/ygtksteps.c
+++ b/src/ygtksteps.c
@@ -147,7 +147,13 @@ gint ygtk_steps_append (YGtkSteps *steps, const gchar *text)
int mark_width = 10;
pango_layout_get_pixel_size (steps->check_mark_layout, &mark_width, NULL);
- gtk_misc_set_padding (GTK_MISC (label), mark_width+12, 0);
+
+ // gtk_misc_set_padding (GTK_MISC (label), mark_width+12, 0);
+ gtk_widget_set_margin_start (label, mark_width+12);
+ gtk_widget_set_margin_end (label, mark_width+12);
+ gtk_widget_set_margin_top (label, 0);
+ gtk_widget_set_margin_bottom (label, 0);
+
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (steps), label, FALSE, TRUE, 0);
return ygtk_steps_total (steps)-1;

View File

@ -0,0 +1,23 @@
From 5077aae7d96d607d96600a38484384ca8e5a0dee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 13:32:08 +0200
Subject: [PATCH] Replace gtk_style_context_get_background_color()
---
src/ygtkbargraph.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ygtkbargraph.c b/src/ygtkbargraph.c
index c96fc02..0b6d08c 100644
--- a/src/ygtkbargraph.c
+++ b/src/ygtkbargraph.c
@@ -190,7 +190,8 @@ static gboolean ygtk_colored_label_on_draw (GtkWidget *widget, cairo_t *cr)
ctx = gtk_widget_get_style_context(widget);
GdkRGBA color;
- gtk_style_context_get_background_color(ctx, GTK_STATE_NORMAL, &color);
+ gtk_style_context_get (ctx, GTK_STATE_NORMAL,
+ "background-color", &color, NULL);
cairo_save(cr);
int width = gtk_widget_get_allocated_width (widget);

View File

@ -0,0 +1,22 @@
From 355cbac51273f87b68e19430f591cee2c16766ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 21:33:25 +0200
Subject: [PATCH] Remove gtk_tree_view_set_rules_hint()
---
src/YGTreeView.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/YGTreeView.cc b/src/YGTreeView.cc
index bb62a53..be4c8ff 100644
--- a/src/YGTreeView.cc
+++ b/src/YGTreeView.cc
@@ -354,7 +354,7 @@ class YGTable : public YTable, public YGTreeView
YGTreeView (this, parent, std::string(), false)
{
gtk_tree_view_set_headers_visible (getView(), TRUE);
- gtk_tree_view_set_rules_hint (getView(), columns() > 1);
+ // gtk_tree_view_set_rules_hint (getView(), columns() > 1);
ygtk_tree_view_set_empty_text (YGTK_TREE_VIEW (getView()), _("No entries."));
if (multiSelection)
gtk_tree_selection_set_mode (getSelection(), GTK_SELECTION_MULTIPLE);

View File

@ -0,0 +1,22 @@
From 11884a67cf26ed46e967dca9dee5e6fa32eb92b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 19:08:35 +0200
Subject: [PATCH] Replace gtk_widget_get_root_window()
---
src/ygtkmenubutton.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ygtkmenubutton.c b/src/ygtkmenubutton.c
index 22c96a6..5ed81a5 100644
--- a/src/ygtkmenubutton.c
+++ b/src/ygtkmenubutton.c
@@ -76,7 +76,7 @@ static void ygtk_popup_window_frame_position (GtkWidget *widget, gint *x, gint
gtk_widget_get_preferred_size(widget, &req, NULL);
GdkScreen *screen = gtk_widget_get_screen (widget);
- gint monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_root_window (widget));
+ gint monitor_num = gdk_screen_get_monitor_at_window (screen, gdk_screen_get_root_window (gtk_widget_get_screen (widget)));
GdkRectangle monitor;
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);

View File

@ -0,0 +1,22 @@
From 21ecc082bdf5628b91bb844e6993de4789e5d15d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 15:38:50 +0200
Subject: [PATCH] Remove obsolete gtk_window_set_has_resize_grip()
---
src/YGDialog.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/YGDialog.cc b/src/YGDialog.cc
index 5d7ce55..8649dba 100644
--- a/src/YGDialog.cc
+++ b/src/YGDialog.cc
@@ -54,7 +54,7 @@ class YGWindow
m_widget = ygtk_window_new();
// gtk_container_set_resize_mode (GTK_CONTAINER (m_widget), GTK_RESIZE_PARENT);
g_object_ref_sink (G_OBJECT (m_widget));
- gtk_window_set_has_resize_grip (GTK_WINDOW (m_widget), TRUE);
+ // gtk_window_set_has_resize_grip (GTK_WINDOW (m_widget), TRUE);
m_refcount = 0;
m_child = NULL;

View File

@ -0,0 +1,38 @@
From cc3ac74b1186b33bd9e6dcd532e189b5b4cb29bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 11:04:39 +0200
Subject: [PATCH] Fix Werror=misleading-indentation
---
src/YGDialog.cc | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/YGDialog.cc b/src/YGDialog.cc
index 0e26534..cccfaf2 100644
--- a/src/YGDialog.cc
+++ b/src/YGDialog.cc
@@ -127,17 +127,17 @@ class YGWindow
if (YGUI::ui()->isSwsingle())
height += YGUtils::getCharsHeight (m_widget, 10);
- width = MIN (width, YUI::app()->displayWidth());
- height = MIN (height, YUI::app()->displayHeight());
+ width = MIN (width, YUI::app()->displayWidth());
+ height = MIN (height, YUI::app()->displayHeight());
gtk_window_set_default_size (window, width, height);
gtk_window_resize(window, width, height);
- if (YGUI::ui()->setFullscreen())
- gtk_window_fullscreen (window);
- else if (YUI::app()->displayWidth() <= 800 || YUI::app()->displayHeight() <= 600)
- // maximize window for small displays
- gtk_window_maximize (window);
+ if (YGUI::ui()->setFullscreen())
+ gtk_window_fullscreen (window);
+ else if (YUI::app()->displayWidth() <= 800 || YUI::app()->displayHeight() <= 600)
+ // maximize window for small displays
+ gtk_window_maximize (window);
}
gtk_window_set_role (window, "yast2");

View File

@ -0,0 +1,22 @@
From e48985c2384ee09fe60fd06003b013e90c94205a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Wed, 19 Apr 2017 15:37:16 +0200
Subject: [PATCH] Remove obsolete gtk_container_set_resize_mode()
---
src/YGDialog.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/YGDialog.cc b/src/YGDialog.cc
index cccfaf2..5d7ce55 100644
--- a/src/YGDialog.cc
+++ b/src/YGDialog.cc
@@ -52,7 +52,7 @@ class YGWindow
YGWindow (bool _main_window, YGDialog *ydialog)
{
m_widget = ygtk_window_new();
- gtk_container_set_resize_mode (GTK_CONTAINER (m_widget), GTK_RESIZE_PARENT);
+ // gtk_container_set_resize_mode (GTK_CONTAINER (m_widget), GTK_RESIZE_PARENT);
g_object_ref_sink (G_OBJECT (m_widget));
gtk_window_set_has_resize_grip (GTK_WINDOW (m_widget), TRUE);

View File

@ -7,13 +7,30 @@
Name: libyui-gtk
Version: 2.44.9
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Gtk3 User Interface for libyui
License: LGPLv2 or LGPLv3
URL: https://github.com/libyui/%{name}
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# Patches submitted upstream.
# See: https://github.com/libyui/libyui-gtk/pull/58
Patch10: https://github.com/besser82/libyui-gtk/commit/cc3ac74b1186b33bd9e6dcd532e189b5b4cb29bb.patch#/libyui-gtk-2.44.9-fix_misleading_indentation.patch
Patch11: https://github.com/besser82/libyui-gtk/commit/5077aae7d96d607d96600a38484384ca8e5a0dee.patch#/libyui-gtk-2.44.9-fix_gtk_style_context_get_background_color.patch
Patch12: https://github.com/besser82/libyui-gtk/commit/e48985c2384ee09fe60fd06003b013e90c94205a.patch#/libyui-gtk-2.44.9-fix_obsolete gtk_container_set_resize_mode.patch
Patch13: https://github.com/besser82/libyui-gtk/commit/21ecc082bdf5628b91bb844e6993de4789e5d15d.patch#/libyui-gtk-2.44.9-fix_gtk_window_set_has_resize_grip.patch
Patch14: https://github.com/besser82/libyui-gtk/commit/2c5c33d978b95bc9dd7613ddfc61810fa42c2ec8.patch#/libyui-gtk-2.44.9-fix_gtk_misc_set_alignment.patch
Patch15: https://github.com/besser82/libyui-gtk/commit/a7b7b50c21f6e59b1325143dcbdf8555d4027804.patch#/libyui-gtk-2.44.9-fix_gtk_misc_set_padding.patch
Patch16: https://github.com/besser82/libyui-gtk/commit/8ab57a0d462e3d65859cd56bcd1b73eacba9740d.patch#/libyui-gtk-2.44.9-fix_gtk_alignment_set_padding.patch
Patch17: https://github.com/besser82/libyui-gtk/commit/d963977c528dc694f06ecd52a47c7f2129e1aca0.patch#/libyui-gtk-2.44.9-fix_gtk_alignment_new.patch
Patch18: https://github.com/besser82/libyui-gtk/commit/7f6cc848f21e9f76c7247e46e934c80c339a0371.patch#/libyui-gtk-2.44.9-fix_gdk_cursor_new.patch
Patch19: https://github.com/besser82/libyui-gtk/commit/11884a67cf26ed46e967dca9dee5e6fa32eb92b6.patch#/libyui-gtk-2.44.9-fix_gtk_widget_get_root_window.patch
Patch20: https://github.com/besser82/libyui-gtk/commit/1191d564180b0a2ca489fdc762c302cc65a8c876.patch#/libyui-gtk-2.44.9-fix_gtk_menu_popup.patch
Patch21: https://github.com/besser82/libyui-gtk/commit/355cbac51273f87b68e19430f591cee2c16766ed.patch#/libyui-gtk-2.44.9-fix_gtk_tree_view_set_rules_hint.patch
Patch22: https://github.com/besser82/libyui-gtk/commit/509292d88c1cf4bf198aab2d7e5e5d075f301722.patch#/libyui-gtk-2.44.9-fix_gtk_arrow_new.patch
Patch23: https://github.com/besser82/libyui-gtk/commit/a7eb80016ca13d33872b558cdb00eac353b3cde1.patch#/libyui-gtk-2.44.9-fix_display_get_device_manager_gdk_device_manager_get_client_pointer.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: gtk3-devel
@ -118,6 +135,9 @@ popd
%changelog
* Wed Apr 19 2017 Björn Esser <besser82@fedoraproject.org> - 2.44.9-3
- Add patches submitted upstream
* Fri Apr 14 2017 Björn Esser <besser82@fedoraproject.org> - 2.44.9-2
- Change Supplements: back to gtk3, since libYUI provides selection
of UI-plugin based on used desktop environment