summaryrefslogtreecommitdiff
path: root/capplets/appearance/appearance-font.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-12-02 00:45:36 +0300
committermonsta <[email protected]>2016-12-02 00:50:14 +0300
commit0c27d18ab5efb721a2f02549767016c81fc6ce2c (patch)
tree76b7b89cface072e011a3757a833e9090bab44f2 /capplets/appearance/appearance-font.c
parent1aa83d45ebf9599c6d4d3f47211c3961282e98f0 (diff)
downloadmate-control-center-0c27d18ab5efb721a2f02549767016c81fc6ce2c.tar.bz2
mate-control-center-0c27d18ab5efb721a2f02549767016c81fc6ce2c.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require libmatekbd, libmate-desktop, marco, m-s-d >= 1.17
Diffstat (limited to 'capplets/appearance/appearance-font.c')
-rw-r--r--capplets/appearance/appearance-font.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/capplets/appearance/appearance-font.c b/capplets/appearance/appearance-font.c
index 26db940e..af2a1a41 100644
--- a/capplets/appearance/appearance-font.c
+++ b/capplets/appearance/appearance-font.c
@@ -46,11 +46,7 @@
static gboolean in_change = FALSE;
-#if GTK_CHECK_VERSION (3, 0, 0)
static void sample_draw(GtkWidget* darea, cairo_t* cr)
-#else
-static void sample_expose(GtkWidget* darea, GdkEventExpose* expose)
-#endif
{
cairo_surface_t* surface = g_object_get_data(G_OBJECT(darea), "sample-surface");
GtkAllocation allocation;
@@ -62,10 +58,6 @@ static void sample_expose(GtkWidget* darea, GdkEventExpose* expose)
w = cairo_image_surface_get_width (surface);
h = cairo_image_surface_get_height (surface);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- cairo_t *cr = gdk_cairo_create (expose->window);
-#endif
-
cairo_set_line_width (cr, 1);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
@@ -78,10 +70,6 @@ static void sample_expose(GtkWidget* darea, GdkEventExpose* expose)
cairo_set_source_surface (cr, surface, (x - w) / 2, (y - h) / 2);
cairo_paint(cr);
-
-#if !GTK_CHECK_VERSION (3, 0, 0)
- cairo_destroy (cr);
-#endif
}
typedef enum {
@@ -188,11 +176,7 @@ static void setup_font_sample(GtkWidget* darea, Antialiasing antialiasing, Hinti
g_object_set_data_full(G_OBJECT(darea), "sample-surface", surface, (GDestroyNotify) cairo_surface_destroy);
gtk_widget_set_size_request (GTK_WIDGET(darea), width + 2, height + 2);
-#if GTK_CHECK_VERSION (3, 0, 0)
g_signal_connect(darea, "draw", G_CALLBACK(sample_draw), NULL);
-#else
- g_signal_connect(darea, "expose_event", G_CALLBACK(sample_expose), NULL);
-#endif
}
/*