diff options
author | raveit65 <[email protected]> | 2016-07-31 18:41:59 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-07-31 18:41:59 +0200 |
commit | 2b183f738a1af2262dc513635ef552c40b03d50c (patch) | |
tree | 06fd2b36e8929969463d8a26a2406b1a3796c8d1 | |
parent | dac9cf2235721d3efbb3abd6273f8355384d27b9 (diff) | |
download | mate-applets-2b183f738a1af2262dc513635ef552c40b03d50c.tar.bz2 mate-applets-2b183f738a1af2262dc513635ef552c40b03d50c.tar.xz |
netspeed: use GtkColorButton instead of MateColorButton
this reverts http://git.mate-desktop.org/mate-netspeed/commit/?id=38d56de
Using GtkColorButton or GtkColorChooser does the same job
and we drop the dependecy to libmate-desktop
-rw-r--r-- | netspeed/src/netspeed.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/netspeed/src/netspeed.c b/netspeed/src/netspeed.c index cd3bf909..4742b7c7 100644 --- a/netspeed/src/netspeed.c +++ b/netspeed/src/netspeed.c @@ -30,7 +30,6 @@ #include <glib.h> #include <glib/gi18n.h> #include <gio/gio.h> -#include <libmate-desktop/mate-colorbutton.h> #include "backend.h" @@ -1125,13 +1124,13 @@ da_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) } static void -incolor_changed_cb (MateColorButton *cb, gpointer data) +incolor_changed_cb (GtkColorButton *cb, gpointer data) { MateNetspeedApplet *applet = (MateNetspeedApplet*)data; gchar *color; GdkColor clr; - mate_color_button_get_color (cb, &clr); + gtk_color_button_get_color (cb, &clr); applet->in_color = clr; color = g_strdup_printf ("#%04x%04x%04x", clr.red, clr.green, clr.blue); @@ -1140,13 +1139,13 @@ incolor_changed_cb (MateColorButton *cb, gpointer data) } static void -outcolor_changed_cb (MateColorButton *cb, gpointer data) +outcolor_changed_cb (GtkColorButton *cb, gpointer data) { MateNetspeedApplet *applet = (MateNetspeedApplet*)data; gchar *color; GdkColor clr; - mate_color_button_get_color (cb, &clr); + gtk_color_button_get_color (cb, &clr); applet->out_color = clr; color = g_strdup_printf ("#%04x%04x%04x", clr.red, clr.green, clr.blue); @@ -1227,11 +1226,11 @@ showinfo_cb(GtkAction *action, gpointer data) incolor_label = gtk_label_new_with_mnemonic(_("_In graph color")); outcolor_label = gtk_label_new_with_mnemonic(_("_Out graph color")); - incolor_sel = mate_color_button_new (); - outcolor_sel = mate_color_button_new (); + incolor_sel = gtk_color_button_new (); + outcolor_sel = gtk_color_button_new (); - mate_color_button_set_color (MATE_COLOR_BUTTON (incolor_sel), &applet->in_color); - mate_color_button_set_color (MATE_COLOR_BUTTON (outcolor_sel), &applet->out_color); + gtk_color_button_set_color (GTK_COLOR_BUTTON (incolor_sel), &applet->in_color); + gtk_color_button_set_color (GTK_COLOR_BUTTON (outcolor_sel), &applet->out_color); gtk_label_set_mnemonic_widget(GTK_LABEL(incolor_label), incolor_sel); gtk_label_set_mnemonic_widget(GTK_LABEL(outcolor_label), outcolor_sel); |