bilder, buxfixes
authoraxique <n800@axique.de>
Sat, 24 May 2008 20:11:03 +0000 (20:11 +0000)
committeraxique <n800@axique.de>
Sat, 24 May 2008 20:11:03 +0000 (20:11 +0000)
git-svn-id: file:///svnroot/multilist@6 bd6b1de3-02cc-4133-82b9-a2a787a87b1d

data/multilist.desktop
data/multilist.service
debian/postinst [new file with mode: 0644]
setup.py
src/multilistclasses/libbottombar.py
src/multilistclasses/libliststorehandler.py
src/multilistclasses/libmultilist.py
src/upload.sh

index 272f2c0..0613db5 100644 (file)
@@ -5,5 +5,5 @@ Name=Multilist
 Exec=/usr/bin/multilist
 Icon=multilist
 Type=Application
-#X-Osso-Service=schulplaner
+#X-Osso-Service=multilist
 X-Osso-Type=application/x-executable 
index 6b43128..35e320e 100644 (file)
@@ -1,3 +1,3 @@
 [D-BUS Service] 
-Name=com.axique.multilist
+Name=com.nokia.multilist
 Exec=/usr/bin/multilist
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..1df47d1
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+gtk-update-icon-cache -f /usr/share/icons/hicolor
+exit 0
\ No newline at end of file
index f6581ea..6cd82e4 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,10 @@ setup(name='multilist',
        packages=['multilistclasses'],
        package_dir={'multilistclasses': 'src/multilistclasses'},
        data_files = [
-                    ('share/pixmaps',             ['data/multilist.png']),                
+                    ('share/icons/hicolor/26x26/hildon', ['data/low/multilist.png']),
+                   ('share/icons/hicolor/40x40/hildon', ['data/high/multilist.png']),
+                   ('share/icons/hicolor/scalable/hildon', ['data/scale/multilist.png']),
+                    #('share/pixmaps',             ['data/multilist.png']),                
                     ('share/applications/hildon', ['data/multilist.desktop']),           
                     ('share/dbus-1/services',     ['data/multilist.service']),      
                     ]
index 5ce9390..160787c 100644 (file)
@@ -36,7 +36,22 @@ class Bottombar(gtk.HBox):
 
                
        def new_item(self,widget=None,data1=None,data2=None):
-               self.view.liststorehandler.add_row()
+               dialog = gtk.Dialog("New item name:",None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+               
+               dialog.set_position(gtk.WIN_POS_CENTER)
+               entryKlasse=gtk.Entry()
+               entryKlasse.set_text("")
+               
+               dialog.vbox.pack_start(entryKlasse, True, True, 0)
+               
+               dialog.vbox.show_all()
+               #dialog.set_size_request(400,300)
+
+               if dialog.run() == gtk.RESPONSE_ACCEPT:
+                       #logging.info("new category name "+entryKlasse.get_text())
+                       #self.view.liststorehandler.rename_category(entryKlasse.get_text())
+                       self.view.liststorehandler.add_row(entryKlasse.get_text())
+               dialog.destroy()
 
                
        def del_item(self,widget=None,data1=None,data2=None):
@@ -62,10 +77,11 @@ class Bottombar(gtk.HBox):
                mbox.hide() 
                mbox.destroy() 
                if response==gtk.RESPONSE_YES:
-                       n=len(self.view.liststorehandler.get_liststore())
-                       for i in range(n):
-                               self.view.liststorehandler.checkout_rows()
-                               #print i
+                       self.view.liststorehandler.checkout_rows()
+                       #n=len(self.view.liststorehandler.get_liststore())
+                       #for i in range(n):
+                       #       self.view.liststorehandler.checkout_rows()
+                       #       #print i
                        
        def search_list(self,widget=None,data1=None,data2=None):
                self.view.liststorehandler.get_liststore(widget.get_text())
index b38c7e4..933a90c 100644 (file)
@@ -116,15 +116,16 @@ class Liststorehandler():
                
                
        def checkout_rows(self):
-               sql = "UPDATE items SET status=? WHERE list=? AND category=?"
-               self.db.speichereSQL(sql,("-1",self.selection.get_list(),self.selection.get_category()))
+               sql = "UPDATE items SET status=? WHERE list=? AND category LIKE ? AND status=?"
+               self.db.speichereSQL(sql,("-1",self.selection.get_list(),self.selection.get_category(True),"1"))
                for i in range(len(self.liststore)):
-                       self.liststore[i][1]="-1"
+                       if self.liststore[i][1]=="1":
+                               self.liststore[i][1]="-1"
                        
                        
                
                
-       def add_row(self):
+       def add_row(self,title=""):
                #self.update_row(-1,1,"-1")
                #for x in self.liststore:
                #       print x[0],x[2]
@@ -132,11 +133,11 @@ class Liststorehandler():
                import uuid
                uid=str(uuid.uuid4())
                sql = "INSERT INTO items (uid,list,category,status, title) VALUES (?,?,?,?,?)"
-               self.db.speichereSQL(sql,(uid,self.selection.get_list(),self.selection.get_category(),status,""),rowid=uid)
+               self.db.speichereSQL(sql,(uid,self.selection.get_list(),self.selection.get_category(),status,title),rowid=uid)
                logging.info("Insertet row: status = "+status+" with uid "+str(uid))
                        #self.liststore[irow][0]=str(uuid.uuid4())
                        
-               self.liststore.append([uid,status,""," ","","","","","","","","",""])
+               self.liststore.append([uid,status,title," ","","","","","","","","",""])
                self.selection.comboLists_check_for_update()
                #       if (irow>-1):
                #               self.liststore[irow][icol]=new_text
index d0da7c3..28b489d 100755 (executable)
@@ -64,7 +64,7 @@ import libsync
 import libbottombar
 
 version = "0.3.0"
-app_name = "Multilist"
+app_name = "multilist"
 
                
        
index 85afcc8..3a3fd46 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-scp ../../multilist_0.3.0_all.deb user@192.168.0.35:/media/mmc2/
+scp ../../multilist_0.3.0_all.deb user@192.168.0.34:/media/mmc2/