maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   KeepNote (https://talk.maemo.org/showthread.php?t=28329)

Laughing Man 2009-04-16 21:44

KeepNote
 
Any idea if this could be ported to the tablet (without much difficulty?).

http://rasm.ods.org/keepnote/


Currently for a multiplatform note editor I use notecase (has both a Linux, and Windows client as well as one for the Nokia Tablets). But it doesn't support links and images. Though from the intial look, it might be to feature heavy for the tablets' specs.

TrueJournals 2009-04-17 02:59

Re: KeepNote
 
Haven't tried it... but it's written in python, so it shouldn't really need to be ported (except a desktop file)... Try installing the deb they have. Then, run /usr/bin/keepnote from the command line.

fast1 2009-04-17 03:42

Re: KeepNote
 
written in python? whats python?

debernardis 2009-04-17 04:46

Re: KeepNote
 
Some dependencies might not be immediate to satisfy. Needs python > 2.4, python-central >0.6.7, debhelper > 5.0.38, cdbs > 0.4.49, python-gtk-2, python-glade2, libgtk2.0-dev.

TrueJournals 2009-04-17 11:56

Re: KeepNote
 
Oops! Forgot to look at that. cdbs is in extras-devel, python-central should work from http://ftp.us.debian.org/debian/pool...0.6.11_all.deb and the rest are in extras, I believe.

BrentDC 2009-04-17 15:00

Re: KeepNote
 
I just DL'd the tar, ran setup.py, and everything seems to be working. It insists on being run as root, though, I'll look into it.

BTW, how hard could it be to reparent the menu and fix the toolbar?

qwerty12 2009-04-17 15:03

Re: KeepNote
 
Quote:

Originally Posted by debernardis (Post 280291)
Some dependencies might not be immediate to satisfy. Needs python > 2.4, python-central >0.6.7, debhelper > 5.0.38, cdbs > 0.4.49, python-gtk-2, python-glade2, libgtk2.0-dev.

Those are Build-Deps, only needed to build it if you're making a deb. cdbs is PITA compared to normal rules files...

Python-central can be knocked off, it's a debian specific python packaging thing. Fremantle has it AFAIK, but on diablo, we're OK because we only have one python version... But you have to fix the rules file to remove the py_central references and optionally install the files in the correct place (as python-central is not being used).

qwerty12 2009-04-17 15:18

Re: KeepNote
 
Quote:

Originally Posted by BrentDC (Post 280382)
BTW, how hard could it be to reparent the menu?

In this case, reparenting isn't required. The gtk.ItemFactory it uses allows us to get a gtk.Menu instead of a gtk.MenuBar.

This works to get an Hildon menu:
Code:

--- main_window.py        2009-04-12 16:36:50.000000000 +0100
+++ main_window.py.hildonmenu        2009-04-17 16:16:18.000000000 +0100
@@ -22,6 +22,7 @@
 import pygtk
 pygtk.require('2.0')
 from gtk import gdk
+import hildon
 import gtk.glade
 import gobject
 import pango
@@ -218,7 +219,7 @@
 
 
 
-class KeepNoteWindow (gtk.Window):
+class KeepNoteWindow (hildon.Window):
    """Main windows for KeepNote"""
 
    def __init__(self, app):
@@ -327,7 +328,7 @@
        # menu bar
        main_vbox.set_border_width(0)
        self.menubar = self.make_menubar()
-        main_vbox.pack_start(self.menubar, False, True, 0)
+        self.set_menu(self.menubar)
       
        # toolbar
        main_vbox.pack_start(self.make_toolbar(), False, True, 0)         
@@ -1813,7 +1814,7 @@
               
 
        # Create item factory
-        self.item_factory = gtk.ItemFactory(gtk.MenuBar, "<main>",
+        self.item_factory = gtk.ItemFactory(gtk.Menu, "<main>",
                                            self.accel_group)
        self.item_factory.create_items(self.menu_items)
        self.add_accel_group(self.accel_group)


BrentDC 2009-04-17 15:57

Re: KeepNote
 
Hmm, I just tried that and I keep getting errors:

Code:

AttributeError: 'NoneType' object has no attribute <some_attribute>
It thinks that all the gtk.MenuItems are "NoneType", so they, obviously, keep throwing errors.

Did I do something wrong?

qwerty12 2009-04-17 16:05

Re: KeepNote
 
Quote:

Originally Posted by BrentDC (Post 280394)
Hmm, I just tried that and I keep getting errors:

Code:

AttributeError: 'NoneType' object has no attribute <some_attribute>
It thinks that all the gtk.MenuItems are "NoneType", so they, obviously, keep throwing errors.

Did I do something wrong?

Was it applied properly?

Only error that I get is:
Quote:

==============================================
KeepNote 0.5.2: Fri Apr 17 17:02:20 2009
/root/keepnote-0.5.2/keepnote/gui/main_window.py:1818: DeprecationWarning: use gtk.UIManager
self.accel_group)
But I'm pretty sure I got that before. It works here:
http://qwerty12.maemobox.org/kn.png

Here's the straight main_window.py file:
http://qwerty12.maemobox.org/main_window.txt


All times are GMT. The time now is 02:56.

vBulletin® Version 3.8.8