[Xfce4-commits] [apps/gigolo] 19/35: Migrate from GdkColor to GdkRGBA, and from GtkColorButton to GtkColorChooser

noreply at xfce.org noreply at xfce.org
Mon Oct 31 18:18:53 CET 2016


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch master
in repository apps/gigolo.

commit 01e12255e6e1212392ebf822fef4bbf2030f23df
Author: Landry Breuil <landry at xfce.org>
Date:   Sun Jun 19 16:38:23 2016 +0200

    Migrate from GdkColor to GdkRGBA, and from GtkColorButton to GtkColorChooser
---
 src/bookmarkeditdialog.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bookmarkeditdialog.c b/src/bookmarkeditdialog.c
index 2638f7a..d7a4057 100644
--- a/src/bookmarkeditdialog.c
+++ b/src/bookmarkeditdialog.c
@@ -427,9 +427,9 @@ static void init_values(GigoloBookmarkEditDialog *dialog)
 	tmp = gigolo_bookmark_get_color(priv->bookmark_init);
 	if (tmp != NULL)
 	{
-		GdkColor color;
-		if (gdk_color_parse(tmp, &color))
-			gtk_color_button_set_color(GTK_COLOR_BUTTON(priv->color_chooser), &color);
+		GdkRGBA color;
+		if (gdk_rgba_parse(&color, tmp))
+			gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(priv->color_chooser), &color);
 	}
 	/* URI */
 	uri = gigolo_bookmark_get_uri(priv->bookmark_init);
@@ -772,7 +772,7 @@ static void fill_method_combo_box(GigoloBookmarkEditDialog *dialog)
 static void update_bookmark_color(GigoloBookmarkEditDialog *dialog)
 {
 	GigoloBookmarkEditDialogPrivate *priv;
-	GdkColor color;
+	GdkRGBA color;
 	gchar *color_string;
 
 	priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
@@ -781,8 +781,8 @@ static void update_bookmark_color(GigoloBookmarkEditDialog *dialog)
 		/* if no colour has been chosen by the user, don't set the default colour (black) */
 		return;
 
-	gtk_color_button_get_color(GTK_COLOR_BUTTON(priv->color_chooser), &color);
-	color_string = gdk_color_to_string(&color);
+	gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(priv->color_chooser), &color);
+	color_string = gdk_rgba_to_string(&color);
 	gigolo_bookmark_set_color(priv->bookmark_update, color_string);
 	g_free(color_string);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list