From 917661c7cb3cc9d9b4d4b1c100fb03168bc90c52 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Wed, 6 Mar 2013 18:17:42 +0000 Subject: [PATCH] Get rid of xor_gc altogether, I think it's a remnant from the "old" cross-hair code. svn path=/trunk/; revision=48140 --- ui/gtk/tcp_graph.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c index b9ffd08c50..4af15ed65f 100644 --- a/ui/gtk/tcp_graph.c +++ b/ui/gtk/tcp_graph.c @@ -371,10 +371,6 @@ struct graph { } gt; }; - -#if !GTK_CHECK_VERSION(3,0,0) -static GdkGC *xor_gc = NULL; -#endif static int refnum=0; #define debug(section) if (debugging & section) @@ -734,9 +730,6 @@ static void create_drawing_area(struct graph *g) { #if GTK_CHECK_VERSION(3,0,0) GtkStyleContext *context; -#else - GdkColormap *colormap; - GdkColor color; #endif char *display_name; char window_title[WINDOW_TITLE_LENGTH]; @@ -850,26 +843,6 @@ static void create_drawing_area(struct graph *g) #else g->font = gtk_widget_get_style(g->drawing_area)->font_desc; - colormap = gtk_widget_get_colormap(GTK_WIDGET(g->drawing_area)); - if (!xor_gc) { - xor_gc = gdk_gc_new(gtk_widget_get_window(g->drawing_area)); - gdk_gc_set_function(xor_gc, GDK_XOR); - if (!gdk_color_parse("gray15", &color)) { - /* - * XXX - do more than just warn. - */ - simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, - "Could not parse color gray15."); - } - if (!gdk_colormap_alloc_color(colormap, &color, FALSE, TRUE)) { - /* - * XXX - do more than just warn. - */ - simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, - "Could not allocate color gray15."); - } - gdk_gc_set_foreground(xor_gc, &color); - } /* this is probably quite an ugly way to get rid of the first configure * event