[03:16] <Avo> hey guys, is there are any way to get the app dev week stuff I'm going to miss this week? I've got a totally loaded week but there's some stuff I wouldn't (but have) to miss. Thanks!
[03:18] <jiga> Avo, there are IRC logs
[03:19] <Avo> And would that have all the important info?
[03:19] <jiga> everything is happening on #ubuntu-classroom or #ubuntu-classroom-chat
[03:20] <Avo>  Ah cool, cool. That's what I'll do then. Thanks!!
[03:20] <jiga> you can find logs here: http://irclogs.ubuntu.com/
[05:22] <pragad7> hello
[05:35] <pragad7> join #ubuntu
[05:37] <purvesh> can someone tell me how to protect ubuntu wiki pages from editing ?
[15:53] <jcastro> 7 minutes until we start!
[15:59] <OskO> Hello
[16:00] <jcastro> Hi everyone
[16:00] <jcastro> welcome to day #2 of ubuntu application developer week!
[16:00] <OskO> Hi!
[16:00] <jcastro> I hope everyone has had a good time so far
[16:00] <jcastro> ok, so from now on please move all discussion to #ubuntu-classroom-chat
[16:00] <jcastro> so that the speaker can present in here
[16:01] <jcastro> first up today we have Didier Rocks, aka, didrocks
[16:01] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html following the conclusion of the session.
[16:01] <jcastro> 4 steps to an ubuntu application
[16:01] <jcastro> didrocks, ready?
[16:01] <didrocks> jcastro: yeah o/
[16:01] <didrocks> thanks jcastro!
[16:01] <didrocks> welcome everyone :)
[16:02] <didrocks> can you raise your hands on #ubuntu-classroom-chat so that I can know how many people we have there?
[16:02] <didrocks> good, a lot of people there!
[16:03] <didrocks> welcome to the session on "4 steps to develop your application for ubuntu"
[16:03] <didrocks> this session will be mostly a basic presentation of Quickly, which is the application we started to develop one year and half ago for developping applications in ubuntu
[16:04] <didrocks> do you know about Quickly?, please answer in #ubuntu-classroom-chat
[16:04] <didrocks> (that will enable me to know what's the audience is :))
[16:05] <didrocks> ok, some people know about it, others don't :-) this session is really on basics of Quickly, let's start on it
[16:05] <didrocks> so, some quick words of presentation first
[16:05] <didrocks> my name is Didier Roche, I'm working in the ubuntu desktop team on updating GNOME and UNE (Ubuntu Netbook Edition)
[16:05] <didrocks> I'm maintaining unity, that some of you probably heard of
[16:05] <didrocks> also, as a spare time project with Rick Spencer, I'm hacking on Quickly
[16:06] <didrocks> so, what is Quickly?
[16:06] <didrocks> Quickly is to bring back fun in development!
[16:06] <didrocks> Rick, the person who created the concept of Quickly, call it, among other things, an "Application Templating System"
[16:07] <didrocks> the essence of the project is to provide you boiler plate for the kind of program you want to write
[16:07] <didrocks> the boiler plate is the code that you would have to write for every program of a certain type gets generated for you
[16:07] <didrocks> we have different boiler plates right now:
[16:07] <didrocks> ubuntu-application, ubuntu-cli and ubuntu-pygame in lucid and maverick
[16:07] <didrocks> some people seem to create new boiler plate, like vala and such
[16:08] <didrocks> but Quickly is also a set of commands
[16:08] <didrocks> the commands are designed to integrate with the Ubuntu Application infrastructure
[16:08] <didrocks> things like bzr, launchpad, PPAs, etc..
[16:08] <didrocks> those are something hard to learn when you just want to develop for fun
[16:09] <didrocks> and you have a lot to look at too
[16:09] <didrocks> the commands are what make all that work for you!
[16:09] <didrocks> The moto of Quickly is "Easy and Fun"
[16:09] <didrocks> while I'll answer to the first set of questions, you can install it (not mandatory to follow the session): sudo apt-get install quickly
[16:09] <ClassBot> doktor777 asked: do you know any popular app developed with quickly?
[16:10] <didrocks> some applications on ubuntu are using Quickly
[16:10] <didrocks> like bughugger, pytask, lernid
[16:10] <didrocks> (maybe some of you are using lernid to follow the session btw)
[16:10] <didrocks> there are others apps like photobomb and such that are develop with Quickly
[16:11] <didrocks> you can find them at http://theravingrick.blogspot.com/
[16:11] <didrocks> but Quickly isn't made to create huge applications, it's more for what most of 1 person team will do
[16:12] <didrocks> so, it fits most of the needs we can have, I guess
[16:12] <ClassBot> Kruptein asked: so is quicly a programing language on it self or does it use an other language?
[16:12] <didrocks> Quickly is a set of templates and commands
[16:12] <didrocks> that means, the templates contains the code
[16:13] <didrocks> I'll discuss about that later on, but the templates I presented before are made of python
[16:13] <didrocks> but there is a incoming vala template
[16:13] <didrocks> and theorically template (and commands) can from every languages you want
[16:13] <ClassBot> hernejj asked: Does quickly help with packaging as well?
[16:13] <didrocks> yeah, and this is the goodness :)
[16:14] <didrocks> in one command, you can create a release, get a package, uploading the tarball to launchpad, create a milestone, get a changelog and push your project in your ppa
[16:14] <didrocks> no need to harrass to create the package manually
[16:14] <didrocks> or to file the dependencies :)
[16:14] <ClassBot> doktor777 asked: how stable/mature it is?
[16:14] <didrocks> Quickly has been launched in may 2009
[16:15] <didrocks> so, it's more or less one year and half
[16:15] <didrocks> it's quite mature, contains a lot of code
[16:15] <didrocks> and we handle upgrade and such of your project
[16:15] <ClassBot> zinga24 asked: what templates does it deliver? gui-templates?
[16:15] <didrocks> so, with Quickly, on ubuntu, you have 3 templates:
[16:15] <didrocks> ubuntu-application: is a template creating a gui application
[16:16] <didrocks> (I'll present it in more extends later on)
[16:16] <didrocks> ubuntu-cli is for command line application
[16:16] <didrocks> and ubuntu-pygame for small and fun games using pygame
[16:16] <didrocks> you can hav some examples on the link pasted before
[16:16] <ClassBot> Kruptein asked: so can I pack my python programs in quickly to generate the packages only?
[16:16] <didrocks> right, and some people did that as far as I know of
[16:17] <didrocks> you just have to create some files like a .quickly file as root with some parameters
[16:17] <didrocks> we can help you with that if you jump to #quickly on freenode
[16:17] <ClassBot> doktor777 asked: what do you mean by "and we handle upgrade and such of your project" ?
[16:17] <didrocks> for instance, in Quickly 0.4, we introduced apport support
[16:18] <didrocks> and launchpad integration as well you know, the "ask a question/report a bug" in the help menu of default ubuntu application?
[16:18] <didrocks> we thought it would be good for application which were created with Quickly 0.2 to get those 2 things on upgrade
[16:18] <didrocks> and so, it's optionnaly added to people upgrading
[16:18] <didrocks> that's what I meant by on "upgrade"
[16:19] <didrocks> ok, no more question in the queue
[16:19] <didrocks> let's continue then :)
[16:19] <didrocks> so, first, what *is not* Quickly
[16:19] <didrocks> Quickly is not an IDE
[16:19] <didrocks> but you can use whatever IDE you want
[16:20] <didrocks> it's a command line tool and there is some API for people wanting to bind it to an IDE
[16:20] <didrocks> So, the title of the classroom was "4 steps to create your application"
[16:20] <didrocks> let's begin for step 0, before the first one :)
[16:20] <didrocks> think what you want to achieve with your application
[16:21] <didrocks> try to not NIH (Not Invented Here) and reinventing the whell
[16:21] <didrocks> why people want to install and then use your futur application instead of existing one?
[16:21] <didrocks> so design is the most important step in my opinion :)
[16:22] <didrocks> and no rush to step 1 until then!
[16:22] <didrocks> step 1 is creating your application
[16:22] <didrocks> which Quickly, it's fairly easy
[16:22] <didrocks> $ quickly create ubuntu-application foo
[16:22] <didrocks> this will create a "foo" ubuntu-application in a "foo" directory
[16:23] <didrocks> you will have all what's needed with an application, like:
[16:23] <didrocks> preferences integrations, menus, about box, easter eggs :)
[16:23] <didrocks> so, quickly create launch your application and you can see the boiler plate
[16:24] <didrocks> of course, you have all internationalization support and some icon/desktop file as well for people wanting to use it
[16:24] <didrocks> the most important part is that there is no dependency on Quickly itself for your application
[16:25] <didrocks> all is based on well known technology, but your application is then independent (in other words, Quickly isn't a framework)
[16:25] <didrocks> and that's by design
[16:25] <didrocks> so, for people running it during the session, you can see in the folder a lot of files have been created for you
[16:26] <didrocks> in the ubuntu-application template, you have:
[16:26] <didrocks> - python as a language to develop in
[16:26] <didrocks> - glade for editing the GUI
[16:26] <didrocks> - gedit as default editor (you can override this by exporting the EDITOR variable)
[16:26] <didrocks> - pygtk for the toolkit
[16:26] <didrocks> - desktopcouch for storing persistent data
[16:26] <didrocks> - launchpad integration
[16:26] <didrocks> all is chosen for helping you starting with your app
[16:27] <didrocks> - (and bzr for revision control)
[16:27] <didrocks> then, if you are confident enough and know what you need, you can remove each block you don't want and replace by yours
[16:27] <didrocks> or create your own template even!
[16:27] <didrocks> the idea is really to drive development and help opportunistic developer to know "where to start"
[16:27] <didrocks> rather than beeing lost in choices
[16:27] <didrocks> for helping starting development too, we have a complete tutorial:
[16:27] <didrocks> $ cd foo/
[16:28] <didrocks> $ quickly tutorial
[16:28] <didrocks> this will bring you up the tutorial for the ubuntu-application template
[16:28] <didrocks> Quickly has a lot of shell completion goodness
[16:29] <didrocks> depending on where you are, it will suggest the right command on the right time
[16:29] <didrocks> so, do not hesitate to press tab tab :)
[16:29] <didrocks> also I heard that an "ubuntu developer manual" is on the way :)
[16:29] <didrocks> this one will use Quickly as well and will be a good documentation reference
[16:30] <didrocks> let's see to some questions before moving to step 2 :)
[16:30] <ClassBot> doktor777 asked: and how do you upgrade, there's a command for that?
[16:30] <didrocks> $ quickly upgrade
[16:30] <didrocks> but it's launched for your each time Quickly is upgraded on your system and your application isn't transitionned
[16:30] <didrocks> so nothing to worry about :)
[16:31] <ClassBot> gaberlunzie44 asked: does quickly templates accept user input to customise/personalise apps?
[16:31] <didrocks> sure, once the application created, it's yours!
[16:31] <didrocks> so, as I said, you can customize every part of it
[16:31] <didrocks> and there is no dep on Quickly, you can use qt instead of gtk for instance :)
[16:31] <ClassBot> blackrock asked: Can I use git instead of bzr?
[16:31] <didrocks> ah, the traditional questions :)
[16:32] <didrocks> well, git isn't integrated to launchpad as well as bzr
[16:32] <didrocks> and a lot of people are telling "I want to use git with Quickly"
[16:32] <didrocks> well, you can create a ubuntu-git-application template :)
[16:32] <didrocks> and change the commands to use git
[16:32] <didrocks> but you will surely loose a lot of integration I'll explain afterwards
[16:33] <didrocks> and ideally, if you only use Quickly, you don't need to know which versionning system is used for you
[16:33] <didrocks> (for instance, you don't bzr commit, but you quickly save)
[16:33] <ClassBot> doktor777 asked: hmm, I'd prefer to launch a command myself, can the auto-upgrade be easily disabled?
[16:34] <didrocks> no, but you can create a template which doesn't have upgrade
[16:34] <didrocks> we changed the format sometimes and we bzr commit before and after the upgrade
[16:34] <didrocks> so you still can revert
[16:34] <didrocks> ok, no more question, let's move on step 2 then!
[16:34] <didrocks> once you know what you want to do
[16:35] <didrocks> and how to do it (the tutorial), with some base (the app you created), it's time to personalize your application
[16:35] <didrocks> this can be done with:
[16:35] <didrocks> $ quickly design
[16:36] <didrocks> this commands fires up glade to edit your user interface
[16:36] <didrocks> glade is a tool for building gtk-based UI
[16:36] <didrocks> (old screenshot of it: http://glade.gnome.org/images/glade-main-page.png)
[16:36] <didrocks> so, you can there add widgets
[16:36] <didrocks> change your window size
[16:36] <didrocks> labels and such
[16:36] <didrocks> you choose your components and draw them on the application area
[16:36] <didrocks> the quickly tutorial explains the basic of this
[16:37] <didrocks> in fact, Glade is a UI editing tool, that creates the XML you need to describe your windows and widgets
[16:37] <didrocks> don't worry because the quickly template totally handles keeping the code and the XML hooked up
[16:37] <didrocks> if others templates, like if kubuntu comes, we assume it won't use glade, obviously :)
[16:37] <didrocks> hence the "design" command to launch it and not "glade"
[16:37] <didrocks> so here are some tips for using Glade if you are new to Glade
[16:38] <didrocks> first, adding widgets works like a fill tool
[16:38] <didrocks> you click the widget you want in the toolbox, and then click where you want it to be on the window
[16:38] <didrocks> the widgets will then fill the space alloted to it
[16:38] <didrocks> to layout the form, you use HBoxes and VBoxes
[16:38] <didrocks> an HBox handles Horizontal layout, and a VBox handles vertical
[16:38] <didrocks> so you will find yourself putting lots of boxes within boxes
[16:38] <didrocks> when you add a widget to a window, you can select it in the "inspector" tree if it is hard to select in the window itself'
[16:39] <didrocks> boxes can be hard to select in the window, for example
[16:39] <didrocks> if a widget is in a box, use the position property in the "Property editor" window in the "packing" tab to change the order
[16:39] <didrocks> you can also add new dialogs with Quickly:
[16:39] <didrocks> 1. close glade
[16:39] <didrocks> 2. run: quickly add dialog <dialog_name>
[16:39] <didrocks> 3. quickly design
[16:39] <didrocks> and you will see the new dialog opened for you in glade :)
[16:40] <didrocks> then, once you have done that, you want to create some kind to use your new widgets and dialogs
[16:40] <didrocks> for that:
[16:40] <didrocks> quickly edit
[16:40] <didrocks> it will fire up gedit in the ubuntu-application template (and derivatives)
[16:41] <didrocks> it will configure it to use spaces instead of tabs and spaces to behave like tabs
[16:41] <didrocks> it opens every files you need to work with
[16:41] <didrocks> so, that's where the hard work should take place :)
[16:41] <didrocks> but don't take that too hard and test regularly which will be our step 3 after I answer some questions
[16:42] <didrocks> as told previously, you can take some snapshot of your code with:
[16:42] <didrocks> $ quickly save
[16:42] <didrocks> or even:
[16:42] <didrocks> $ quickly save implement a fantastic dialog to make cow to moooo
[16:42] <didrocks> if you want to give a reason of what you have done :)
[16:42] <ClassBot> blackrock asked: How do you create new template (like ubuntu-cli, ubuntu-application)?
[16:42] <didrocks> really easy
[16:43] <didrocks> ubuntu-cli and ubuntu-pygame are basically 0 line of code!
[16:43] <didrocks> yeah, 0 :)
[16:43] <didrocks> the commands are the same that in ubuntu-application
[16:43] <didrocks> we just ship a different boiler plate
[16:43] <didrocks> for that, Quickly support inheritance
[16:43] <didrocks> which means "imports commands from"
[16:43] <didrocks> so, ubuntu-cli imports all commands from ubuntu-application
[16:44] <didrocks> if you want to create your own template, you can start by an existing one
[16:44] <didrocks> like
[16:44] <didrocks> $ quickly quickly ubuntu-application my-new-template
[16:44] <didrocks> and it will create my-new-template in ~/quickly-templates, importing by default all commands from ubuntu-application
[16:44] <didrocks> you can also create your own template in /quickly-templates
[16:44] <didrocks> ~/quickly-templates,
[16:45] <didrocks> I've documented that in my blog, which is down right now as I'm moving, sorry :)
[16:45] <didrocks> but for further reference:
[16:45] <didrocks> http://blog.didrocks.fr
[16:45] <didrocks> (once up again)
[16:45] <ClassBot> ozalexo asked: Why XML? And why not YAML?
[16:45] <didrocks> ask that to glade people :)
[16:46] <ClassBot> Kruptein asked: I'm using wxPython and have actually already created my project in python, why would/should I use quickly? or should I better stay with what I have right now
[16:46] <didrocks> well, let's see the packaging part and we will discuss that :)
[16:46] <didrocks> so, quickly on step 3 :)
[16:46] <didrocks> which is testing!
[16:46] <didrocks> to run your application from trunk
[16:46] <didrocks> quickly run
[16:46] <didrocks> this will enables your, taking all the right paths for you, to test it extensivily
[16:47] <didrocks> if you want some people to test it, you can share a small first package with them
[16:47] <didrocks> quickly share
[16:47] <didrocks> it will upload to your ppa a packaged snapshot of your application
[16:47] <didrocks> and so, people can test
[16:47] <didrocks> quickly debug
[16:47] <didrocks> is for debugging your application in winpdb
[16:47] <didrocks> ok, so, now, the step your are all expected is release!
[16:48] <didrocks> when you really want everyone to see your apps in a shiny stable version!
[16:48] <didrocks> we took days and days to think about the name and the command to use :)
[16:48] <didrocks> and finally, we ended up with:
[16:48] <didrocks> quickly release
[16:48] <didrocks> :)
[16:48] <didrocks> this commands does a lot for you
[16:49] <didrocks> it's packaging your application, changing some path for you to use system libraries (if present)
[16:49] <didrocks> it detects all the dependencies needed
[16:49] <didrocks> and put that into the package
[16:49] <didrocks> it will create a gpg key for you if you don't have one on launchpad
[16:49] <didrocks> same for ssh key
[16:49] <didrocks> it's pushing your code in the trunk in launchpad, tagging it as stable
[16:50] <didrocks> also, it detects all the ppa you have access too and push to it
[16:50] <didrocks> also, it collects all messages you put in quickly save, and create an annoucement with that
[16:50] <didrocks> publish through launchpad rss feed
[16:50] <didrocks> also, it takes your upstream tarball, sign it with the gpg key, create the launchpad milestone and attaching everything for you
[16:51] <didrocks> and finally, it exports the translations for you to launchpad so that people can translate your application
[16:51] <didrocks> (in next version, it will import them for you as well :))
[16:51] <didrocks> *phew* just that for one shiny little command :)
[16:51] <didrocks> the release command just use the ubuntu way of creating version
[16:52] <didrocks> like YY.MM
[16:52] <didrocks> so, if you release this month
[16:52] <didrocks> it will be 10.10
[16:52] <didrocks> oupss
[16:52] <didrocks> 10.09
[16:52] <didrocks> (living in futur, it seems :))
[16:52] <didrocks> if you release again tomorrow, it will be 10.09.1
[16:52] <didrocks> and so on…
[16:52] <didrocks> ok, seeing a lot of questions, let's go back to them
[16:53] <ClassBot> ozalexo asked: can I just create a deb package without putting it to launchpad?
[16:53] <didrocks> and the answer is… yes!
[16:53] <didrocks> quickly package :)
[16:53] <didrocks> this will create a .deb that you can install locally
[16:53] <ClassBot> gabri_biolab asked: I've allready developed a project in C++ Qt ITK VTK as external libraries, is there a way to easy move my existing project to quickly?
[16:53] <didrocks> current templates are made of python
[16:54] <didrocks> but we just count on people to extend and create new templates!
[16:54] <didrocks> the core (the part common to templates) is in python, but templates and commands can be in whatever language of your wish
[16:54] <ClassBot> louis-nb asked: why is postfix a dependency?
[16:54] <didrocks> ahah, good one!
[16:55] <didrocks> (this is in Quickly itself, not in your applications)
[16:55] <didrocks> well, Quickly is pulling a lot of developers tools for you
[16:55] <didrocks> to be able to create a package and such
[16:55] <didrocks> one of them in ubuntu-dev-tools
[16:55] <didrocks> which has a lot of deps
[16:55] <didrocks> and one of those deps (devscripts if I remember correctly) is depending on postfix
[16:55] <didrocks> that's something I want to fix
[16:56] <didrocks> patch devscripts in ubuntu and debian
[16:56] <didrocks> to make postfix optional
[16:56] <didrocks> but it's taking time!
[16:56] <didrocks> I've already had a look some months ago
[16:56] <didrocks> but being sidetrack :)
[16:56] <ClassBot> Kruptein asked: you said: it will push to every ppa you have access too, but why would I want to push "foo" to "bar" if I have both access to "foo" and "bar" which do not have to do anything with eachother
[16:56] <didrocks> by default, it's picking the older one
[16:57] <didrocks> but you have commands to configure that
[16:57] <didrocks> already a complicated command name
[16:57] <didrocks> quickly configure <what to configure>
[16:57] <didrocks> so
[16:57] <didrocks> quickly configure ppa my-ppa-name
[16:57] <didrocks> (use tab completion, you will see what you can configure with)
[16:57] <didrocks> quickly configure <tab><tab>
[16:57] <didrocks> in bahs
[16:57] <didrocks> bash*
[16:58] <didrocks> also, think about the help on commands
[16:58] <didrocks> quickly help <command_name>
[16:58] <didrocks> will bring you the correct command help depending on the context
[16:58] <didrocks> to see you command you can have help…
[16:58] <didrocks> shell completion again! quickly help <tab><tab>
[16:58] <didrocks> ok, let's quickly wrapping up
[16:59] <didrocks> so, for references:
[16:59] <didrocks> https://wiki.ubuntu.com/Quickly#Other Resources
[16:59] <didrocks> you can see we got some press review, this is not exhaustive
[16:59] <didrocks> we also welcome everyone on #quickly on freenode :)
[17:00] <didrocks> and welcome contributions, a lot of people are contributing to quickly as well as in quickly-widgets
[17:00] <didrocks> (the latter is definitively a project you should look at)
[17:00] <didrocks> yeah, just in time!
[17:00] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html following the conclusion of the session.
[17:00] <didrocks> thanks everyone
[17:01] <Pendulum> thanks didrocks!
[17:01] <jcastro> nisshh, you're up!
[17:01] <nisshh> yep
[17:01] <nisshh> ok, hello everyone!
[17:01] <nisshh> my name is Ryan Macnish, and this session is about my app called Pytask
[17:02] <nisshh> which is created and maintained with Quickly
[17:02] <nisshh> can i get a show of hands to see who is here right now?
[17:02] <nisshh> in -chat of course :)
[17:02] <nisshh> ok, looks like a fair few
[17:03] <nisshh> right
[17:03] <nisshh> i created Pytask way back in the middle of last year
[17:04] <nisshh> i wanted to get going with Python and GTK back then, and Pytask was the first thing that came into my head
[17:04] <nisshh> link to Pytask on launchpad: https://launchpad.net/pytask
[17:05] <nisshh> back when i first started the project, i was writing it in pure GTK
[17:05] <nisshh> sorry pure pyGTK
[17:06] <ClassBot> TobiS asked: Do you have a website of your project with some information?
[17:06] <nisshh> see my link to the project page on launchpad above
[17:07] <nisshh> sometime later that year, i discovered glade, so i started using that to develop the GUI
[17:07] <nisshh> fastforward to about march this year
[17:07] <nisshh> and thats when i discovered the hidden gem that was Quickly
[17:08] <nisshh> but anyway, thats enough story :)
[17:09] <nisshh> basically, Pytask uses a combination of Quickly, Quickly-Widgets (which ill talk about in a sec) and CouchDB
[17:09] <nisshh> Currently Pytask is such a simple application
[17:10] <nisshh> it consists of just the Quickly generated code, plus less than 100 lines of code that i added in
[17:10] <nisshh> thats right, LESS than 100 lines of code
[17:11] <nisshh> it was possible to do this because i used Quickly and Quickly-Widgets
[17:12] <nisshh> Quickly-Widgets is basically a convenience
[17:12] <nisshh> it makes it much, much easier to create and modify certain widgets
[17:13] <nisshh> such as Treeviews, Couchgrids (which i will talk about in a sec), and popup yes/no/ok dialogs
[17:14] <nisshh> before i continue are there any more questions?
[17:14] <nisshh> no?
[17:14] <nisshh> ok
[17:15] <nisshh> moving on, now ill talk about Couchgrid :)
[17:15] <nisshh> Couchgrid in quickly-widgets is really awesome
[17:16] <nisshh> with Pytask, it basically allowed me to do 3 things very, very easily:
[17:16] <nisshh> 1) create and show an editable treeview
[17:16] <nisshh> 2) easily modify the contents and arrangement of that treeview
[17:17] <nisshh> 3) sync the tasks in the treeview with Ubuntu One
[17:17] <nisshh> oh
[17:17] <nisshh> for those of you who dont know, Pytask is a todo list management app
[17:17] <nisshh> similar to Getting Things Gnome
[17:19] <nisshh> number 3 is especially cool, since it allows me to sync tasks with Ubuntu One, with just a few lines of code :)
[17:19] <ClassBot> gaberlunzie44 asked: what quickly commands are used for widgets and db connectivity?
[17:19] <nisshh> very good question
[17:19] <nisshh> for the db connectivity, there are no quickly commands
[17:20] <nisshh> i simply had to import quickly widgets into my Pytask code
[17:20] <nisshh> and create the db itself, plus some keys
[17:21] <nisshh> currently, the only release of Pytask that can Sync with Ubuntu One is 10.06.1
[17:21] <nisshh> (the latest one)
[17:22] <nisshh> there is one little quirk though
[17:23] <nisshh> originally, Rick Spencer named quickly-widgets Quidgets
[17:23] <nisshh> so on launchpad, the project is Quidgets
[17:23] <nisshh> but in lucid and maverick
[17:23] <nisshh> the package is called quickly-widgets
[17:25] <nisshh> as an added bonus of Pytask using quickly-widgets, i have worked with Rick Spencer to iron out many bugs from quickly-widgets, just for you guys :)
[17:25] <nisshh> now, CouchDB :)
[17:26] <nisshh> Couchgrid uses CouchDB to sync with Ubuntu one
[17:26] <nisshh> and Couchgrid is included in quickly-widgets
[17:27] <nisshh> couchDB makes it super simple to create, delete, edit, modify, etc
[17:28] <nisshh> all your databases and database entries
[17:28] <ClassBot> gaberlunzie44 asked: link for quickly-widgets? (just to be complete)
[17:28] <nisshh> https://launchpad.net/quidgets
[17:28] <nisshh> thats quickly-widgets on launchpad
[17:29] <nisshh> moving on
[17:30] <nisshh> now, one awesome feature that i am working on for one of the upcoming releases of Pytask
[17:30] <nisshh> is the ability to use tasks interchangeably between Pytask and Getting Things Gnome
[17:30] <nisshh> this is made possible
[17:31] <nisshh> because Getting Things Gnome has support for multiple backends
[17:31] <nisshh> one of which is CouchDB
[17:31] <nisshh> (the same one as Pytask uses)
[17:32] <nisshh> so what will eventually be possible
[17:32] <nisshh> is that you will be able to create your tasks in say, Getting Things Gnome, while using the CouchDB backend of course
[17:33] <nisshh> then if you decide you like Pytask better, simply load it up, and force Pytask to use the same database as Getting Things Gnome
[17:33] <nisshh> this isnt currently possible, even in trunk
[17:33] <nisshh> but it will be very soon
[17:34] <nisshh> the next version of Pytask will, feature Indicator support
[17:34] <nisshh> which will just make it hideable on the desktop
[17:35] <nisshh> before i go any further, do we have any more questions?
[17:35] <nisshh> ok
[17:35] <nisshh> moving on
[17:37] <nisshh> the latest release of Pytask is always available in my PPA here: https://launchpad.net/~nisshh/+archive/pytask-releases
[17:37] <nisshh> which currently wont work for maverick users
[17:37] <nisshh> but is good to go for lucid
[17:37] <ClassBot> gaberlunzie44 asked: any plan for a graph/chart view, like a gantt?
[17:38] <nisshh> no, not currently
[17:38] <nisshh> when i created Pytask, i planned it to be more on the simple side
[17:39] <nisshh> but, as time goes on, i may add features like that
[17:39] <nisshh> that reminds me
[17:39] <nisshh> another feature i am very excited to be adding in soon
[17:39] <nisshh> is launchpadlib support
[17:40] <nisshh> whats this you ask?
[17:40] <nisshh> launchpadlib is a Python library that allows you to fetch objects from launchpad
[17:41] <nisshh> things like bug titles, project names, etc
[17:41] <nisshh> you can even write new data to launchpad with it if you wish
[17:41] <nisshh> anyway
[17:42] <nisshh> what i want to do is enable Pytask to fetch data from launchpad so it can be included in tasks
[17:42] <nisshh> for example:
[17:42] <nisshh> say i wanted to create a task reminding me to fix a certain bug in one of my projects on launchpad
[17:43] <nisshh> i could either add the information manually (the bug number, title, and project name)
[17:43] <nisshh> OR
[17:43] <nisshh> i could do it the cool way
[17:44] <nisshh> and use launchpadlib to quickly fetch the data from launchpad (anonymously, for those of you worried about privacy)
[17:44] <nisshh> and have Pytask automatically add it to the task in question
[17:44] <nisshh> sounds cool huh?
[17:45] <nisshh> any questions about that before i move on>
[17:45] <nisshh> ok
[17:45] <nisshh> moving on
[17:46] <ClassBot> gaberlunzie44 asked: what about sharing? thru launchpad?
[17:46] <nisshh> this, is interesting
[17:46] <nisshh> if its what i think it is that your refferring to
[17:47] <nisshh> sharing tasks through launchpad would not work really
[17:48] <nisshh> although, im not sure how that would benefit anyway
[17:48] <nisshh> ok
[17:49] <ClassBot> hackerswami asked: Couldn't sharing work via Ubuntu one support?
[17:49] <nisshh> thats exactly what Pytask already does
[17:49] <nisshh> Pytask saves tasks into a CouchDB database
[17:50] <nisshh> which then automatically get synced through Ubuntu One
[17:50] <nisshh> to any other computers connected to the same Ubuntu One account
[17:51] <nisshh> that is why i love Couchgrid so much :)
[17:51] <nisshh> also, after i push out the next release, ill be working with some people on the Ubuntu Desktop team
[17:52] <nisshh> to get Pytask into the official repositories
[17:52] <nisshh> for the uninitiated, that means you will be able to install it from the software centre :)
[17:53] <ClassBot> and471_42 asked: now that you have gone quite far in pytask, are there somethings that when you look back, you wish you had/hadn't done?
[17:53] <nisshh> wow
[17:53] <nisshh> you guys ask good questions :)
[17:54] <nisshh> well, i certainly don't have any regrets
[17:54] <nisshh> learning to program on Ubuntu and learning the tools of the trade, have taught me a lot
[17:54] <nisshh> it's been an absolute joy so far :)
[17:55] <nisshh> one thing i feel i should have done though
[17:55] <nisshh> is started using Quickly sooner
[17:55] <nisshh> it would have made my life much easier back then
[17:56] <nisshh> ok, almost out of time onw
[17:56] <nisshh> now*
[17:56] <nisshh> are there any last minute questions?
[17:57] <ClassBot> apachelogger asked: does quickly include unicorns?
[17:57] <nisshh> silly question
[17:58] <nisshh> but, yes, quickly includes unicorns of awesomeness :)
[17:58] <nisshh> ok, to wrap up
[17:59] <nisshh> feel free to get in touch with me in #quickly on freenode
[17:59] <nisshh> im nearly always there
[17:59] <ClassBot> SilentRock asked: how can i get pytask sir?
[18:00] <nisshh> my PPA
[18:00] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html following the conclusion of the session.
[18:01] <apachelogger> good morning everyone
[18:01] <apachelogger> while quickly comes with unicorn awesomeness Qt features unicorn sparkles and I hope you are ready for that :D
[18:02] <apachelogger> I'd like to welcome everyone to a (rather short) journey through the wonders and beauties of Qt development ... yay
[18:03] <apachelogger> first off let me make clear that by no means I intent to teach you Qt in this hour of fun
[18:03] <apachelogger> instead I would like ot motivate you to check out one of the many tutorials on Qt programmming and get to love the power and awesomeness of Qt
[18:04] <apachelogger> before we get started I would like to ask you to get the Qt SDK (that is if you want to take part in a live coding example later on)
[18:04] <apachelogger> You can get it from:
[18:04] <apachelogger> http://qt.nokia.com/downloads/sdk-linux-x11-32bit-cpp
[18:04] <apachelogger> or for 64bit:
[18:04] <apachelogger> http://qt.nokia.com/downloads/sdk-linux-x11-64bit-cpp
[18:05] <apachelogger> please note taht both are of considerable size (>422 MiB) but contain just about anything you will ever need for Qt development, and certainly is a good starting point for us so we do not have to worry about dependencies and what not
[18:05] <apachelogger> should you however wish to, you can also use ubuntu packages ... sudo apt-get install libqt4-dev libphonon-dev qt-creator qt4-demos phonon phonon-backend-xine
[18:05] <apachelogger> (if you are running gnome you might want to use phonon-backend-gstreamer instead of that xine thing at the ende there)
[18:06] <apachelogger> IN ANY CASE please make sure the package build-essential is installed
[18:06] <apachelogger> now then
[18:06] <apachelogger> let me start by answering the question that probably haunts you already....
[18:06] <apachelogger> "What is this Qt that due is talking about?"
[18:07] <apachelogger> (yes I can read minds :P)
[18:07] <apachelogger> Qt is a cross-platform application development framework for C++.
[18:07] <apachelogger> that makes it totally clear, right? ;)
[18:08] <apachelogger> Qt is a vast collection of more or less generic software technologis you will most likely  need and want to use to create feature rich applications  of any sort
[18:08] <ClassBot> doktor777 asked: does it make sense to develop in Qt for Ubuntu (which is based on gtk)?
[18:08] <apachelogger> Yes it does
[18:09] <apachelogger> Among other things, Qt features very powerful integration into GTK and GNOME.
[18:09] <apachelogger> So if you develop something in Qt it will integrate well on Windows and OSX and KDE *AND* GNOME
[18:09] <apachelogger> Also Qt is a very powerful framework with lots and lots of functionality...., so ;)
[18:10] <ClassBot> Caagalar asked: Is that SDK come from QT Creator from ubuntu repositories?
[18:11] <apachelogger> The SDK is a self-contained package of all Qt components (that includes the regular development tools) and Qt Creator.
[18:11] <apachelogger> so basically evyerthing you will ever want
[18:11] <apachelogger> But let us continue on me informing you :D
[18:12] <apachelogger> Something important to note is that Qt, contrairy to what some people believe, is not a graphics toolkit!!!!!!elven*star*
[18:12] <apachelogger> It certainly features a lot of graphics technology that helps with creating graphical applications, but it is not limited to that.
[18:13] <apachelogger> In particular Qt is made up of many modules and you decide which modules you want to use.
[18:13] <apachelogger> Some important ones have names like QtCore QtGui QtWebKit and QtDBus
[18:14] <apachelogger> Now say you create an appliation using only QtCore you do not need a graphics stack at all
[18:14] <apachelogger> for example the IRC client Quassel can use a server application running on a proper server without graphics.
[18:14] <apachelogger> this is possible because the quassel server is written only using QtCore and QtNetwork (which both do not do any graphics magic)
[18:15] <ClassBot> SilentRock asked: why would i choose QT?
[18:15] <apachelogger> I hope to have answered that implicitly by the end of the talk, if not feel free to ask it again :)
[18:16] <apachelogger> So, you can create a lot of applications (both graphical and non-graphical), but also terrific is that you can deploy those applications on quite a bit of platforms.
[18:16] <apachelogger> Well, lets say operating systems...
[18:17] <apachelogger> Qt is available for quite a lot of them and say you write an application that only uses standard C++ and Qt you can compile and run it on Linux just as well as on Windows.
[18:17] <apachelogger> Qt is by design made cross-platform.
[18:17] <apachelogger> To be precise the following operating systems are officilly supported:
[18:17] <apachelogger> Linux
[18:17] <apachelogger> Windows
[18:17] <apachelogger> Windows CE
[18:17] <apachelogger> Mac OS X
[18:18] <apachelogger> MeeGo (i.e. Maemo as seen on the Nokia N900)
[18:18] <apachelogger> and Symbian
[18:18] <apachelogger> On top of that there are partially experimental third part portations available for:
[18:18] <apachelogger> OpenSolaris
[18:18] <apachelogger> *BSD
[18:18] <apachelogger> Haiku
[18:18] <apachelogger> OS/2
[18:18] <apachelogger> Android
[18:18] <apachelogger> iPhone
[18:18] <apachelogger> Amazon's Kindle
[18:18] <apachelogger> and probably many more
[18:19] <apachelogger> I did not convince you yet?
[18:19] <apachelogger> Well then.
[18:19] <apachelogger> I said that Qt is a framework for C++
[18:19] <apachelogger> that is true, but also a bit limited...
[18:20] <apachelogger> In Qt 4.7 you can also officially use JavaScript (or rather ECMAScript) ... that would then be called QML
[18:20] <apachelogger> BUT
[18:20] <apachelogger> additionally to that there are some language bindings available
[18:20] <apachelogger> to my knowledge there are bindings for:
[18:20] <apachelogger> Ruby
[18:20] <apachelogger> Python
[18:20] <apachelogger> C#
[18:20] <apachelogger> Java
[18:20] <apachelogger> Ada
[18:20] <apachelogger> Lua
[18:20] <apachelogger> Common Lisp
[18:20] <apachelogger> PHP (yes the web PHP)
[18:20] <apachelogger> R
[18:20] <apachelogger> ...
[18:21] <ClassBot> doktor777 asked: and what if I use something like pyQt? the portability gets worse?
[18:21] <apachelogger> well, Qt itself is still portable the bindings however might not be... I am quite certain that pyQt however runs on all 3 major platforms though
[18:22] <ClassBot> SilentRock asked: what about D?
[18:22] <apachelogger> I don't think there are bindings for D, maybe someone wants to do them? ;)
[18:22] <apachelogger> Now for some change, let us watch a video together, shall we?
[18:23] <apachelogger> A very nice intro on Qt http://www.youtube.com/watch?v=p0xiKBEx8RA
[18:27] <ClassBot> rooliganLernid asked: but where are the disadventages?
[18:27] <apachelogger> You might be asking the wrong person ;)
[18:27] <apachelogger> Well, one obvious disadvantage is that of course a Qt application has a bigger footprint than a standard C++ one
[18:28] <apachelogger> So using it for a hello world application that only uses QtCore and outputs to the console would not make sense ;)
[18:28] <apachelogger> Other than that I could not really think of disadvantages I personally experienced
[18:28] <apachelogger> Well then.
[18:28] <apachelogger> I hope everyone has finished watching the video.
[18:29] <apachelogger> And we already sort of ended up at the question "What can you really do with Qt?"
[18:29] <apachelogger> Let me put it this way: there is almost nothing you cannot do with it...
[18:30] <apachelogger> As I said earlier, Qt provides various moduels by default (note that all those modules and classes are essentially based on core functions of the QtCore modules, so one can just as well write own stuff)
[18:31] <apachelogger> those modules allow you ot create very richa nd advanced graphic user interfaces, embed multimedia content, draw custom 2D graphics, draw custom 3D graphics, make us of multiple CPU(core)s, embed web content, include scripting capabilities, connect to databases ranging from sqlite to postgresql and many many more things.
[18:31] <apachelogger> It is terribly difficult to comunicate something as extraordinary as Qt through writing, so I better adivse you to take a look at some Qt show cases.
[18:31] <apachelogger> http://qt.nokia.com/qt-in-use/ambassadors/showcase
[18:32] <apachelogger> With Qt you can not simply create dull graphical applications, you can create beauty.
[18:32] <apachelogger> And please keep in mind, this beauty is cross-platform.
[18:33] <apachelogger> Are we finished with downloading the SDK yet?
[18:33] <ClassBot> SilentRock asked: apache,thats a cliche,all programmers say the same about theyre favorite lenguage,how can you prove that hte possibilities of Qt are unlimitted?
[18:34] <apachelogger> That is a difficult one ...
[18:35] <apachelogger> I mentioned earlier that Qt in itself is based on its QtCore module (largely), so while you can already do all sorts of things out of the box, you can implement an indefinit amount of other new things using the existing solutions.
[18:35] <apachelogger> building up on them
[18:35] <apachelogger> In essence that is what KDE does.
[18:36] <apachelogger> KDE takes Qt and stacks a whole bunch of additionaly refined specified solutions on top of it that are necessary to create a coherent desktop environment.
[18:36] <apachelogger> But since only 30 mins are left we better continue ;)
[18:36] <apachelogger> With some coding
[18:36] <apachelogger> \o/
[18:36] <apachelogger> yay
[18:36] <apachelogger> hooray
[18:36] <apachelogger> \o/
[18:36] <apachelogger> those that do not want to take part right now, can continue watching videos
[18:36] <apachelogger> e.g.
[18:36] <apachelogger> Qt @ Embedded World 2010: http://www.youtube.com/watch?v=hq34gppsnzw
[18:36] <apachelogger> Qt Everywhere on All Platforms: http://www.youtube.com/watch?v=yh5Rt3cfuoQ
[18:37] <apachelogger> Or generally stuff from QtStudios on YouTube. One gets a very good impression of Qt from those videos.
[18:37] <apachelogger> SO.
[18:37] <apachelogger> After installing the SDK you should have Qt Creator opened
[18:37] <apachelogger> that is Qt's own IDE
[18:37] <apachelogger> We will use it to swiftly create an application that I like to calll Cappuccino
[18:38] <apachelogger> simply put: we are going to make a video player \o/
[18:38] <apachelogger> On Qt creator ....
[18:38] <apachelogger> in the menubar....
[18:38] <apachelogger> File -> new project
[18:39] <apachelogger> We will make a Qt C++ Project
[18:39] <apachelogger> in specific a Qt Gui Application
[18:39] <apachelogger> that should be default already
[18:39] <apachelogger> click choose
[18:39] <apachelogger> then give it our cool name and select a path where to place the source
[18:39] <apachelogger> next -> next -> finish
[18:40] <apachelogger> we now have a very basic application already if you hit CTRL+R you should get a plain window already
[18:40] <apachelogger> (instead of CTRL+R you can also press the green play icon thingy)
[18:41] <apachelogger> in qt creator you should have a very strange view right now
[18:41] <apachelogger> with loads of elements and a plain window in the middle
[18:41] <apachelogger> that is our designer
[18:41] <apachelogger> here we can compose simple things using drag and drop
[18:41] <apachelogger> so lets do that
[18:41] <apachelogger> in the bar on the left hand side filter for "widget"
[18:42] <apachelogger> an drag a "Widget" onto our window
[18:42] <apachelogger> next filter for "push"
[18:42] <apachelogger> and drag a push button below the widget in our window
[18:43] <apachelogger> now right click on empty bakckground space of the window and choose Lay out -> lay out vertically
[18:43] <apachelogger> that should have brought things into order already
[18:43] <apachelogger> now lets tweak around a bit
[18:43] <apachelogger> first click on the button
[18:44] <apachelogger> on the right hand side there is at the top a list of our widgets in the window (which is rather uninteresting right now) and below an editor for the properties of the currently selected widget
[18:44] <apachelogger> so lets change the button around a bit
[18:45] <apachelogger> filter for 'flat' (or scroll to the very bottom) and check the checkbox there
[18:45] <apachelogger> now filter for 'text' and remove the text
[18:45] <apachelogger> now filter for 'icon' and
[18:45] <apachelogger> well
[18:45] <apachelogger> let me get a URL real quick
[18:45] <apachelogger> http://people.ubuntu.com/~apachelogger/uadw/09.10/data/play.png
[18:46] <apachelogger> download that and place it somewhere you can find it
[18:46] <apachelogger> e.g. your home directory
[18:46] <apachelogger> now back in qt creator
[18:46] <apachelogger> if you select the icon property there is an arrow next to the value field, click that arrow and choose from file
[18:47] <apachelogger> select the play.png
[18:47] <apachelogger> also while we have a filter on 'icon' set the icon size to 48x48
[18:47] <apachelogger> now lets do something to the widget
[18:48] <apachelogger> right click on the widget and choose "promote to"
[18:48] <apachelogger> that is somehwere in the middle of the context menu
[18:48] <apachelogger> at the bottom of the dialog we'll add a new class
[18:48] <apachelogger> class name: Phonon::VideoWidget
[18:48] <apachelogger> header file: Phonon/VideoWidget
[18:48] <apachelogger> [x] global include
[18:49] <apachelogger> then clik 'add' and finally 'promote'
[18:49] <apachelogger> save and close the file (using the x in the upper right corner)
[18:49] <apachelogger> you should now find a projects overview on the left hand side
[18:49] <apachelogger> there open the Cappuccino.pro file
[18:50] <apachelogger> there you should find the following line:
[18:50] <apachelogger> QT       += core gui
[18:50] <apachelogger> just append 'phonon' to that
[18:50] <apachelogger> QT       += core gui phonon
[18:50] <apachelogger> like that
[18:50] <apachelogger> save and close again
[18:50] <apachelogger> in the sources folder of the projects overview you will find a mainwindow.cpp file
[18:51] <apachelogger> there we will now create the application logic of our player
[18:51] <apachelogger> first add a couple of includes at the top
[18:51] <apachelogger> #include <Phonon/AudioOutput>
[18:51] <apachelogger> #include <Phonon/MediaObject>
[18:51] <apachelogger> #include <Phonon/MediaSource>
[18:51] <apachelogger> now within the curly brackets of MainWindow::MainWindow we do everything that follows
[18:51] <apachelogger> first we create a phonon media object
[18:52] <apachelogger> phonon is the multimedia magic of Qt and a media object is the thing that will hold a video file or an audio file
[18:52] <apachelogger> Phonon::MediaObject *media = new Phonon::MediaObject(this);
[18:52] <apachelogger> as easy as that ;)
[18:52] <apachelogger> now we attach this media to our widget in the window
[18:52] <apachelogger> Phonon::createPath(media, ui->widget);
[18:52] <apachelogger> we would also like some audio
[18:52] <apachelogger> so we create an audio output
[18:52] <apachelogger> Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::VideoCategory, this);
[18:53] <apachelogger> and also attach our media to that output
[18:53] <apachelogger> Phonon::createPath(media, audioOutput);
[18:53] <apachelogger> finally we make our button invoke the playback
[18:53] <apachelogger> connect(ui->pushButton, SIGNAL(clicked()), media, SLOT(play()));
[18:53] <apachelogger> now
[18:54] <apachelogger> if you are still following, because I am quite fast because we were chit chatting too much earlier :P....
[18:54] <apachelogger> if you hit CTRL+R (or that green play icon thingy) you should get a window
[18:54] <apachelogger> and if you hit the play button it should start playback
[18:54] <apachelogger> or not... ;)
[18:54] <apachelogger> something we forgot was to define a media source
[18:55] <apachelogger> i.e. the actual thing that we want to play back
[18:55] <apachelogger> so just add this
[18:55] <apachelogger> media->setCurrentSource(Phonon::MediaSource("http://people.ubuntu.com/~apachelogger/uadw/09.10/humanity.ogv"));
[18:55] <apachelogger> then try CTRL+R again and hit the play button again and now you should get a video
[18:56] <apachelogger> of course now the button is useless after you hit i once, so we will just hide it once hit
[18:56] <apachelogger> connect(ui->pushButton, SIGNAL(clicked()), ui->pushButton, SLOT(hide()));
[18:56] <apachelogger> now we have a pretty decent video player
[18:57] <apachelogger> in case you got stuck: http://people.ubuntu.com/~apachelogger/uadw/09.10/Cappuccino/
[18:57] <apachelogger> here is my source
[18:57] <apachelogger> also you can find me in #kubuntu-devel where we can continue making it work for you too
[18:57] <apachelogger> Where you can and should go now...
[18:57] <apachelogger> Take a look at the getting started guide
[18:57] <apachelogger> http://doc.qt.nokia.com/latest/gettingstarted.html
[18:58] <apachelogger> and the examples  http://doc.qt.nokia.com/latest/all-examples.html
[18:58] <apachelogger> your Welcome page of Qt Creator already contains all examples so you can easily try them and explore the real power of Qt
[18:58] <apachelogger> some Examples I can recommend:
[18:58] <apachelogger>  Animated Frameworks -> Animated Tiles
[18:58] <apachelogger>  Graphics View -> Elastic Nodes
[18:58] <apachelogger>  Main Windows -> Application
[18:58] <apachelogger>  Items View -> Puzzle
[18:58] <apachelogger> And last but not least join #qt ;)
[18:59] <apachelogger> Any question that I can answer in one minue?
[18:59] <apachelogger> *minute
[19:00] <apachelogger> Well.
[19:00] <apachelogger> Thank you everyone, you were an amazing  audience
[19:00] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html following the conclusion of the session.
[19:01] <sense> thanks to apachelogger for a great and very filled session and welcome to everyone attending this session on Indicators!
[19:02] <sense> This session I want to talk you through two code examples of two types of indicators, using them to explain how the indicators work. The rest of the time I will try to answer questions about using indicators. If you want to use an indicator in your own application, save your questions
[19:03] <sense> The first example is code of an Application Indicator, the second of an application registered in the Me Menu.
[19:04] <sense> I will not explain how to let your application use the Me Menu, since that is not extensible, and I will only briefly touch the Sound Menu during the section about the Messaging Menu.
[19:04] <sense> The two code examples can be found at <http://people.ubuntu.com/~sense/uadw/>, the .desktop file is for the Messaging Menu.
[19:05] <sense> First, let us talk about the Application Indicator. Everyone, open http://people.ubuntu.com/~sense/uadw/appind-example.py if you want to read along. I'll try to copy crucial code into the chat.
[19:05] <sense> Everyone's got the file?
[19:06] <sense> Skip past the license to read the first line of interest:
[19:06] <sense> import appindicator
[19:06] <sense> This line of Python code tells we want to use the Application Indicator library.
[19:06] <sense> If you don't have the package 'python-appindicator' installed you want to install it before testing this example/
[19:07] <sense> Skipping past a function we will come back to later, and past the creation of a GtkWindow we see the second line of interest:
[19:07] <sense>     ind = appindicator.Indicator ("example-simple-client",
[19:07] <sense>                                 "indicator-messages",
[19:07] <sense>                                 appindicator.CATEGORY_APPLICATION_STATUS)
[19:08] <sense> This is the most important call we make: here we register the application with the Application Indicator 'server'.
[19:08] <sense> The first argument is the (unique) ID of your application. You probably want to use the same name here as you use for your package and icon names.
[19:09] <sense> The second argument, 'indicator-messages' is actually the icon name.
[19:09] <sense> The third argument is the category of the Application Indicator.
[19:10] <sense> There are five different categories:
[19:10] <sense> APP_INDICATOR_CATEGORY_APPLICATION_STATUS
[19:10] <sense> APP_INDICATOR_CATEGORY_COMMUNICATIONS
[19:10] <sense> APP_INDICATOR_CATEGORY_SYSTEM_SERVICE
[19:10] <sense> APP_INDICATOR_CATEGORY_HARDWARE
[19:10] <sense> APP_INDICATOR_CATEGORY_OTHER
[19:10] <sense> In Python you call them differently:
[19:10] <sense> appindicator.CATEGORY_APPLICATION_STATUS
[19:10] <sense> appindicator.CATEGORY_COMMUNICATIONS
[19:10] <sense> appindicator.CATEGORY_SYSTEM_SERVICE
[19:10] <sense> appindicator.CATEGORY_HARDWARE
[19:10] <sense> appindicator.CATEGORY_OTHER
[19:12] <sense> The first category is used by applications to show their status, the second by communications-related applications, the third by system-related applications and the fourth by... hardware related applications (think Bluetooth indicators and such). The fifth is 'miscellaneous', but shouldn't really be used unless there really is no other option.
[19:13] <sense> In the future the developers of the Application Indicators project can use these categorise to alter the way different types of applications are shown.
[19:13] <ClassBot> ozalexo asked: How can I check that my application name (first parameter) is unique at this time?
[19:15] <sense> ozalexo: You cannot be sure, of course. There is always a small chance the name is not unique. That won't crash your system, but please try to check if an application using the name already exists before using it as an ID. That's related to choosing a name for your application, though, so it should be done when starting your project.
[19:16] <sense> The two lines of code after the initial call to the appindicator library are interesting:
[19:16] <sense>     ind.set_status (appindicator.STATUS_ACTIVE)
[19:16] <sense>     ind.set_attention_icon ("indicator-messages-new")
[19:17] <sense> The first line sets to the status to 'active'. When the status of the application indicator is 'active', it is shown. By default it is 'passive', then it is hidden.
[19:17] <sense> The next line is related to the third status. It sets the 'attention-icon'. The attention-icon is displayed when the status is set to 'attention'.
[19:18] <sense> You can use that status when you want to grab the attention of the user.
[19:18] <sense> appindicator.STATUS_PASSIVE and appindicator.STATUS_ATTENTION are the Python names of the other two statuses.
[19:19] <sense> The next few lines of code in the example are for creating the menu. Once you've got your menu (as you can see, you can connect signals just like you would do with a regular menu), you need to tell it should be associated with the application indicator.
[19:20] <sense> In our case, the line of code to do that is:
[19:20] <sense>     ind.set_menu(menu)
[19:20] <sense> This is a short overview of the Application Indicator code example. Are there any questions so far?
[19:22] <sense> Alright then!
[19:22] <sense> Lets take a look at the Python code that registers an application in the Messaging Menu!
[19:23] <sense> You need the code example at <http://people.ubuntu.com/~sense/uadw/messmenu-example.py> for this, and the .desktop file at <http://people.ubuntu.com/~sense/uadw/example.desktop>. Place both files in the same directory.
[19:24] <sense> If you don't understand a piece of the code, be it code related to the messaging menu, or other code, don't be afraid to ask!
[19:24] <sense> Here we need to import the libindicate library:
[19:24] <sense> import indicate
[19:25] <sense> After that initial line of library importing there are two functions that are used as callback functions and then the first line of interesting code:
[19:25] <sense> mm_server = indicate.indicate_server_ref_default()
[19:25] <sense> mm_server.set_type("message.mail")
[19:25] <sense> mm_server.set_desktop_file(os.path.join(os.getcwd(), "example.desktop"))
[19:25] <sense> mm_server.connect("server-display", server_activated)
[19:26] <sense> The first line of the four I just pasted into the chat creates a reference to a new 'server' entry in the indicator server. This is the general representation of our application in the Messaging Menu, and the main way of interacting with it.
[19:26] <sense> The second line sets the type: in our case it is a 'mail' application.
[19:28] <sense> Please refer to <https://wiki.ubuntu.com/MessagingMenu> for an overview of the different types.
[19:28] <sense> Here also comes the note on the Sound Menu:
[19:28] <sense> Actually, libindicate isn't just for the Messaging Menu. Our application will show up in the Messaging Menu, but only because we've set the type to 'message.mail'.
[19:29] <sense> But libindicate also registers applications with other indicators, like the Sound Menu. Rhythmbox uses the same code, but sets its type to 'music.rhythmbox'.
[19:29] <sense> This has the consequence that applications only have to register themselves at one place, and that then libindicate will make sure they are represented as they should be.
[19:30] <sense> Of course, in order to be shown in the Sound Menu you also need to have an MPRISv2 interface available, but that is out of the scope of this session.
[19:30] <sense> Back to the four lines I pasted into the chat.
[19:31] <sense> The third line of those four is also important, it is actually a required step.
[19:31] <sense> Here you register your application's .desktop file. Thanks to this it is possible for users to launch an application from the Messaging Menu after it was closed.
[19:32] <sense> The fourth code line is just a registration of a callback function, executed when someone clicks on the main ('server') entry in the messaging menu.
[19:32] <sense> Am I understandable?
[19:33] <sense> In the next part of the code example you can see a 'for' loop, used to quickly create three different entries, 'mail boxes' in this case.
[19:35] <sense> You see that we start with creating a new 'Indicator' object. This is the unfortunate terminology for the subentries of applications in the Messaging Menu.
[19:35] <sense> http://people.ubuntu.com/~sense/uadw/messmenu-example.py
[19:35] <sense>     box = indicate.Indicator()
[19:36] <sense> Please note that in order for a subitem to stay around you need to keep a reference.
[19:37] <sense> The next part of the code inside the for loop is for setting the properties of our subitem:
[19:37] <sense>     box.set_property("name", "Mailbox %d" % i)
[19:37] <sense>     box.set_property("count", str(i))
[19:37] <sense>     box.label = "Mailbox %d" % i
[19:37] <sense>     box.connect("user-display", mailbox_activated)
[19:38] <sense> We set the indiator's name, which will be used for the label of the subitem in the Messaging Menu and the 'count'. That 'count' can be used for showing the number of unread mails in your mailbox.
[19:39] <sense> Chat clients can use other properties when they want to show the time since someone e.g. mentioned your name in a conversation.
[19:39] <sense> The last line in the pasted code connects again a callback function, which is executed when the user clicks the subitem.
[19:40] <sense> You have to call     box.show() on the subitems to make them be displayed.
[19:40] <sense> The same is true of the main item: mm_server.show()
[19:41] <sense> Are there questions about what I previously said?
[19:41] <sense> Actually, mm_server.show() is not required.
[19:41] <sense> You just need to make sure you let the subitems show, by calling the show() function on them.
[19:42] <sense> Any questions about what I've said so far?
[19:42] <ClassBot> ozalexo asked: Is it possible to use any own icons in the menus?
[19:43] <sense> ozalexo: Good question! I forgot to mention that the Messaging Menu sets the icon using the desktop file provided to it.
[19:43] <sense> In the file 'example.desktop' you see the following line:
[19:43] <sense> Icon=applications-email-panel
[19:44] <sense> The Messaging Menu reads that line and uses the applications-email-panel icon.
[19:46] <sense> Is there anyone reading who is using an indicator in his or her application?
[19:46] <sense> Any questions about that? What do you think of the technology?
[19:47] <ClassBot> jiga asked: is there a simple way to do the baloon notifications too?
[19:48] <sense> jiga: Notify OSD is Canonical's implementation of the Notification Specification, and is part of Ayatana. However, the libraries used for creating notification bubbles are not developed by Canonical, since they were developed together with the standard.
[19:49] <sense> Let me show you a few lines of code to help you along.
[19:49] <sense> jiga: I think that this is a reasonable example: <http://ubuntuforums.org/showthread.php?t=926797>
[19:50] <sense> Generally, you need pynotify
[19:50] <ClassBot> ozalexo asked: Is it possible to implement smth like Chrome's menu?
[19:52] <sense> ozalexo: It is not possible to have special menu items like that in the Messaging Menu or the Application Indicators' menu, because that is custom interface. We're only using the standard GTK+ interface toolkit, and on top of that, we don't provide the functions to the application developers to do it themselves. In case of the Application Indicator we put the provided menu in some sort of pseudo-menu structure before passing it over DBus to th
[19:52] <sense> e server, which deconstructs it again, and then rebuild it. But that only works for regular menus. The messaging Menu even provides less options for customisation.
[19:53] <ClassBot> rooliganLernid asked: How to change the icon in the first example? There is no .desktop file. So what to do?
[19:54] <sense> rooliganLernid: For application indicators you provide the general icon name as the second of the three arguments you give to the initialisation function.
[19:54] <sense>     ind = appindicator.Indicator ("example-simple-client",
[19:54] <sense>                                 "indicator-messages",
[19:54] <sense>                                 appindicator.CATEGORY_APPLICATION_STATUS)
[19:54] <sense> In this case the icon is 'indicator-messages'
[19:54] <sense> You can also set a special attention icon, which is shown when you set the status to appindicator.STATUS_ATTENTION
[19:55] <ClassBot> rooliganLernid asked: So just edit it to "/home/user/blah"?
[19:55] <sense> rooliganLernid: You cannot provide a direct path to an icon, but in the regular constructor you give the icon name.
[19:55] <sense> The icon is then searched for in the theme.
[19:56] <sense> However, you can set the icon theme path, to extend the search.
[19:57] <sense> rooliganLernid: Does that make sense to you?
[19:58] <sense> The function for setting the icon theme path is '.set_icon_theme_path('/icon/theme/path')'
[19:58] <sense> Any other questions, remarks, suggestions?
[19:59] <sense> No?
[19:59] <jcastro> alright sense! good job!
[19:59] <sense> In that case I would like to thank you for your attention and point you to jcastro for the next session!
[20:00] <jcastro> Awesome, thanks for coming everyone
[20:00] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html following the conclusion of the session.
[20:00] <jcastro> This session is going to be about daily builds
[20:00] <jcastro> and how you can set them up for your project
[20:00] <jcastro> So before we start, I'm going to link you up to some documentation that you can follow along with
[20:00] <jcastro> https://help.launchpad.net/Packaging/SourceBuilds
[20:01] <jcastro> ok so first off, what is a daily build?
[20:01] <jcastro> this is your software, pulled out of version control and built every night in launchpad
[20:01] <jcastro> COntrary to popular belief, daily builds aren't about getting you the latest crack, it's about getting testing of specific features and bugs tested.
[20:02] <jcastro> also, feel free to ask questions at any time
[20:02] <jcastro> so, imagine you have a program, that is at version 1.0
[20:02] <jcastro> you report a bug and then the developer fixes it
[20:02] <jcastro> and commits it
[20:02] <jcastro> but, until the developer release 1.1 (or whatever), it's hard for you to test
[20:02] <jcastro> because unless you're an expert, you may not know how to build the software from source
[20:03] <jcastro> so, daily builds allow the developer to say "here try this PPA, let me know if the bug is fixed"
[20:03] <jcastro> and then you can easily try it, say yes! or no! and then be on your merry way
[20:03] <jcastro> we call this "tightening the feedback loop between developers and users"
[20:03] <jcastro> getting feedback back to developers quicker
[20:04] <jcastro> and developers getting stuff for users to test quicker
[20:04] <jcastro> so, in order to do this, the launchpad team have made it easy for just about any project to fire up daily builds
[20:05] <jcastro> (Note, this isn't a software development class, so if you're unsure on why your project should have dailies, a trunk that builds at all times, etc. please see other documentation on the internet)
[20:05] <jcastro> ok, so, I'm going to show you an example of how to take a project
[20:05] <jcastro> import it into launchpad
[20:05] <jcastro> and then fire off dailies
[20:05] <jcastro> since this is a Launchpad feature, we need two things to make the debs
[20:05] <jcastro> we need
[20:05] <jcastro> 1) The upstream source code
[20:06] <jcastro> 2) the packaging
[20:06] <jcastro> now, I am lazy, so there's no way I'm going to go figure out how to package shotwell
[20:06] <jcastro> however .... https://code.launchpad.net/~ubuntu-desktop/
[20:06] <jcastro> as it turns out the ubuntu desktop team keeps all their packaging in version control
[20:06] <jcastro> wow, that's handy!
[20:07] <jcastro> Now, I know what you are thinking... "Jorge, are you telling me I can just reuse the existing packaging and spit out debs of whatever I want?"
[20:07] <jcastro> yes and no
[20:07] <jcastro> First off, not every team in Ubuntu is using bzr for packaging (yet)
[20:07] <jcastro> but we're well on our way
[20:07] <jcastro> and, there's no guarantee that taking packaging for something in the distro will Just Work(tm) on a pure upstream source.
[20:08] <jcastro> So .... I went and tried it!
[20:08] <jcastro> ok so from looking at that list, I find shotwell's packaging
[20:08] <jcastro> https://code.launchpad.net/~ubuntu-desktop/shotwell/ubuntu
[20:08] <jcastro> there it is
[20:08] <jcastro> this is basically the debian/ directory of the package the desktop team uses in ubuntu
[20:08] <jcastro> Now we need the source code from upstream!
[20:09] <jcastro> I can quickly google that
[20:09] <jcastro> http://yorba.org/shotwell/install/
[20:09] <jcastro> aha, there it is....
[20:09] <jcastro> $ svn co svn://svn.yorba.org/shotwell/trunk shotwell
[20:09] <jcastro> is what they tell us.
[20:10] <jcastro> But they're using subversion, and I'm using Launchpad ....
[20:10] <jcastro> so, I can tell Launchpad to import the Shotwell svn repository
[20:10] <jcastro> by requesting a code import: https://code.launchpad.net/+code-imports/+new
[20:10] <jcastro> code imports work for cvs, svn, and git
[20:11] <jcastro> there is currently a limitation with the git import (no submodule support yet)
[20:11] <jcastro> but the bzr team is working hard on that so more git using upstreams can use this feature
[20:11] <jcastro> then launchpad goes and imports it and sends you a mail
[20:11] <jcastro> how long it takes depends on the import
[20:12] <jcastro> In the mail it tells me it's imported shotwell into launchpad here: https://code.launchpad.net/~jorge/shotwell/trunk
[20:12] <jcastro> any questions so far?
[20:12] <jcastro> so far we've imported shotwell into launchpad, and found the packaging branch the desktop team uses for shotwell
[20:12] <jcastro> ok, so we've got the 2 parts we need
[20:13] <jcastro> now we're going to tell Launchpad to shove it all in a blender and spit out debs!
[20:13] <jcastro> we do this by using what we call recipes
[20:13] <jcastro> https://code.edge.launchpad.net/~jorge/shotwell/trunk
[20:13] <jcastro> and you  can click "Create a packaging recipe"
[20:13] <jcastro> but, I've got done done already
[20:13] <jcastro> https://code.edge.launchpad.net/~jorge/+recipe/shotwell-daily
[20:13] <jcastro> there it is
[20:14] <jcastro> now, this recipe is where the magic is
[20:14] <jcastro> and covered in greater detail here: https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted
[20:14] <jcastro> so let's look at it
[20:14] <jcastro> # bzr-builder format 0.2 deb-version 1.0+{time}
[20:14] <jcastro> lp:shotwell
[20:14] <jcastro> nest shotwellpackaging lp:~ubuntu-desktop/shotwell/ubuntu debian
[20:15] <jcastro> these three lines are basically "we're building shotwell, the version is 1.0+$whatever_time_it_is, grab the source code from lp:shotwell, and then mush the packaging branch from lp:~ubuntu-desktop/shotwell/ubuntu and make a deb"
[20:16] <jcastro> when I create the recipe I can choose which PPA to send it to
[20:16] <jcastro> as you can see, I sent it to my "Daily test builds" PPA I made
[20:17] <jcastro> https://code.edge.launchpad.net/~jorge/+archive/dailies/+packages
[20:17] <jcastro> you can find the .deb there.
[20:17] <jcastro> or NOT, because it failed.
[20:17] <jcastro> hmm, I must have missed something.
[20:17] <jcastro> right, I forgot to test my recipe to see if it even worked!
[20:18] <jcastro> now, everytime I set up a daily build, this uses up resources
[20:18] <jcastro> and the last thing we need is daily builds contributing to the heat death of the universe
[20:18] <jcastro> so ... we first need to test the build locally
[20:18] <jcastro> to make sure we've shaken out the bugs
[20:19] <jcastro> this also means that you can also use your own machine to make daily builds
[20:19] <jcastro> so if you have your favorite project and want to just set that up locally, you can totally do that
[20:19] <jcastro> https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted#Testing locally
[20:19] <jcastro> this has instructions for how to test them locally, using bzr-builder, and pbuilder
[20:19] <jcastro> any questions so far?
[20:20] <jcastro> no questions? This can't be that easy!
[20:20] <jcastro> ok
[20:21] <jcastro> so, let's see what we can do with these things
[20:21] <jcastro> let's use the amazing server team as an example on how they use daily builds
[20:22] <jcastro> they maintain a whole bunch of these
[20:22] <jcastro> https://edge.launchpad.net/~ubuntu-server-edgers
[20:22] <jcastro> what we've got here is a collection of daily builds for all sorts of projects
[20:22] <jcastro> apache, mysql, nagios, puppet, samba, varnish, etc. etc.
[20:22] <jcastro> the list goes on and on
[20:23] <jcastro> so, the team uses daily builds so people who are deploying these applications can test /the very latest/ code, right as it's committed
[20:23] <jcastro> this leads to better bug reports, and better testing (remember what I said earlier about tightening the feedback loop)
[20:24] <jcastro> ok so we've set up shotwell for dailies now (that was just an example, I haven't actually helped the shotwell guys set up dailies, but we're getting together this week to do it)
[20:24] <jcastro> now, theoretically, launchpad goes off and builds the debs and publishes them to a PPA I've designated
[20:25] <jcastro> This happens on the launchpad build farm: https://launchpad.net/builders
[20:25] <jcastro> this is where you can see packages being built for both the distro and PPAs, in every supported arch
[20:25] <jcastro> when you set this up launchpad mails you when it starts to build these, and it does a good job of telling you if it fails or something
[20:26] <ClassBot> ozalexo asked: Is it possiblt to make my daily-builds hidden from people? What if I hezitate to show it, but I need to test it? :)
[20:26] <jcastro> this is a good question
[20:26] <jcastro> so in the example I set everything up in my little launchpad space, which is why the url's all have ~jorge in them
[20:26] <jcastro> chances are no one cares about those too seriously
[20:27] <jcastro> however, when you're ready to go public, you can put them in a more canonical place
[20:27] <jcastro> https://launchpad.net/shotwell
[20:27] <jcastro> they will eventually show up here ^^^
[20:27] <jcastro> but yeah, when I am playing with them and they are broken I put them under ~jorge
[20:28] <jcastro> one thing some projects fear is that users will use daily builds instead of releases
[20:28] <jcastro> because we're maniacs everyone loves to have the pure hotness delivered every day
[20:28] <jcastro> how you handle that is up to your project
[20:29] <jcastro> and launchpad has facilities to ensure that you're not being spammed by bug reports from package versions that aren't in the archive
[20:29] <jcastro> however if you have a dedicated group of people who know how to test, dailies bring a bunch of benefits
[20:29] <jcastro> which I think outweigh the downsides
[20:29] <jcastro> ok so wow, I type way faster than I should, any other questions?
[20:30] <jcastro> another question I hear often is "If I am building trunk every day what if I break something! OMG anxiety!"
[20:31] <jcastro> the simple answer to that is in a world with distributed version control and branching and merging you can do all sorts of development in a branch and then merge it into trunk when it's ready and works
[20:31] <jcastro> and since we let you make as many recipes and branches as you want
[20:32] <jcastro> there's nothing stopping you from making myapp-newfeature daily builds until you're ready to merge it
[20:32] <jcastro> I forsee a world where application developers can just spit out .debs for individual fixes, so users can confirm it fixes their bug, and then the dev just rolls that into trunk and moves on\
[20:34] <jcastro> any other questions?
[20:35] <jcastro> abentley: any comments?
[20:35] <jcastro> Aaron has been working on this feature all cycle!
[20:36] <abentley> jcastro: seems like a good introduction.  Did you mention that we also support imports from Mercurial?
[20:36] <jcastro> nope, I didn't know that!
[20:36] <jcastro> and CVS still too I assume?
[20:37] <abentley> jcastro: yes, we still support CVS.
[20:37] <jcastro> someone asked about git: yes, as I said earlier the only gotcha is we don't support importing projects that use submodules
[20:37] <jcastro> but the bzr team is working on fixing that
[20:38] <jcastro> ok so unless there's any more questions I guess smoke if you got 'em, next class starts in about 20 minutes!
[20:38] <jcastro> or not ... I was last today wasn't I?
[20:38] <abentley> jcastro: Another small thing-- not only does building locally avoid contributing to the heat death of the universe, but it also helps you avoid running out of quota.
[20:38] <jcastro> oh, there's a quota?
[20:38] <jcastro> tell me about it, that sounds sneaky. :)
[20:38] <abentley> jcastro: You have five builds per recipe per distroseries per 24 hours (yes, sliding window).
[20:39] <jcastro> ah ok, so as long as I test before hand and don't spam the system with builds I should be ok?
[20:40] <jcastro> ok so that's it for today, make sure to join us tomorrow
[20:40] <jcastro> here's the schedule! http://people.ubuntu.com/~nhandler/classroom.html
[20:42] <abentley> jcastro: yes.
[20:42] <ClassBot> sinisterstuf asked: can anyone add their pc to the build farm?
[20:42] <jcastro> ooh, time for one more
[20:43] <jcastro> the answer is No.
[20:43] <jcastro> For security reasons we don't allow untrusted machines in the build farm
[20:45] <abentley> The PPA-targetting machines in the build farm are as locked-down as we can manage.  They run virtual machines and can't talk to anything on the net except the buildmaster.
[20:47] <abentley> Since building packages means running arbitrary code, people who contributed their machines to the build farm would be running a grave security risk for themselves.
[21:00] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html