[Xfce4-commits] [panel-plugins/xfce4-diskperf-plugin] 15/16: Set the color button via gtk_color_chooser_set_rgba() instead of using a GtkDrawingArea

noreply at xfce.org noreply at xfce.org
Thu Apr 28 18:10:15 CEST 2016


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

landry pushed a commit to branch master
in repository panel-plugins/xfce4-diskperf-plugin.

commit 00b25fa5f03e67b74a8792f38b2ef224814e52ca
Author: Landry Breuil <landry at xfce.org>
Date:   Thu Apr 28 18:07:51 2016 +0200

    Set the color button via gtk_color_chooser_set_rgba() instead of using a GtkDrawingArea
    
    Connect ChooseColor to 'color-set' signal
---
 panel-plugin/main.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index b7d665a..ab8fa28 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -1036,14 +1036,8 @@ static void diskperf_create_options (XfcePanelPlugin *plugin,
     apwColorPB[W_DATA] = &(poGUI->wPB_Wcolor);
     apwColorPB[RW_DATA] = &(poGUI->wPB_RWcolor);
     for (i = 0; i < NMONITORS; i++) {
-	poColorWidgets = poPlugin->oConf.aoColorWidgets + i;
-	poColorWidgets->wDA = gtk_drawing_area_new ();
-	gtk_widget_modify_bg (poColorWidgets->wDA, GTK_STATE_NORMAL,
-			      poConf->aoColor + i);
-	gtk_container_add (GTK_CONTAINER (*(apwColorPB[i])),
-			   poColorWidgets->wDA);
-	gtk_widget_show (GTK_WIDGET (poColorWidgets->wDA));
-	g_signal_connect (GTK_WIDGET (*(apwColorPB[i])), "clicked",
+	gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(*(apwColorPB[i])), poConf->aoColor + i);
+	g_signal_connect (GTK_WIDGET (*(apwColorPB[i])), "color-set",
 			  G_CALLBACK (ChooseColor), poPlugin);
     }
 		      

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


More information about the Xfce4-commits mailing list