Re: [virt-tools-list] [PATCH v2 virt-viewer] Get rid of deprecated functions to customize widget colors

2016-06-29 Thread Pavel Grunt
On Wed, 2016-06-29 at 10:24 -0300, Eduardo Lima (Etrunko) wrote:
> On 06/29/2016 05:08 AM, Pavel Grunt wrote:
> > 
> > Hi,
> > 
> > Imo the commit message should say that there are issues with the font /
> > background colour since commit ... in some gtk versions - like you said in
> > the
> > comment for v1, because that is the reason for this patch. Getting rid of
> > deprecated functions is a "side effect".
> > 
> 
> Well, if you notice the previous email, the message was after the line
> starting with '---' meaning it would be ignored. 

yeah, I called it "comment", not sure if it is the correct term

> I wanted to explain why
> I was doing it only for 3.20 and thought it would not matter in the
> commit message. Anyway, I will add more information to the commit
> message and push it.
> 
ok

Pavel

___
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list


Re: [virt-tools-list] [PATCH v2 virt-viewer] Get rid of deprecated functions to customize widget colors

2016-06-29 Thread Eduardo Lima (Etrunko)
On 06/29/2016 05:08 AM, Pavel Grunt wrote:
> Hi,
> 
> Imo the commit message should say that there are issues with the font /
> background colour since commit ... in some gtk versions - like you said in the
> comment for v1, because that is the reason for this patch. Getting rid of
> deprecated functions is a "side effect".
> 

Well, if you notice the previous email, the message was after the line
starting with '---' meaning it would be ignored. I wanted to explain why
I was doing it only for 3.20 and thought it would not matter in the
commit message. Anyway, I will add more information to the commit
message and push it.


-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etru...@redhat.com

___
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list


Re: [virt-tools-list] [PATCH v2 virt-viewer] Get rid of deprecated functions to customize widget colors

2016-06-29 Thread Pavel Grunt
Hi,

Imo the commit message should say that there are issues with the font /
background colour since commit ... in some gtk versions - like you said in the
comment for v1, because that is the reason for this patch. Getting rid of
deprecated functions is a "side effect".

On Tue, 2016-06-28 at 15:10 -0300, Eduardo Lima (Etrunko) wrote:
> Let's just stick with default theme colors.
> 
> Fixes https://bugs.freedesktop.org/show_bug.cgi?id=94276

(Well, it makes the bug "invalid", maybe Resolves ;))
> 
> Signed-off-by: Eduardo Lima (Etrunko) 
> ---
>  src/virt-viewer-notebook.c | 13 ++---
>  src/virt-viewer-window.c   | 10 --
>  2 files changed, 2 insertions(+), 21 deletions(-)
> 
> diff --git a/src/virt-viewer-notebook.c b/src/virt-viewer-notebook.c
> index 420c914..8bb9977 100644
> --- a/src/virt-viewer-notebook.c
> +++ b/src/virt-viewer-notebook.c
> @@ -71,25 +71,16 @@ static void
>  virt_viewer_notebook_init (VirtViewerNotebook *self)
>  {
>  VirtViewerNotebookPrivate *priv;
> -GdkRGBA color;
>  
>  self->priv = GET_PRIVATE(self);
>  priv = self->priv;
>  
> -priv->status = gtk_label_new("");
>  gtk_notebook_set_show_tabs(GTK_NOTEBOOK(self), FALSE);
>  gtk_notebook_set_show_border(GTK_NOTEBOOK(self), FALSE);
> +
> +priv->status = gtk_label_new("");
no need to move

>  gtk_widget_show_all(priv->status);
>  gtk_notebook_append_page(GTK_NOTEBOOK(self), priv->status, NULL);
> -gdk_rgba_parse(, "white");
> -/* FIXME:
> - * This method has been deprecated in 3.16.
> - * For more details on how to deal with this in the future, please, see:
> - * https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-over
> ride-color
> - * For the bug report about this deprecated function, please, see:
> - * https://bugs.freedesktop.org/show_bug.cgi?id=94276
> - */
> -gtk_widget_override_color(priv->status, GTK_STATE_FLAG_NORMAL, );
>  }
>  
>  void
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index 1ebb423..c59fff5 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -297,7 +297,6 @@ virt_viewer_window_init (VirtViewerWindow *self)
>  {
>  VirtViewerWindowPrivate *priv;
>  GtkWidget *vbox;
> -GdkRGBA color;
>  GSList *accels;
>  
>  self->priv = GET_PRIVATE(self);
> @@ -340,15 +339,6 @@ virt_viewer_window_init (VirtViewerWindow *self)
>  virt_viewer_window_toolbar_setup(self);
>  
>  gtk_box_pack_end(GTK_BOX(vbox), GTK_WIDGET(priv->notebook), TRUE, TRUE,
> 0);
> -gdk_rgba_parse(, "black");
> -/* FIXME:
> - * This method has been deprecated in 3.16.
> - * For more details on how to deal with this in the future, please, see:
> - * https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-over
> ride-background-color
> - * For the bug report about this deprecated function, please, see:
> - * https://bugs.freedesktop.org/show_bug.cgi?id=94276
> - */
> -gtk_widget_override_background_color(GTK_WIDGET(priv->notebook),
> GTK_STATE_FLAG_NORMAL, );
>  
>  priv->window = GTK_WIDGET(gtk_builder_get_object(priv->builder,
> "viewer"));
>  gtk_window_add_accel_group(GTK_WINDOW(priv->window), priv->accel_group);

tested, works as expected

Pavel

___
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list