diff --git a/src/Makefile.am b/src/Makefile.am index a7a38d8cc..9c6934441 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,7 +56,6 @@ shell_public_headers_h = \ shell-app-usage.h \ shell-arrow.h \ shell-doc-system.h \ - shell-drawing.h \ shell-embedded-window.h \ shell-generic-container.h \ shell-gtk-embed.h \ @@ -88,7 +87,6 @@ libgnome_shell_la_SOURCES = \ shell-app-usage.c \ shell-arrow.c \ shell-doc-system.c \ - shell-drawing.c \ shell-embedded-window.c \ shell-evolution-event-source.h \ shell-evolution-event-source.c \ diff --git a/src/shell-drawing.c b/src/shell-drawing.c deleted file mode 100644 index 885344fed..000000000 --- a/src/shell-drawing.c +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ - -#include "config.h" - -#include "shell-drawing.h" -#include - -void -shell_draw_clock (StDrawingArea *area, - int hour, - int minute) -{ - cairo_t *cr; - guint width, height; - double xc, yc, radius, hour_radius, minute_radius; - double angle; - - st_drawing_area_get_surface_size (area, &width, &height); - xc = (double)width / 2; - yc = (double)height / 2; - radius = (double)(MIN(width, height)) / 2 - 2; - minute_radius = radius - 3; - hour_radius = radius / 2; - - cr = st_drawing_area_get_context (area); - cairo_set_line_width (cr, 1.0); - - /* Outline */ - cairo_arc (cr, xc, yc, radius, 0.0, 2.0 * M_PI); - cairo_stroke (cr); - - /* Hour hand. (We add a fraction to @hour for the minutes, then - * convert to radians, and then subtract pi/2 because cairo's origin - * is at 3:00, not 12:00.) - */ - angle = ((hour + minute / 60.0) / 12.0) * 2.0 * M_PI - M_PI / 2.0; - cairo_move_to (cr, xc, yc); - cairo_line_to (cr, - xc + hour_radius * cos (angle), - yc + hour_radius * sin (angle)); - cairo_stroke (cr); - - /* Minute hand */ - angle = (minute / 60.0) * 2.0 * M_PI - M_PI / 2.0; - cairo_move_to (cr, xc, yc); - cairo_line_to (cr, - xc + minute_radius * cos (angle), - yc + minute_radius * sin (angle)); - cairo_stroke (cr); -} diff --git a/src/shell-drawing.h b/src/shell-drawing.h deleted file mode 100644 index 2fd4dbf3b..000000000 --- a/src/shell-drawing.h +++ /dev/null @@ -1,17 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ - -#ifndef __SHELL_DRAWING_H__ -#define __SHELL_DRAWING_H__ - -#include -#include "st.h" - -G_BEGIN_DECLS - -void shell_draw_clock (StDrawingArea *area, - int hour, - int minute); - -G_END_DECLS - -#endif /* __SHELL_GLOBAL_H__ */