Bug#634771: gpredict: problem with time control: 100% on manual time adjustment
Package: gpredict
Version: 1.3-1
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following:
* Apply patch from hamaa1vs to resolve the application becoming
unresponsive when the day or time slider is adjusted.
(LP: #789691)
Thanks for considering the patch.
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric-proposed'), (500, 'oneiric')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-5-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru gpredict-1.3/debian/patches/debian-changes-1.3-1ubuntu1 gpredict-1.3/debian/patches/debian-changes-1.3-1ubuntu1
--- gpredict-1.3/debian/patches/debian-changes-1.3-1ubuntu1 1969-12-31 19:00:00.000000000 -0500
+++ gpredict-1.3/debian/patches/debian-changes-1.3-1ubuntu1 2011-07-19 17:24:06.000000000 -0400
@@ -0,0 +1,98 @@
+Description: Upstream changes introduced in version 1.3-1ubuntu1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ gpredict (1.3-1ubuntu1) oneiric; urgency=low
+ .
+ * Apply patch from hamaa1vs to resolve the application becoming
+ unresponsive when the day or time slider is adjusted.
+ (LP: #789691)
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Daniel T Chen <crimsun@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/789691
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- gpredict-1.3.orig/src/gtk-sat-module-tmg.c
++++ gpredict-1.3/src/gtk-sat-module-tmg.c
+@@ -483,7 +483,6 @@ static void tmg_time_set (GtkWidget *wid
+ gdouble slider;
+ gdouble jd;
+
+-
+ /* update time only if we are in manual time control */
+ if (!mod->throttle && !mod->reset) {
+
+@@ -513,7 +512,7 @@ static void tmg_time_set (GtkWidget *wid
+ /* convert UTC time to Julian Date */
+ if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) {
+ /* convert local time to UTC */
+- utim = Time_to_UTC (&tim);
++ Time_to_UTC (&tim, &utim);
+
+ /* Convert to JD */
+ jd = Julian_Date (&utim);
+@@ -814,7 +813,7 @@ static void tmg_cal_add_one_day (GtkSatM
+ /* convert UTC time to Julian Date */
+ if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) {
+ /* convert local time to UTC */
+- utim = Time_to_UTC (&tim);
++ Time_to_UTC (&tim, &utim);
+
+ /* Convert to JD */
+ jd = Julian_Date (&utim);
+@@ -869,7 +868,7 @@ static void tmg_cal_sub_one_day (GtkSatM
+ /* convert UTC time to Julian Date */
+ if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) {
+ /* convert local time to UTC */
+- utim = Time_to_UTC (&tim);
++ Time_to_UTC (&tim, &utim);
+
+ /* Convert to JD */
+ jd = Julian_Date (&utim);
+--- gpredict-1.3.orig/src/sgpsdp/sgp4sdp4.h
++++ gpredict-1.3/src/sgpsdp/sgp4sdp4.h
+@@ -347,7 +347,7 @@ void Time_of_Day(double jd, struct tm
+ double Julian_Date(struct tm *cdate);
+ void Date_Time(double jd, struct tm *cdate);
+ int Check_Date(struct tm *cdate);
+-struct tm Time_to_UTC(struct tm *cdate);
++void Time_to_UTC(struct tm *cdate, struct tm *odate);
+ struct tm Time_from_UTC(struct tm *cdate);
+ double JD_to_UTC(double jt);
+ double JD_from_UTC(double jt);
+--- gpredict-1.3.orig/src/sgpsdp/sgp_time.c
++++ gpredict-1.3/src/sgpsdp/sgp_time.c
+@@ -241,13 +241,15 @@ Check_Date(struct tm *cdate)
+ /* The procedures JD_to_UTC and JD_from_UTC are used to */
+ /* do the same thing working directly with Julian dates. */
+
+-struct tm
+-Time_to_UTC(struct tm *cdate)
++void
++Time_to_UTC(struct tm *cdate, struct tm *odate)
+ {
+ time_t tdate;
+-
++ cdate->tm_year -= 1900;
++ cdate->tm_isdst = -1;
+ tdate = mktime(cdate);
+- return( *gmtime(&tdate) );
++ gmtime_r(&tdate,odate);
++ odate->tm_year += 1900;
+ } /*Procedure Time_to_UTC*/
+
+ /*------------------------------------------------------------------*/
diff -Nru gpredict-1.3/debian/patches/series gpredict-1.3/debian/patches/series
--- gpredict-1.3/debian/patches/series 1969-12-31 19:00:00.000000000 -0500
+++ gpredict-1.3/debian/patches/series 2011-07-19 17:20:05.000000000 -0400
@@ -0,0 +1 @@
+debian-changes-1.3-1ubuntu1
Reply to: