Control: tags 907029 + patch
Control: tags 907029 + pending
--

Dear maintainer,

I've prepared an NMU for buici-clock (versioned as 0.4.9.4+nmu2) and
uploaded it to DELAYED/10. Please feel free to tell me if I
should delay it longer.

--
Regards
Sudip

diff -Nru buici-clock-0.4.9.4+nmu1/clock.cxx buici-clock-0.4.9.4+nmu2/clock.cxx
--- buici-clock-0.4.9.4+nmu1/clock.cxx  2021-01-14 21:27:49.000000000 +0000
+++ buici-clock-0.4.9.4+nmu2/clock.cxx  2022-03-29 20:13:18.000000000 +0100
@@ -106,7 +106,8 @@
 void draw_dial (Display* display, Visual* visual,
                Pixmap pixmap, int dx, int dy);
 void draw_hands (Display* display, Visual* visual,
-               Pixmap pixmap, int dx, int dy, int seconds);
+               Pixmap pixmap, int dx, int dy, int seconds,
+               bool showSecondHand);
 void draw_dial_shape (Display* display, Pixmap pixmap, int dx, int dy);
 
 class WTopLevel : public LWindow {
@@ -538,7 +539,7 @@
             _gc, 0, 0, width (), height (), 0, 0);
 
 
-  draw_hands (xdisplay (), xvisual (), pixmap, width (), height (), seconds);
+  draw_hands (xdisplay (), xvisual (), pixmap, width (), height (), seconds, 
m_fSecondHand);
 
 #if 0
                                // -- Draw hands
diff -Nru buici-clock-0.4.9.4+nmu1/debian/changelog 
buici-clock-0.4.9.4+nmu2/debian/changelog
--- buici-clock-0.4.9.4+nmu1/debian/changelog   2021-01-14 22:05:45.000000000 
+0000
+++ buici-clock-0.4.9.4+nmu2/debian/changelog   2022-03-29 20:33:23.000000000 
+0100
@@ -1,3 +1,11 @@
+buici-clock (0.4.9.4+nmu2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix showSecondHand. (Closes: #907029)
+    - Thanks Jason for the patch.
+
+ -- Sudip Mukherjee <sudipm.mukher...@gmail.com>  Tue, 29 Mar 2022 20:33:23 
+0100
+
 buici-clock (0.4.9.4+nmu1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru buici-clock-0.4.9.4+nmu1/draw.cc buici-clock-0.4.9.4+nmu2/draw.cc
--- buici-clock-0.4.9.4+nmu1/draw.cc    2021-01-14 21:27:49.000000000 +0000
+++ buici-clock-0.4.9.4+nmu2/draw.cc    2022-03-29 20:13:18.000000000 +0100
@@ -145,7 +145,8 @@
 
 
 void draw_hands (Display* display, Visual* visual,
-                Pixmap pixmap, int dx, int dy, int seconds)
+                Pixmap pixmap, int dx, int dy, int seconds,
+                bool showSecondHand)
 {
   cairo_surface_t* s = cairo_xlib_surface_create (display, pixmap, visual,
                                                  dx, dy);
@@ -198,16 +199,18 @@
     cairo_path_destroy (path);
 
        // Second hand
-    cairo_save (cr);
-    cairo_rotate (cr, ((2.0*M_PI)*seconds)/60.0);
-    cairo_set_line_width (cr, WIDTH_THIN);
-    cairo_move_to (cr, 0,  (DY/2.0)*0.20);
-    cairo_line_to (cr, 0, -(DY/2.0)*0.64);
-    cairo_set_source_rgb (cr, 1.0, 0, 0);
-    cairo_stroke (cr);
-    cairo_arc (cr, 0, -(DY/2.0)*0.64, DX*0.03, 0, 2*M_PI);
-    cairo_fill (cr);
-    cairo_restore (cr);
+    if (showSecondHand){
+        cairo_save (cr);
+        cairo_rotate (cr, ((2.0*M_PI)*seconds)/60.0);
+        cairo_set_line_width (cr, WIDTH_THIN);
+        cairo_move_to (cr, 0,  (DY/2.0)*0.20);
+        cairo_line_to (cr, 0, -(DY/2.0)*0.64);
+        cairo_set_source_rgb (cr, 1.0, 0, 0);
+        cairo_stroke (cr);
+        cairo_arc (cr, 0, -(DY/2.0)*0.64, DX*0.03, 0, 2*M_PI);
+        cairo_fill (cr);
+        cairo_restore (cr);
+    }
   }
 
   cairo_destroy (cr);

Reply via email to