* debian/* cleanup and update
authorCuong Le <cuonglb@ideapad.(none)>
Fri, 9 Sep 2011 08:15:59 +0000 (15:15 +0700)
committerCuong Le <cuonglb@ideapad.(none)>
Fri, 9 Sep 2011 08:15:59 +0000 (15:15 +0700)
* code update
* version 0.1.0 alpha

main.cpp
qml/lichvietwidget/main.js
qml/lichvietwidget/main.qml
qtc_packaging/debian_fremantle/compat
qtc_packaging/debian_fremantle/control
qtc_packaging/debian_fremantle/rules
settingsdlg.cpp
settingsdlg.h

index a7cb52c..6a8418d 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,3 +1,20 @@
+/*
+Copyright (C) 2011  by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>
+*/
+
 #include <QtGui/QApplication>
 
 #include "qmlapplicationviewer.h"
index 1102377..f380b6f 100644 (file)
@@ -1,6 +1,24 @@
+/*
+Copyright (C) 2011  by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
 
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>
+*/
 
 var IMGS_RESOURCE_PATH = "/opt/lichvietwidget/qml/lichvietwidget/imgs/";
+var isday=-1;
+var ismonth=-1;
+var isyear=-1;
 
 function refresh(day_center_img, day_left_img, day_right_img, month_left_img, month_right_img, year_1_img, year_2_img,year_3_img,year_4_img, txt_detail) {
     var date = new Date();
@@ -13,40 +31,48 @@ function refresh(day_center_img, day_left_img, day_right_img, month_left_img, mo
 
     txt_detail.text = "Ngày <b>"+lunarCanChi[0]+"</b>, Tháng <b>"+lunarCanChi[1]+"</b><br>Năm <b>"+lunarCanChi[2]+"</b>";
 
-    if (xday <= 9){
-        day_center_img.visible = true;
-        day_center_img.source = IMGS_RESOURCE_PATH + xday + ".png";
-        day_left_img.visible = false;
-        day_right_img.visible = false;
-    }else{
-        var strxday = xday+'';
-        var firstday = strxday[0];
-        var secondday = strxday[1];
-        day_center_img.visible = false;
-        day_left_img.visible = true;
-        day_left_img.source = IMGS_RESOURCE_PATH + firstday + ".png";
-        day_right_img.visible = true;
-        day_right_img.source = IMGS_RESOURCE_PATH + secondday + ".png";
+    if (xday != isday){
+        if (xday <= 9){
+            day_center_img.visible = true;
+            day_center_img.source = IMGS_RESOURCE_PATH + xday + ".png";
+            day_left_img.visible = false;
+            day_right_img.visible = false;
+        }else{
+            var strxday = xday+'';
+            var firstday = strxday[0];
+            var secondday = strxday[1];
+            day_center_img.visible = false;
+            day_left_img.visible = true;
+            day_left_img.source = IMGS_RESOURCE_PATH + firstday + ".png";
+            day_right_img.visible = true;
+            day_right_img.source = IMGS_RESOURCE_PATH + secondday + ".png";
+        }
+        isday = xday;
     }
 
-    if (xmonth <=9){
-        month_left_img.source = IMGS_RESOURCE_PATH +"0.png";
-        month_right_img.source = IMGS_RESOURCE_PATH + xmonth + ".png";
-    }else
-    {
-        var strxmonth = xmonth+'';
-        var firstmonth = strxmonth[0];
-        var secondmonth = strxmonth[1];
-        month_left_img.source = IMGS_RESOURCE_PATH + firstmonth +".png";
-        month_right_img.source = IMGS_RESOURCE_PATH + secondmonth + ".png";
+    if (xmonth != ismonth){
+        if (xmonth <=9){
+            month_left_img.source = IMGS_RESOURCE_PATH +"0.png";
+            month_right_img.source = IMGS_RESOURCE_PATH + xmonth + ".png";
+        }else
+        {
+            var strxmonth = xmonth+'';
+            var firstmonth = strxmonth[0];
+            var secondmonth = strxmonth[1];
+            month_left_img.source = IMGS_RESOURCE_PATH + firstmonth +".png";
+            month_right_img.source = IMGS_RESOURCE_PATH + secondmonth + ".png";
+        }
+        ismonth=xmonth;
     }
 
-    var strxyear = xyear+'';
-    year_1_img.source = IMGS_RESOURCE_PATH + strxyear[0] +".png";
-    year_2_img.source = IMGS_RESOURCE_PATH + strxyear[1] + ".png";
-    year_3_img.source = IMGS_RESOURCE_PATH + strxyear[2] +".png";
-    year_4_img.source = IMGS_RESOURCE_PATH + strxyear[3] + ".png";
-
+    if (xyear != isyear){
+        var strxyear = xyear+'';
+        year_1_img.source = IMGS_RESOURCE_PATH + strxyear[0] +".png";
+        year_2_img.source = IMGS_RESOURCE_PATH + strxyear[1] + ".png";
+        year_3_img.source = IMGS_RESOURCE_PATH + strxyear[2] +".png";
+        year_4_img.source = IMGS_RESOURCE_PATH + strxyear[3] + ".png";
+        isyear=xyear;
+    }
 }
 
 /**
index c43908a..6d7fd41 100644 (file)
@@ -1,3 +1,20 @@
+/*
+Copyright (C) 2011  by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>
+*/
+
 import QtQuick 1.0
 import "main.js" as Main
 
index 9f2f00e..39276c4 100644 (file)
@@ -1,8 +1,8 @@
 Source: lichvietwidget
-Section: user/utilities
+Section: user/desktop
 Priority: optional
 Maintainer: Cuong Le <metacuong@gmail.com>
-Build-Depends: debhelper (>= 5), libqt4-dev
+Build-Depends: debhelper (>= 5), libqt4-dev, libx11-dev
 Standards-Version: 3.7.3
 Homepage: http://lichviet-widget.garage.maemo.org
 
@@ -10,6 +10,7 @@ Package: lichvietwidget
 Architecture: any
 Depends:  ${shlibs:Depends}, ${misc:Depends}, qt4-homescreen-loader
 Description: A Widget of Lich Viet for Maemo 5 Hildon desktop
+ A Widget of Lich Viet for Maemo 5 Hildon desktop
 XB-Maemo-Display-Name: Lich Viet Widget
 XSBC-Bugtracker: https://garage.maemo.org/tracker/?group_id=2242
 XB-Maemo-Icon-26:
index 7a31fae..997bf97 100755 (executable)
@@ -9,47 +9,42 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+APPNAME := lichvietwidget
+builddir:
+        mkdir -p builddir
 
-
-
-
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-       # qmake PREFIX=/usr# Uncomment this line for use without Qt Creator
-
-       touch configure-stamp
-
+builddir/Makefile: builddir
+        cd builddir && qmake-qt4 PREFIX=/usr ../$(APPNAME).pro
 
 build: build-stamp
 
-build-stamp: configure-stamp  
-       dh_testdir
+build-stamp: builddir/Makefile
+        dh_testdir
 
-       # Add here commands to compile the package.
-       # $(MAKE) # Uncomment this line for use without Qt Creator
-       #docbook-to-man debian/lichvietwidget.sgml > lichvietwidget.1
+        # Add here commands to compile the package.
+        cd builddir && $(MAKE)
+        #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
 
-       touch $@
+        touch $@
 
-clean: 
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp
+clean:
+        dh_testdir
+        dh_testroot
+        rm -f build-stamp
 
-       # Add here commands to clean up after the build process.
-       $(MAKE) clean
+        # Add here commands to clean up after the build process.
+        rm -rf builddir
 
-       dh_clean 
+        dh_clean
 
 install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k 
-       dh_installdirs
+        dh_testdir
+        dh_testroot
+        dh_clean -k
+        dh_installdirs
 
-       # Add here commands to install the package into debian/lichvietwidget.
-       $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/lichvietwidget install
+        # Add here commands to install the package into debian/arora.
+        cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install
 
 
 # Build architecture-independent files here.
@@ -58,34 +53,20 @@ binary-indep: build install
 
 # Build architecture-dependent files here.
 binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs 
-       dh_installdocs
-       dh_installexamples
-#      dh_install
-#      dh_installmenu
-#      dh_installdebconf       
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_python
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
-       dh_installman
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-#      dh_perl
-#      dh_makeshlibs
-       dh_installdeb
-       # dh_shlibdeps # Uncomment this line for use without Qt Creator
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
+        dh_testdir
+        dh_testroot
+        dh_installdocs
+        dh_installexamples
+        dh_installman
+        dh_link
+        dh_strip
+        dh_compress
+        dh_fixperms
+        dh_installdeb
+        dh_shlibdeps
+        dh_gencontrol
+        dh_md5sums
+        dh_builddeb
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
index 7df76b8..d274140 100644 (file)
@@ -1,3 +1,20 @@
+/*
+Copyright (C) 2011  by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>
+*/
+
 #include "settingsdlg.h"
 
 
index 491d31b..b30767e 100644 (file)
@@ -1,3 +1,20 @@
+/*
+Copyright (C) 2011  by Cuong Le <metacuong@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>
+*/
+
 #ifndef SETTINGSDLG_H
 #define SETTINGSDLG_H