/srv/irclogs.ubuntu.com/2010/09/28/#ubuntu-classroom.txt

=== kdrsx is now known as kuadrosx
Avohey 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:16
jigaAvo, there are IRC logs03:18
AvoAnd would that have all the important info?03:19
jigaeverything is happening on #ubuntu-classroom or #ubuntu-classroom-chat03:19
Avo Ah cool, cool. That's what I'll do then. Thanks!!03:20
jigayou can find logs here: http://irclogs.ubuntu.com/03:20
=== uchobby is now known as uchobby_afk
pragad7hello05:22
=== vorian is now known as v
=== v is now known as theMaster
=== theMaster is now known as v
pragad7join #ubuntu05:35
purveshcan someone tell me how to protect ubuntu wiki pages from editing ?05:37
=== purvesh__ is now known as purvesh
=== purvesh_ is now known as purvesh
jcastro7 minutes until we start!15:53
OskOHello15:59
jcastroHi everyone16:00
jcastrowelcome to day #2 of ubuntu application developer week!16:00
OskOHi!16:00
jcastroI hope everyone has had a good time so far16:00
jcastrook, so from now on please move all discussion to #ubuntu-classroom-chat16:00
jcastroso that the speaker can present in here16:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu App Developer Week - Current Session: From vision to an Ubuntu application in 4 simple steps - Instructors: didrocks
jcastrofirst up today we have Didier Rocks, aka, didrocks16:01
ClassBotLogs 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
jcastro4 steps to an ubuntu application16:01
jcastrodidrocks, ready?16:01
didrocksjcastro: yeah o/16:01
didrocksthanks jcastro!16:01
didrockswelcome everyone :)16:01
didrockscan you raise your hands on #ubuntu-classroom-chat so that I can know how many people we have there?16:02
=== PedoBear is now known as lol_bear
didrocksgood, a lot of people there!16:02
didrockswelcome to the session on "4 steps to develop your application for ubuntu"16:03
didrocksthis 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 ubuntu16:03
didrocksdo you know about Quickly?, please answer in #ubuntu-classroom-chat16:04
didrocks(that will enable me to know what's the audience is :))16:04
didrocksok, some people know about it, others don't :-) this session is really on basics of Quickly, let's start on it16:05
didrocksso, some quick words of presentation first16:05
didrocksmy name is Didier Roche, I'm working in the ubuntu desktop team on updating GNOME and UNE (Ubuntu Netbook Edition)16:05
didrocksI'm maintaining unity, that some of you probably heard of16:05
didrocksalso, as a spare time project with Rick Spencer, I'm hacking on Quickly16:05
didrocksso, what is Quickly?16:06
didrocksQuickly is to bring back fun in development!16:06
didrocksRick, the person who created the concept of Quickly, call it, among other things, an "Application Templating System"16:06
didrocksthe essence of the project is to provide you boiler plate for the kind of program you want to write16:07
didrocksthe boiler plate is the code that you would have to write for every program of a certain type gets generated for you16:07
didrockswe have different boiler plates right now:16:07
didrocksubuntu-application, ubuntu-cli and ubuntu-pygame in lucid and maverick16:07
didrockssome people seem to create new boiler plate, like vala and such16:07
didrocksbut Quickly is also a set of commands16:08
didrocksthe commands are designed to integrate with the Ubuntu Application infrastructure16:08
didrocksthings like bzr, launchpad, PPAs, etc..16:08
didrocksthose are something hard to learn when you just want to develop for fun16:08
didrocksand you have a lot to look at too16:09
didrocksthe commands are what make all that work for you!16:09
didrocksThe moto of Quickly is "Easy and Fun"16:09
didrockswhile I'll answer to the first set of questions, you can install it (not mandatory to follow the session): sudo apt-get install quickly16:09
ClassBotdoktor777 asked: do you know any popular app developed with quickly?16:09
didrockssome applications on ubuntu are using Quickly16:10
didrockslike bughugger, pytask, lernid16:10
didrocks(maybe some of you are using lernid to follow the session btw)16:10
didrocksthere are others apps like photobomb and such that are develop with Quickly16:10
didrocksyou can find them at http://theravingrick.blogspot.com/16:11
didrocksbut Quickly isn't made to create huge applications, it's more for what most of 1 person team will do16:11
didrocksso, it fits most of the needs we can have, I guess16:12
ClassBotKruptein asked: so is quicly a programing language on it self or does it use an other language?16:12
didrocksQuickly is a set of templates and commands16:12
didrocksthat means, the templates contains the code16:12
didrocksI'll discuss about that later on, but the templates I presented before are made of python16:13
didrocksbut there is a incoming vala template16:13
didrocksand theorically template (and commands) can from every languages you want16:13
ClassBothernejj asked: Does quickly help with packaging as well?16:13
didrocksyeah, and this is the goodness :)16:13
didrocksin 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 ppa16:14
didrocksno need to harrass to create the package manually16:14
didrocksor to file the dependencies :)16:14
ClassBotdoktor777 asked: how stable/mature it is?16:14
didrocksQuickly has been launched in may 200916:14
didrocksso, it's more or less one year and half16:15
didrocksit's quite mature, contains a lot of code16:15
didrocksand we handle upgrade and such of your project16:15
ClassBotzinga24 asked: what templates does it deliver? gui-templates?16:15
didrocksso, with Quickly, on ubuntu, you have 3 templates:16:15
didrocksubuntu-application: is a template creating a gui application16:15
didrocks(I'll present it in more extends later on)16:16
didrocksubuntu-cli is for command line application16:16
didrocksand ubuntu-pygame for small and fun games using pygame16:16
didrocksyou can hav some examples on the link pasted before16:16
ClassBotKruptein asked: so can I pack my python programs in quickly to generate the packages only?16:16
didrocksright, and some people did that as far as I know of16:16
didrocksyou just have to create some files like a .quickly file as root with some parameters16:17
didrockswe can help you with that if you jump to #quickly on freenode16:17
ClassBotdoktor777 asked: what do you mean by "and we handle upgrade and such of your project" ?16:17
didrocksfor instance, in Quickly 0.4, we introduced apport support16:17
didrocksand launchpad integration as well you know, the "ask a question/report a bug" in the help menu of default ubuntu application?16:18
didrockswe thought it would be good for application which were created with Quickly 0.2 to get those 2 things on upgrade16:18
didrocksand so, it's optionnaly added to people upgrading16:18
didrocksthat's what I meant by on "upgrade"16:18
didrocksok, no more question in the queue16:19
didrockslet's continue then :)16:19
didrocksso, first, what *is not* Quickly16:19
didrocksQuickly is not an IDE16:19
didrocksbut you can use whatever IDE you want16:19
didrocksit's a command line tool and there is some API for people wanting to bind it to an IDE16:20
didrocksSo, the title of the classroom was "4 steps to create your application"16:20
didrockslet's begin for step 0, before the first one :)16:20
didrocksthink what you want to achieve with your application16:20
didrockstry to not NIH (Not Invented Here) and reinventing the whell16:21
didrockswhy people want to install and then use your futur application instead of existing one?16:21
didrocksso design is the most important step in my opinion :)16:21
didrocksand no rush to step 1 until then!16:22
didrocksstep 1 is creating your application16:22
didrockswhich Quickly, it's fairly easy16:22
didrocks$ quickly create ubuntu-application foo16:22
didrocksthis will create a "foo" ubuntu-application in a "foo" directory16:22
didrocksyou will have all what's needed with an application, like:16:23
didrockspreferences integrations, menus, about box, easter eggs :)16:23
didrocksso, quickly create launch your application and you can see the boiler plate16:23
didrocksof course, you have all internationalization support and some icon/desktop file as well for people wanting to use it16:24
didrocksthe most important part is that there is no dependency on Quickly itself for your application16:24
didrocksall is based on well known technology, but your application is then independent (in other words, Quickly isn't a framework)16:25
didrocksand that's by design16:25
didrocksso, for people running it during the session, you can see in the folder a lot of files have been created for you16:25
didrocksin the ubuntu-application template, you have:16:26
didrocks- python as a language to develop in16:26
didrocks- glade for editing the GUI16:26
didrocks- gedit as default editor (you can override this by exporting the EDITOR variable)16:26
didrocks- pygtk for the toolkit16:26
didrocks- desktopcouch for storing persistent data16:26
didrocks- launchpad integration16:26
didrocksall is chosen for helping you starting with your app16:26
didrocks- (and bzr for revision control)16:27
didrocksthen, if you are confident enough and know what you need, you can remove each block you don't want and replace by yours16:27
didrocksor create your own template even!16:27
didrocksthe idea is really to drive development and help opportunistic developer to know "where to start"16:27
didrocksrather than beeing lost in choices16:27
didrocksfor helping starting development too, we have a complete tutorial:16:27
didrocks$ cd foo/16:27
didrocks$ quickly tutorial16:28
didrocksthis will bring you up the tutorial for the ubuntu-application template16:28
didrocksQuickly has a lot of shell completion goodness16:28
didrocksdepending on where you are, it will suggest the right command on the right time16:29
didrocksso, do not hesitate to press tab tab :)16:29
didrocksalso I heard that an "ubuntu developer manual" is on the way :)16:29
didrocksthis one will use Quickly as well and will be a good documentation reference16:29
didrockslet's see to some questions before moving to step 2 :)16:30
ClassBotdoktor777 asked: and how do you upgrade, there's a command for that?16:30
didrocks$ quickly upgrade16:30
didrocksbut it's launched for your each time Quickly is upgraded on your system and your application isn't transitionned16:30
didrocksso nothing to worry about :)16:30
ClassBotgaberlunzie44 asked: does quickly templates accept user input to customise/personalise apps?16:31
didrockssure, once the application created, it's yours!16:31
didrocksso, as I said, you can customize every part of it16:31
didrocksand there is no dep on Quickly, you can use qt instead of gtk for instance :)16:31
ClassBotblackrock asked: Can I use git instead of bzr?16:31
didrocksah, the traditional questions :)16:31
didrockswell, git isn't integrated to launchpad as well as bzr16:32
didrocksand a lot of people are telling "I want to use git with Quickly"16:32
didrockswell, you can create a ubuntu-git-application template :)16:32
didrocksand change the commands to use git16:32
didrocksbut you will surely loose a lot of integration I'll explain afterwards16:32
didrocksand ideally, if you only use Quickly, you don't need to know which versionning system is used for you16:33
didrocks(for instance, you don't bzr commit, but you quickly save)16:33
ClassBotdoktor777 asked: hmm, I'd prefer to launch a command myself, can the auto-upgrade be easily disabled?16:33
didrocksno, but you can create a template which doesn't have upgrade16:34
didrockswe changed the format sometimes and we bzr commit before and after the upgrade16:34
didrocksso you still can revert16:34
didrocksok, no more question, let's move on step 2 then!16:34
didrocksonce you know what you want to do16:34
didrocksand how to do it (the tutorial), with some base (the app you created), it's time to personalize your application16:35
didrocksthis can be done with:16:35
didrocks$ quickly design16:35
didrocksthis commands fires up glade to edit your user interface16:36
didrocksglade is a tool for building gtk-based UI16:36
didrocks(old screenshot of it: http://glade.gnome.org/images/glade-main-page.png)16:36
didrocksso, you can there add widgets16:36
didrockschange your window size16:36
didrockslabels and such16:36
didrocksyou choose your components and draw them on the application area16:36
didrocksthe quickly tutorial explains the basic of this16:36
didrocksin fact, Glade is a UI editing tool, that creates the XML you need to describe your windows and widgets16:37
didrocksdon't worry because the quickly template totally handles keeping the code and the XML hooked up16:37
didrocksif others templates, like if kubuntu comes, we assume it won't use glade, obviously :)16:37
didrockshence the "design" command to launch it and not "glade"16:37
didrocksso here are some tips for using Glade if you are new to Glade16:37
didrocksfirst, adding widgets works like a fill tool16:38
didrocksyou click the widget you want in the toolbox, and then click where you want it to be on the window16:38
didrocksthe widgets will then fill the space alloted to it16:38
didrocksto layout the form, you use HBoxes and VBoxes16:38
didrocksan HBox handles Horizontal layout, and a VBox handles vertical16:38
didrocksso you will find yourself putting lots of boxes within boxes16:38
didrockswhen 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:38
didrocksboxes can be hard to select in the window, for example16:39
didrocksif a widget is in a box, use the position property in the "Property editor" window in the "packing" tab to change the order16:39
didrocksyou can also add new dialogs with Quickly:16:39
didrocks1. close glade16:39
didrocks2. run: quickly add dialog <dialog_name>16:39
didrocks3. quickly design16:39
didrocksand you will see the new dialog opened for you in glade :)16:39
didrocksthen, once you have done that, you want to create some kind to use your new widgets and dialogs16:40
didrocksfor that:16:40
didrocksquickly edit16:40
didrocksit will fire up gedit in the ubuntu-application template (and derivatives)16:40
didrocksit will configure it to use spaces instead of tabs and spaces to behave like tabs16:41
didrocksit opens every files you need to work with16:41
didrocksso, that's where the hard work should take place :)16:41
didrocksbut don't take that too hard and test regularly which will be our step 3 after I answer some questions16:41
didrocksas told previously, you can take some snapshot of your code with:16:42
didrocks$ quickly save16:42
didrocksor even:16:42
didrocks$ quickly save implement a fantastic dialog to make cow to moooo16:42
didrocksif you want to give a reason of what you have done :)16:42
ClassBotblackrock asked: How do you create new template (like ubuntu-cli, ubuntu-application)?16:42
didrocksreally easy16:42
didrocksubuntu-cli and ubuntu-pygame are basically 0 line of code!16:43
didrocksyeah, 0 :)16:43
didrocksthe commands are the same that in ubuntu-application16:43
didrockswe just ship a different boiler plate16:43
didrocksfor that, Quickly support inheritance16:43
didrockswhich means "imports commands from"16:43
didrocksso, ubuntu-cli imports all commands from ubuntu-application16:43
didrocksif you want to create your own template, you can start by an existing one16:44
didrockslike16:44
didrocks$ quickly quickly ubuntu-application my-new-template16:44
didrocksand it will create my-new-template in ~/quickly-templates, importing by default all commands from ubuntu-application16:44
didrocksyou can also create your own template in /quickly-templates16:44
didrocks~/quickly-templates,16:44
didrocksI've documented that in my blog, which is down right now as I'm moving, sorry :)16:45
didrocksbut for further reference:16:45
didrockshttp://blog.didrocks.fr16:45
didrocks(once up again)16:45
ClassBotozalexo asked: Why XML? And why not YAML?16:45
didrocksask that to glade people :)16:45
ClassBotKruptein 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 now16:46
didrockswell, let's see the packaging part and we will discuss that :)16:46
didrocksso, quickly on step 3 :)16:46
didrockswhich is testing!16:46
didrocksto run your application from trunk16:46
didrocksquickly run16:46
didrocksthis will enables your, taking all the right paths for you, to test it extensivily16:46
didrocksif you want some people to test it, you can share a small first package with them16:47
didrocksquickly share16:47
didrocksit will upload to your ppa a packaged snapshot of your application16:47
didrocksand so, people can test16:47
didrocksquickly debug16:47
didrocksis for debugging your application in winpdb16:47
didrocksok, so, now, the step your are all expected is release!16:47
didrockswhen you really want everyone to see your apps in a shiny stable version!16:48
didrockswe took days and days to think about the name and the command to use :)16:48
didrocksand finally, we ended up with:16:48
didrocksquickly release16:48
didrocks:)16:48
didrocksthis commands does a lot for you16:48
didrocksit's packaging your application, changing some path for you to use system libraries (if present)16:49
didrocksit detects all the dependencies needed16:49
didrocksand put that into the package16:49
didrocksit will create a gpg key for you if you don't have one on launchpad16:49
didrockssame for ssh key16:49
didrocksit's pushing your code in the trunk in launchpad, tagging it as stable16:49
didrocksalso, it detects all the ppa you have access too and push to it16:50
didrocksalso, it collects all messages you put in quickly save, and create an annoucement with that16:50
didrockspublish through launchpad rss feed16:50
didrocksalso, it takes your upstream tarball, sign it with the gpg key, create the launchpad milestone and attaching everything for you16:50
didrocksand finally, it exports the translations for you to launchpad so that people can translate your application16: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
didrocksthe release command just use the ubuntu way of creating version16:51
didrockslike YY.MM16:52
didrocksso, if you release this month16:52
didrocksit will be 10.1016:52
didrocksoupss16:52
didrocks10.0916:52
didrocks(living in futur, it seems :))16:52
didrocksif you release again tomorrow, it will be 10.09.116:52
didrocksand so on…16:52
didrocksok, seeing a lot of questions, let's go back to them16:52
ClassBotozalexo asked: can I just create a deb package without putting it to launchpad?16:53
didrocksand the answer is… yes!16:53
didrocksquickly package :)16:53
didrocksthis will create a .deb that you can install locally16:53
ClassBotgabri_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
didrockscurrent templates are made of python16:53
didrocksbut we just count on people to extend and create new templates!16:54
didrocksthe core (the part common to templates) is in python, but templates and commands can be in whatever language of your wish16:54
ClassBotlouis-nb asked: why is postfix a dependency?16:54
didrocksahah, good one!16:54
didrocks(this is in Quickly itself, not in your applications)16:55
didrockswell, Quickly is pulling a lot of developers tools for you16:55
didrocksto be able to create a package and such16:55
didrocksone of them in ubuntu-dev-tools16:55
didrockswhich has a lot of deps16:55
didrocksand one of those deps (devscripts if I remember correctly) is depending on postfix16:55
didrocksthat's something I want to fix16:55
didrockspatch devscripts in ubuntu and debian16:56
didrocksto make postfix optional16:56
didrocksbut it's taking time!16:56
didrocksI've already had a look some months ago16:56
didrocksbut being sidetrack :)16:56
ClassBotKruptein 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 eachother16:56
didrocksby default, it's picking the older one16:56
didrocksbut you have commands to configure that16:57
didrocksalready a complicated command name16:57
didrocksquickly configure <what to configure>16:57
didrocksso16:57
didrocksquickly configure ppa my-ppa-name16:57
didrocks(use tab completion, you will see what you can configure with)16:57
didrocksquickly configure <tab><tab>16:57
didrocksin bahs16:57
didrocksbash*16:57
didrocksalso, think about the help on commands16:58
didrocksquickly help <command_name>16:58
didrockswill bring you the correct command help depending on the context16:58
didrocksto see you command you can have help…16:58
didrocksshell completion again! quickly help <tab><tab>16:58
didrocksok, let's quickly wrapping up16:58
didrocksso, for references:16:59
didrockshttps://wiki.ubuntu.com/Quickly#Other Resources16:59
didrocksyou can see we got some press review, this is not exhaustive16:59
didrockswe also welcome everyone on #quickly on freenode :)16:59
didrocksand welcome contributions, a lot of people are contributing to quickly as well as in quickly-widgets17:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu App Developer Week - Current Session: SHOWCASE: Pytask - Instructors: nisshh
didrocks(the latter is definitively a project you should look at)17:00
didrocksyeah, just in time!17:00
ClassBotLogs 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
didrocksthanks everyone17:00
Pendulumthanks didrocks!17:01
jcastronisshh, you're up!17:01
nisshhyep17:01
nisshhok, hello everyone!17:01
nisshhmy name is Ryan Macnish, and this session is about my app called Pytask17:01
nisshhwhich is created and maintained with Quickly17:02
nisshhcan i get a show of hands to see who is here right now?17:02
nisshhin -chat of course :)17:02
nisshhok, looks like a fair few17:02
nisshhright17:03
nisshhi created Pytask way back in the middle of last year17:03
nisshhi wanted to get going with Python and GTK back then, and Pytask was the first thing that came into my head17:04
nisshhlink to Pytask on launchpad: https://launchpad.net/pytask17:04
nisshhback when i first started the project, i was writing it in pure GTK17:05
nisshhsorry pure pyGTK17:05
ClassBotTobiS asked: Do you have a website of your project with some information?17:06
nisshhsee my link to the project page on launchpad above17:06
nisshhsometime later that year, i discovered glade, so i started using that to develop the GUI17:07
nisshhfastforward to about march this year17:07
nisshhand thats when i discovered the hidden gem that was Quickly17:07
nisshhbut anyway, thats enough story :)17:08
nisshhbasically, Pytask uses a combination of Quickly, Quickly-Widgets (which ill talk about in a sec) and CouchDB17:09
nisshhCurrently Pytask is such a simple application17:09
nisshhit consists of just the Quickly generated code, plus less than 100 lines of code that i added in17:10
nisshhthats right, LESS than 100 lines of code17:10
nisshhit was possible to do this because i used Quickly and Quickly-Widgets17:11
nisshhQuickly-Widgets is basically a convenience17:12
nisshhit makes it much, much easier to create and modify certain widgets17:12
nisshhsuch as Treeviews, Couchgrids (which i will talk about in a sec), and popup yes/no/ok dialogs17:13
nisshhbefore i continue are there any more questions?17:14
nisshhno?17:14
nisshhok17:14
nisshhmoving on, now ill talk about Couchgrid :)17:15
nisshhCouchgrid in quickly-widgets is really awesome17:15
nisshhwith Pytask, it basically allowed me to do 3 things very, very easily:17:16
nisshh1) create and show an editable treeview17:16
nisshh2) easily modify the contents and arrangement of that treeview17:16
nisshh3) sync the tasks in the treeview with Ubuntu One17:17
nisshhoh17:17
nisshhfor those of you who dont know, Pytask is a todo list management app17:17
nisshhsimilar to Getting Things Gnome17:17
nisshhnumber 3 is especially cool, since it allows me to sync tasks with Ubuntu One, with just a few lines of code :)17:19
ClassBotgaberlunzie44 asked: what quickly commands are used for widgets and db connectivity?17:19
nisshhvery good question17:19
nisshhfor the db connectivity, there are no quickly commands17:19
nisshhi simply had to import quickly widgets into my Pytask code17:20
nisshhand create the db itself, plus some keys17:20
nisshhcurrently, the only release of Pytask that can Sync with Ubuntu One is 10.06.117:21
nisshh(the latest one)17:21
nisshhthere is one little quirk though17:22
nisshhoriginally, Rick Spencer named quickly-widgets Quidgets17:23
nisshhso on launchpad, the project is Quidgets17:23
nisshhbut in lucid and maverick17:23
nisshhthe package is called quickly-widgets17:23
nisshhas 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
nisshhnow, CouchDB :)17:25
nisshhCouchgrid uses CouchDB to sync with Ubuntu one17:26
nisshhand Couchgrid is included in quickly-widgets17:26
nisshhcouchDB makes it super simple to create, delete, edit, modify, etc17:27
nisshhall your databases and database entries17:28
ClassBotgaberlunzie44 asked: link for quickly-widgets? (just to be complete)17:28
nisshhhttps://launchpad.net/quidgets17:28
nisshhthats quickly-widgets on launchpad17:28
nisshhmoving on17:29
nisshhnow, one awesome feature that i am working on for one of the upcoming releases of Pytask17:30
nisshhis the ability to use tasks interchangeably between Pytask and Getting Things Gnome17:30
nisshhthis is made possible17:30
nisshhbecause Getting Things Gnome has support for multiple backends17:31
nisshhone of which is CouchDB17:31
nisshh(the same one as Pytask uses)17:31
nisshhso what will eventually be possible17:32
nisshhis that you will be able to create your tasks in say, Getting Things Gnome, while using the CouchDB backend of course17:32
nisshhthen if you decide you like Pytask better, simply load it up, and force Pytask to use the same database as Getting Things Gnome17:33
nisshhthis isnt currently possible, even in trunk17:33
nisshhbut it will be very soon17:33
nisshhthe next version of Pytask will, feature Indicator support17:34
nisshhwhich will just make it hideable on the desktop17:34
nisshhbefore i go any further, do we have any more questions?17:35
nisshhok17:35
nisshhmoving on17:35
nisshhthe latest release of Pytask is always available in my PPA here: https://launchpad.net/~nisshh/+archive/pytask-releases17:37
nisshhwhich currently wont work for maverick users17:37
nisshhbut is good to go for lucid17:37
ClassBotgaberlunzie44 asked: any plan for a graph/chart view, like a gantt?17:37
nisshhno, not currently17:38
nisshhwhen i created Pytask, i planned it to be more on the simple side17:38
nisshhbut, as time goes on, i may add features like that17:39
nisshhthat reminds me17:39
nisshhanother feature i am very excited to be adding in soon17:39
nisshhis launchpadlib support17:39
nisshhwhats this you ask?17:40
nisshhlaunchpadlib is a Python library that allows you to fetch objects from launchpad17:40
nisshhthings like bug titles, project names, etc17:41
nisshhyou can even write new data to launchpad with it if you wish17:41
nisshhanyway17:41
nisshhwhat i want to do is enable Pytask to fetch data from launchpad so it can be included in tasks17:42
nisshhfor example:17:42
nisshhsay i wanted to create a task reminding me to fix a certain bug in one of my projects on launchpad17:42
nisshhi could either add the information manually (the bug number, title, and project name)17:43
nisshhOR17:43
nisshhi could do it the cool way17:43
nisshhand use launchpadlib to quickly fetch the data from launchpad (anonymously, for those of you worried about privacy)17:44
nisshhand have Pytask automatically add it to the task in question17:44
nisshhsounds cool huh?17:44
nisshhany questions about that before i move on>17:45
nisshhok17:45
nisshhmoving on17:45
ClassBotgaberlunzie44 asked: what about sharing? thru launchpad?17:46
nisshhthis, is interesting17:46
nisshhif its what i think it is that your refferring to17:46
nisshhsharing tasks through launchpad would not work really17:47
nisshhalthough, im not sure how that would benefit anyway17:48
nisshhok17:48
ClassBothackerswami asked: Couldn't sharing work via Ubuntu one support?17:49
nisshhthats exactly what Pytask already does17:49
nisshhPytask saves tasks into a CouchDB database17:49
nisshhwhich then automatically get synced through Ubuntu One17:50
nisshhto any other computers connected to the same Ubuntu One account17:50
nisshhthat is why i love Couchgrid so much :)17:51
nisshhalso, after i push out the next release, ill be working with some people on the Ubuntu Desktop team17:51
nisshhto get Pytask into the official repositories17:52
nisshhfor the uninitiated, that means you will be able to install it from the software centre :)17:52
ClassBotand471_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
nisshhwow17:53
nisshhyou guys ask good questions :)17:53
nisshhwell, i certainly don't have any regrets17:54
nisshhlearning to program on Ubuntu and learning the tools of the trade, have taught me a lot17:54
nisshhit's been an absolute joy so far :)17:54
nisshhone thing i feel i should have done though17:55
nisshhis started using Quickly sooner17:55
nisshhit would have made my life much easier back then17:55
nisshhok, almost out of time onw17:56
nisshhnow*17:56
nisshhare there any last minute questions?17:56
ClassBotapachelogger asked: does quickly include unicorns?17:57
nisshhsilly question17:57
nisshhbut, yes, quickly includes unicorns of awesomeness :)17:58
nisshhok, to wrap up17:58
nisshhfeel free to get in touch with me in #quickly on freenode17:59
nisshhim nearly always there17:59
ClassBotSilentRock asked: how can i get pytask sir?17:59
nisshhmy PPA18:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu App Developer Week - Current Session: Unicorn sparkles with Qt development - Instructors: apachelogger
ClassBotLogs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html following the conclusion of the session.18:00
apacheloggergood morning everyone18:01
apacheloggerwhile quickly comes with unicorn awesomeness Qt features unicorn sparkles and I hope you are ready for that :D18:01
apacheloggerI'd like to welcome everyone to a (rather short) journey through the wonders and beauties of Qt development ... yay18:02
apacheloggerfirst off let me make clear that by no means I intent to teach you Qt in this hour of fun18:03
apacheloggerinstead 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 Qt18:03
apacheloggerbefore 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
apacheloggerYou can get it from:18:04
apacheloggerhttp://qt.nokia.com/downloads/sdk-linux-x11-32bit-cpp18:04
apacheloggeror for 64bit:18:04
apacheloggerhttp://qt.nokia.com/downloads/sdk-linux-x11-64bit-cpp18:04
apacheloggerplease 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 not18:05
apacheloggershould 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-xine18: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:05
apacheloggerIN ANY CASE please make sure the package build-essential is installed18:06
apacheloggernow then18:06
apacheloggerlet me start by answering the question that probably haunts you already....18:06
apachelogger"What is this Qt that due is talking about?"18:06
apachelogger(yes I can read minds :P)18:07
apacheloggerQt is a cross-platform application development framework for C++.18:07
apacheloggerthat makes it totally clear, right? ;)18:07
apacheloggerQt 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 sort18:08
ClassBotdoktor777 asked: does it make sense to develop in Qt for Ubuntu (which is based on gtk)?18:08
apacheloggerYes it does18:08
apacheloggerAmong other things, Qt features very powerful integration into GTK and GNOME.18:09
apacheloggerSo if you develop something in Qt it will integrate well on Windows and OSX and KDE *AND* GNOME18:09
apacheloggerAlso Qt is a very powerful framework with lots and lots of functionality...., so ;)18:09
ClassBotCaagalar asked: Is that SDK come from QT Creator from ubuntu repositories?18:10
apacheloggerThe SDK is a self-contained package of all Qt components (that includes the regular development tools) and Qt Creator.18:11
apacheloggerso basically evyerthing you will ever want18:11
apacheloggerBut let us continue on me informing you :D18:11
apacheloggerSomething important to note is that Qt, contrairy to what some people believe, is not a graphics toolkit!!!!!!elven*star*18:12
apacheloggerIt certainly features a lot of graphics technology that helps with creating graphical applications, but it is not limited to that.18:12
apacheloggerIn particular Qt is made up of many modules and you decide which modules you want to use.18:13
apacheloggerSome important ones have names like QtCore QtGui QtWebKit and QtDBus18:13
apacheloggerNow say you create an appliation using only QtCore you do not need a graphics stack at all18:14
apacheloggerfor example the IRC client Quassel can use a server application running on a proper server without graphics.18:14
apacheloggerthis is possible because the quassel server is written only using QtCore and QtNetwork (which both do not do any graphics magic)18:14
ClassBotSilentRock asked: why would i choose QT?18:15
apacheloggerI hope to have answered that implicitly by the end of the talk, if not feel free to ask it again :)18:15
apacheloggerSo, 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
apacheloggerWell, lets say operating systems...18:16
apacheloggerQt 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
apacheloggerQt is by design made cross-platform.18:17
apacheloggerTo be precise the following operating systems are officilly supported:18:17
apacheloggerLinux18:17
apacheloggerWindows18:17
apacheloggerWindows CE18:17
apacheloggerMac OS X18:17
apacheloggerMeeGo (i.e. Maemo as seen on the Nokia N900)18:18
apacheloggerand Symbian18:18
apacheloggerOn top of that there are partially experimental third part portations available for:18:18
apacheloggerOpenSolaris18:18
apachelogger*BSD18:18
apacheloggerHaiku18:18
apacheloggerOS/218:18
apacheloggerAndroid18:18
apacheloggeriPhone18:18
apacheloggerAmazon's Kindle18:18
apacheloggerand probably many more18:18
apacheloggerI did not convince you yet?18:19
apacheloggerWell then.18:19
apacheloggerI said that Qt is a framework for C++18:19
apacheloggerthat is true, but also a bit limited...18:19
apacheloggerIn Qt 4.7 you can also officially use JavaScript (or rather ECMAScript) ... that would then be called QML18:20
apacheloggerBUT18:20
apacheloggeradditionally to that there are some language bindings available18:20
apacheloggerto my knowledge there are bindings for:18:20
apacheloggerRuby18:20
apacheloggerPython18:20
apacheloggerC#18:20
apacheloggerJava18:20
apacheloggerAda18:20
apacheloggerLua18:20
apacheloggerCommon Lisp18:20
apacheloggerPHP (yes the web PHP)18:20
apacheloggerR18:20
apachelogger...18:20
ClassBotdoktor777 asked: and what if I use something like pyQt? the portability gets worse?18:21
apacheloggerwell, Qt itself is still portable the bindings however might not be... I am quite certain that pyQt however runs on all 3 major platforms though18:21
ClassBotSilentRock asked: what about D?18:22
apacheloggerI don't think there are bindings for D, maybe someone wants to do them? ;)18:22
apacheloggerNow for some change, let us watch a video together, shall we?18:22
apacheloggerA very nice intro on Qt http://www.youtube.com/watch?v=p0xiKBEx8RA18:23
ClassBotrooliganLernid asked: but where are the disadventages?18:27
apacheloggerYou might be asking the wrong person ;)18:27
apacheloggerWell, one obvious disadvantage is that of course a Qt application has a bigger footprint than a standard C++ one18:27
apacheloggerSo using it for a hello world application that only uses QtCore and outputs to the console would not make sense ;)18:28
apacheloggerOther than that I could not really think of disadvantages I personally experienced18:28
apacheloggerWell then.18:28
apacheloggerI hope everyone has finished watching the video.18:28
apacheloggerAnd we already sort of ended up at the question "What can you really do with Qt?"18:29
apacheloggerLet me put it this way: there is almost nothing you cannot do with it...18:29
apacheloggerAs 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:30
apacheloggerthose 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
apacheloggerIt 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
apacheloggerhttp://qt.nokia.com/qt-in-use/ambassadors/showcase18:31
apacheloggerWith Qt you can not simply create dull graphical applications, you can create beauty.18:32
apacheloggerAnd please keep in mind, this beauty is cross-platform.18:32
apacheloggerAre we finished with downloading the SDK yet?18:33
ClassBotSilentRock 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:33
apacheloggerThat is a difficult one ...18:34
apacheloggerI 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
apacheloggerbuilding up on them18:35
apacheloggerIn essence that is what KDE does.18:35
apacheloggerKDE 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
apacheloggerBut since only 30 mins are left we better continue ;)18:36
apacheloggerWith some coding18:36
apachelogger\o/18:36
apacheloggeryay18:36
apacheloggerhooray18:36
apachelogger\o/18:36
apacheloggerthose that do not want to take part right now, can continue watching videos18:36
apacheloggere.g.18:36
apacheloggerQt @ Embedded World 2010: http://www.youtube.com/watch?v=hq34gppsnzw18:36
apacheloggerQt Everywhere on All Platforms: http://www.youtube.com/watch?v=yh5Rt3cfuoQ18:36
apacheloggerOr generally stuff from QtStudios on YouTube. One gets a very good impression of Qt from those videos.18:37
apacheloggerSO.18:37
apacheloggerAfter installing the SDK you should have Qt Creator opened18:37
apacheloggerthat is Qt's own IDE18:37
apacheloggerWe will use it to swiftly create an application that I like to calll Cappuccino18:37
apacheloggersimply put: we are going to make a video player \o/18:38
apacheloggerOn Qt creator ....18:38
apacheloggerin the menubar....18:38
apacheloggerFile -> new project18:38
apacheloggerWe will make a Qt C++ Project18:39
apacheloggerin specific a Qt Gui Application18:39
apacheloggerthat should be default already18:39
apacheloggerclick choose18:39
apacheloggerthen give it our cool name and select a path where to place the source18:39
apacheloggernext -> next -> finish18:39
apacheloggerwe now have a very basic application already if you hit CTRL+R you should get a plain window already18:40
apachelogger(instead of CTRL+R you can also press the green play icon thingy)18:40
apacheloggerin qt creator you should have a very strange view right now18:41
apacheloggerwith loads of elements and a plain window in the middle18:41
apacheloggerthat is our designer18:41
apacheloggerhere we can compose simple things using drag and drop18:41
apacheloggerso lets do that18:41
apacheloggerin the bar on the left hand side filter for "widget"18:41
apacheloggeran drag a "Widget" onto our window18:42
apacheloggernext filter for "push"18:42
apacheloggerand drag a push button below the widget in our window18:42
apacheloggernow right click on empty bakckground space of the window and choose Lay out -> lay out vertically18:43
apacheloggerthat should have brought things into order already18:43
apacheloggernow lets tweak around a bit18:43
apacheloggerfirst click on the button18:43
apacheloggeron 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 widget18:44
apacheloggerso lets change the button around a bit18:44
apacheloggerfilter for 'flat' (or scroll to the very bottom) and check the checkbox there18:45
apacheloggernow filter for 'text' and remove the text18:45
apacheloggernow filter for 'icon' and18:45
apacheloggerwell18:45
apacheloggerlet me get a URL real quick18:45
apacheloggerhttp://people.ubuntu.com/~apachelogger/uadw/09.10/data/play.png18:45
apacheloggerdownload that and place it somewhere you can find it18:46
apacheloggere.g. your home directory18:46
apacheloggernow back in qt creator18:46
apacheloggerif you select the icon property there is an arrow next to the value field, click that arrow and choose from file18:46
apacheloggerselect the play.png18:47
apacheloggeralso while we have a filter on 'icon' set the icon size to 48x4818:47
apacheloggernow lets do something to the widget18:47
apacheloggerright click on the widget and choose "promote to"18:48
apacheloggerthat is somehwere in the middle of the context menu18:48
apacheloggerat the bottom of the dialog we'll add a new class18:48
apacheloggerclass name: Phonon::VideoWidget18:48
apacheloggerheader file: Phonon/VideoWidget18:48
apachelogger[x] global include18:48
apacheloggerthen clik 'add' and finally 'promote'18:49
apacheloggersave and close the file (using the x in the upper right corner)18:49
apacheloggeryou should now find a projects overview on the left hand side18:49
apacheloggerthere open the Cappuccino.pro file18:49
apacheloggerthere you should find the following line:18:50
apacheloggerQT       += core gui18:50
apacheloggerjust append 'phonon' to that18:50
apacheloggerQT       += core gui phonon18:50
apacheloggerlike that18:50
apacheloggersave and close again18:50
apacheloggerin the sources folder of the projects overview you will find a mainwindow.cpp file18:50
apacheloggerthere we will now create the application logic of our player18:51
apacheloggerfirst add a couple of includes at the top18:51
apachelogger#include <Phonon/AudioOutput>18:51
apachelogger#include <Phonon/MediaObject>18:51
apachelogger#include <Phonon/MediaSource>18:51
apacheloggernow within the curly brackets of MainWindow::MainWindow we do everything that follows18:51
apacheloggerfirst we create a phonon media object18:51
apacheloggerphonon is the multimedia magic of Qt and a media object is the thing that will hold a video file or an audio file18:52
apacheloggerPhonon::MediaObject *media = new Phonon::MediaObject(this);18:52
apacheloggeras easy as that ;)18:52
apacheloggernow we attach this media to our widget in the window18:52
apacheloggerPhonon::createPath(media, ui->widget);18:52
apacheloggerwe would also like some audio18:52
apacheloggerso we create an audio output18:52
apacheloggerPhonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::VideoCategory, this);18:52
apacheloggerand also attach our media to that output18:53
apacheloggerPhonon::createPath(media, audioOutput);18:53
apacheloggerfinally we make our button invoke the playback18:53
apacheloggerconnect(ui->pushButton, SIGNAL(clicked()), media, SLOT(play()));18:53
apacheloggernow18:53
apacheloggerif you are still following, because I am quite fast because we were chit chatting too much earlier :P....18:54
apacheloggerif you hit CTRL+R (or that green play icon thingy) you should get a window18:54
apacheloggerand if you hit the play button it should start playback18:54
apacheloggeror not... ;)18:54
apacheloggersomething we forgot was to define a media source18:54
apacheloggeri.e. the actual thing that we want to play back18:55
apacheloggerso just add this18:55
apacheloggermedia->setCurrentSource(Phonon::MediaSource("http://people.ubuntu.com/~apachelogger/uadw/09.10/humanity.ogv"));18:55
apacheloggerthen try CTRL+R again and hit the play button again and now you should get a video18:55
apacheloggerof course now the button is useless after you hit i once, so we will just hide it once hit18:56
apacheloggerconnect(ui->pushButton, SIGNAL(clicked()), ui->pushButton, SLOT(hide()));18:56
apacheloggernow we have a pretty decent video player18:56
apacheloggerin case you got stuck: http://people.ubuntu.com/~apachelogger/uadw/09.10/Cappuccino/18:57
apacheloggerhere is my source18:57
apacheloggeralso you can find me in #kubuntu-devel where we can continue making it work for you too18:57
apacheloggerWhere you can and should go now...18:57
apacheloggerTake a look at the getting started guide18:57
apacheloggerhttp://doc.qt.nokia.com/latest/gettingstarted.html18:57
apacheloggerand the examples  http://doc.qt.nokia.com/latest/all-examples.html18:58
apacheloggeryour Welcome page of Qt Creator already contains all examples so you can easily try them and explore the real power of Qt18:58
apacheloggersome Examples I can recommend:18:58
apachelogger Animated Frameworks -> Animated Tiles18:58
apachelogger Graphics View -> Elastic Nodes18:58
apachelogger Main Windows -> Application18:58
apachelogger Items View -> Puzzle18:58
apacheloggerAnd last but not least join #qt ;)18:58
apacheloggerAny question that I can answer in one minue?18:59
apachelogger*minute18:59
apacheloggerWell.19:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu App Developer Week - Current Session: Using the indicator stack in your Python application - Instructors: sense
apacheloggerThank you everyone, you were an amazing  audience19:00
ClassBotLogs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html following the conclusion of the session.19:00
sensethanks to apachelogger for a great and very filled session and welcome to everyone attending this session on Indicators!19:01
senseThis 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 questions19:02
senseThe first example is code of an Application Indicator, the second of an application registered in the Me Menu.19:03
senseI 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
senseThe two code examples can be found at <http://people.ubuntu.com/~sense/uadw/>, the .desktop file is for the Messaging Menu.19:04
senseFirst, 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
senseEveryone's got the file?19:05
senseSkip past the license to read the first line of interest:19:06
senseimport appindicator19:06
senseThis line of Python code tells we want to use the Application Indicator library.19:06
senseIf you don't have the package 'python-appindicator' installed you want to install it before testing this example/19:06
senseSkipping 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:07
senseThis is the most important call we make: here we register the application with the Application Indicator 'server'.19:08
senseThe 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:08
senseThe second argument, 'indicator-messages' is actually the icon name.19:09
senseThe third argument is the category of the Application Indicator.19:09
senseThere are five different categories:19:10
senseAPP_INDICATOR_CATEGORY_APPLICATION_STATUS19:10
senseAPP_INDICATOR_CATEGORY_COMMUNICATIONS19:10
senseAPP_INDICATOR_CATEGORY_SYSTEM_SERVICE19:10
senseAPP_INDICATOR_CATEGORY_HARDWARE19:10
senseAPP_INDICATOR_CATEGORY_OTHER19:10
senseIn Python you call them differently:19:10
senseappindicator.CATEGORY_APPLICATION_STATUS19:10
senseappindicator.CATEGORY_COMMUNICATIONS19:10
senseappindicator.CATEGORY_SYSTEM_SERVICE19:10
senseappindicator.CATEGORY_HARDWARE19:10
senseappindicator.CATEGORY_OTHER19:10
senseThe 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:12
senseIn 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
ClassBotozalexo asked: How can I check that my application name (first parameter) is unique at this time?19:13
senseozalexo: 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:15
senseThe 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:16
senseThe 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
senseThe 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:17
senseYou can use that status when you want to grab the attention of the user.19:18
senseappindicator.STATUS_PASSIVE and appindicator.STATUS_ATTENTION are the Python names of the other two statuses.19:18
senseThe 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:19
senseIn our case, the line of code to do that is:19:20
sense    ind.set_menu(menu)19:20
senseThis is a short overview of the Application Indicator code example. Are there any questions so far?19:20
senseAlright then!19:22
senseLets take a look at the Python code that registers an application in the Messaging Menu!19:22
senseYou 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:23
senseIf 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
senseHere we need to import the libindicate library:19:24
senseimport indicate19:24
senseAfter 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
sensemm_server = indicate.indicate_server_ref_default()19:25
sensemm_server.set_type("message.mail")19:25
sensemm_server.set_desktop_file(os.path.join(os.getcwd(), "example.desktop"))19:25
sensemm_server.connect("server-display", server_activated)19:25
senseThe 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
senseThe second line sets the type: in our case it is a 'mail' application.19:26
sensePlease refer to <https://wiki.ubuntu.com/MessagingMenu> for an overview of the different types.19:28
senseHere also comes the note on the Sound Menu:19:28
senseActually, 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:28
senseBut 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
senseThis 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:29
senseOf 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
senseBack to the four lines I pasted into the chat.19:30
senseThe third line of those four is also important, it is actually a required step.19:31
senseHere 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:31
senseThe 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
senseAm I understandable?19:32
senseIn 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:33
senseYou 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
sensehttp://people.ubuntu.com/~sense/uadw/messmenu-example.py19:35
sense    box = indicate.Indicator()19:35
sensePlease note that in order for a subitem to stay around you need to keep a reference.19:36
senseThe 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" % i19:37
sense    box.connect("user-display", mailbox_activated)19:37
senseWe 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:38
senseChat clients can use other properties when they want to show the time since someone e.g. mentioned your name in a conversation.19:39
senseThe last line in the pasted code connects again a callback function, which is executed when the user clicks the subitem.19:39
senseYou have to call     box.show() on the subitems to make them be displayed.19:40
senseThe same is true of the main item: mm_server.show()19:40
senseAre there questions about what I previously said?19:41
senseActually, mm_server.show() is not required.19:41
senseYou just need to make sure you let the subitems show, by calling the show() function on them.19:41
senseAny questions about what I've said so far?19:42
ClassBotozalexo asked: Is it possible to use any own icons in the menus?19:42
senseozalexo: Good question! I forgot to mention that the Messaging Menu sets the icon using the desktop file provided to it.19:43
senseIn the file 'example.desktop' you see the following line:19:43
senseIcon=applications-email-panel19:43
senseThe Messaging Menu reads that line and uses the applications-email-panel icon.19:44
senseIs there anyone reading who is using an indicator in his or her application?19:46
senseAny questions about that? What do you think of the technology?19:46
ClassBotjiga asked: is there a simple way to do the baloon notifications too?19:47
sensejiga: 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:48
senseLet me show you a few lines of code to help you along.19:49
sensejiga: I think that this is a reasonable example: <http://ubuntuforums.org/showthread.php?t=926797>19:49
senseGenerally, you need pynotify19:50
ClassBotozalexo asked: Is it possible to implement smth like Chrome's menu?19:50
senseozalexo: 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 th19:52
sensee 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:52
ClassBotrooliganLernid asked: How to change the icon in the first example? There is no .desktop file. So what to do?19:53
senserooliganLernid: 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
senseIn this case the icon is 'indicator-messages'19:54
senseYou can also set a special attention icon, which is shown when you set the status to appindicator.STATUS_ATTENTION19:54
ClassBotrooliganLernid asked: So just edit it to "/home/user/blah"?19:55
senserooliganLernid: You cannot provide a direct path to an icon, but in the regular constructor you give the icon name.19:55
senseThe icon is then searched for in the theme.19:55
senseHowever, you can set the icon theme path, to extend the search.19:56
senserooliganLernid: Does that make sense to you?19:57
=== asd is now known as Guest88731
senseThe function for setting the icon theme path is '.set_icon_theme_path('/icon/theme/path')'19:58
senseAny other questions, remarks, suggestions?19:58
senseNo?19:59
jcastroalright sense! good job!19:59
senseIn that case I would like to thank you for your attention and point you to jcastro for the next session!19:59
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu App Developer Week - Current Session: Building your package daily - Instructors: jcastro
jcastroAwesome, thanks for coming everyone20:00
ClassBotLogs 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
jcastroThis session is going to be about daily builds20:00
jcastroand how you can set them up for your project20:00
jcastroSo before we start, I'm going to link you up to some documentation that you can follow along with20:00
jcastrohttps://help.launchpad.net/Packaging/SourceBuilds20:00
jcastrook so first off, what is a daily build?20:01
jcastrothis is your software, pulled out of version control and built every night in launchpad20:01
jcastroCOntrary 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:01
jcastroalso, feel free to ask questions at any time20:02
jcastroso, imagine you have a program, that is at version 1.020:02
jcastroyou report a bug and then the developer fixes it20:02
jcastroand commits it20:02
jcastrobut, until the developer release 1.1 (or whatever), it's hard for you to test20:02
jcastrobecause unless you're an expert, you may not know how to build the software from source20:02
jcastroso, daily builds allow the developer to say "here try this PPA, let me know if the bug is fixed"20:03
jcastroand then you can easily try it, say yes! or no! and then be on your merry way20:03
jcastrowe call this "tightening the feedback loop between developers and users"20:03
jcastrogetting feedback back to developers quicker20:03
jcastroand developers getting stuff for users to test quicker20:04
jcastroso, in order to do this, the launchpad team have made it easy for just about any project to fire up daily builds20:04
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
jcastrook, so, I'm going to show you an example of how to take a project20:05
jcastroimport it into launchpad20:05
jcastroand then fire off dailies20:05
jcastrosince this is a Launchpad feature, we need two things to make the debs20:05
jcastrowe need20:05
jcastro1) The upstream source code20:05
jcastro2) the packaging20:06
jcastronow, I am lazy, so there's no way I'm going to go figure out how to package shotwell20:06
jcastrohowever .... https://code.launchpad.net/~ubuntu-desktop/20:06
jcastroas it turns out the ubuntu desktop team keeps all their packaging in version control20:06
jcastrowow, that's handy!20:06
jcastroNow, 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
jcastroyes and no20:07
jcastroFirst off, not every team in Ubuntu is using bzr for packaging (yet)20:07
jcastrobut we're well on our way20:07
jcastroand, there's no guarantee that taking packaging for something in the distro will Just Work(tm) on a pure upstream source.20:07
jcastroSo .... I went and tried it!20:08
jcastrook so from looking at that list, I find shotwell's packaging20:08
jcastrohttps://code.launchpad.net/~ubuntu-desktop/shotwell/ubuntu20:08
jcastrothere it is20:08
jcastrothis is basically the debian/ directory of the package the desktop team uses in ubuntu20:08
jcastroNow we need the source code from upstream!20:08
jcastroI can quickly google that20:09
jcastrohttp://yorba.org/shotwell/install/20:09
jcastroaha, there it is....20:09
jcastro$ svn co svn://svn.yorba.org/shotwell/trunk shotwell20:09
jcastrois what they tell us.20:09
jcastroBut they're using subversion, and I'm using Launchpad ....20:10
jcastroso, I can tell Launchpad to import the Shotwell svn repository20:10
jcastroby requesting a code import: https://code.launchpad.net/+code-imports/+new20:10
jcastrocode imports work for cvs, svn, and git20:10
jcastrothere is currently a limitation with the git import (no submodule support yet)20:11
jcastrobut the bzr team is working hard on that so more git using upstreams can use this feature20:11
jcastrothen launchpad goes and imports it and sends you a mail20:11
jcastrohow long it takes depends on the import20:11
jcastroIn the mail it tells me it's imported shotwell into launchpad here: https://code.launchpad.net/~jorge/shotwell/trunk20:12
jcastroany questions so far?20:12
jcastroso far we've imported shotwell into launchpad, and found the packaging branch the desktop team uses for shotwell20:12
jcastrook, so we've got the 2 parts we need20:12
jcastronow we're going to tell Launchpad to shove it all in a blender and spit out debs!20:13
jcastrowe do this by using what we call recipes20:13
jcastrohttps://code.edge.launchpad.net/~jorge/shotwell/trunk20:13
jcastroand you  can click "Create a packaging recipe"20:13
jcastrobut, I've got done done already20:13
jcastrohttps://code.edge.launchpad.net/~jorge/+recipe/shotwell-daily20:13
jcastrothere it is20:13
jcastronow, this recipe is where the magic is20:14
jcastroand covered in greater detail here: https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted20:14
jcastroso let's look at it20:14
jcastro# bzr-builder format 0.2 deb-version 1.0+{time}20:14
jcastrolp:shotwell20:14
jcastronest shotwellpackaging lp:~ubuntu-desktop/shotwell/ubuntu debian20:14
jcastrothese 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:15
jcastrowhen I create the recipe I can choose which PPA to send it to20:16
jcastroas you can see, I sent it to my "Daily test builds" PPA I made20:16
jcastrohttps://code.edge.launchpad.net/~jorge/+archive/dailies/+packages20:17
jcastroyou can find the .deb there.20:17
jcastroor NOT, because it failed.20:17
jcastrohmm, I must have missed something.20:17
jcastroright, I forgot to test my recipe to see if it even worked!20:17
jcastronow, everytime I set up a daily build, this uses up resources20:18
jcastroand the last thing we need is daily builds contributing to the heat death of the universe20:18
jcastroso ... we first need to test the build locally20:18
jcastroto make sure we've shaken out the bugs20:18
jcastrothis also means that you can also use your own machine to make daily builds20:19
jcastroso if you have your favorite project and want to just set that up locally, you can totally do that20:19
jcastrohttps://help.launchpad.net/Packaging/SourceBuilds/GettingStarted#Testing locally20:19
jcastrothis has instructions for how to test them locally, using bzr-builder, and pbuilder20:19
jcastroany questions so far?20:19
jcastrono questions? This can't be that easy!20:20
jcastrook20:20
jcastroso, let's see what we can do with these things20:21
jcastrolet's use the amazing server team as an example on how they use daily builds20:21
jcastrothey maintain a whole bunch of these20:22
jcastrohttps://edge.launchpad.net/~ubuntu-server-edgers20:22
jcastrowhat we've got here is a collection of daily builds for all sorts of projects20:22
jcastroapache, mysql, nagios, puppet, samba, varnish, etc. etc.20:22
jcastrothe list goes on and on20:22
jcastroso, the team uses daily builds so people who are deploying these applications can test /the very latest/ code, right as it's committed20:23
jcastrothis leads to better bug reports, and better testing (remember what I said earlier about tightening the feedback loop)20:23
jcastrook 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
jcastronow, theoretically, launchpad goes off and builds the debs and publishes them to a PPA I've designated20:24
jcastroThis happens on the launchpad build farm: https://launchpad.net/builders20:25
jcastrothis is where you can see packages being built for both the distro and PPAs, in every supported arch20:25
jcastrowhen 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 something20:25
ClassBotozalexo 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
jcastrothis is a good question20:26
jcastroso in the example I set everything up in my little launchpad space, which is why the url's all have ~jorge in them20:26
jcastrochances are no one cares about those too seriously20:26
jcastrohowever, when you're ready to go public, you can put them in a more canonical place20:27
jcastrohttps://launchpad.net/shotwell20:27
jcastrothey will eventually show up here ^^^20:27
jcastrobut yeah, when I am playing with them and they are broken I put them under ~jorge20:27
jcastroone thing some projects fear is that users will use daily builds instead of releases20:28
jcastrobecause we're maniacs everyone loves to have the pure hotness delivered every day20:28
jcastrohow you handle that is up to your project20:28
jcastroand launchpad has facilities to ensure that you're not being spammed by bug reports from package versions that aren't in the archive20:29
jcastrohowever if you have a dedicated group of people who know how to test, dailies bring a bunch of benefits20:29
jcastrowhich I think outweigh the downsides20:29
jcastrook so wow, I type way faster than I should, any other questions?20:29
jcastroanother question I hear often is "If I am building trunk every day what if I break something! OMG anxiety!"20:30
jcastrothe 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 works20:31
jcastroand since we let you make as many recipes and branches as you want20:31
jcastrothere's nothing stopping you from making myapp-newfeature daily builds until you're ready to merge it20:32
jcastroI 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:32
jcastroany other questions?20:34
jcastroabentley: any comments?20:35
jcastroAaron has been working on this feature all cycle!20:35
abentleyjcastro: seems like a good introduction.  Did you mention that we also support imports from Mercurial?20:36
jcastronope, I didn't know that!20:36
jcastroand CVS still too I assume?20:36
abentleyjcastro: yes, we still support CVS.20:37
jcastrosomeone asked about git: yes, as I said earlier the only gotcha is we don't support importing projects that use submodules20:37
jcastrobut the bzr team is working on fixing that20:37
jcastrook so unless there's any more questions I guess smoke if you got 'em, next class starts in about 20 minutes!20:38
jcastroor not ... I was last today wasn't I?20:38
abentleyjcastro: 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
jcastrooh, there's a quota?20:38
jcastrotell me about it, that sounds sneaky. :)20:38
abentleyjcastro: You have five builds per recipe per distroseries per 24 hours (yes, sliding window).20:38
jcastroah ok, so as long as I test before hand and don't spam the system with builds I should be ok?20:39
jcastrook so that's it for today, make sure to join us tomorrow20:40
jcastrohere's the schedule! http://people.ubuntu.com/~nhandler/classroom.html20:40
abentleyjcastro: yes.20:42
ClassBotsinisterstuf asked: can anyone add their pc to the build farm?20:42
jcastroooh, time for one more20:42
jcastrothe answer is No.20:43
jcastroFor security reasons we don't allow untrusted machines in the build farm20:43
abentleyThe 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:45
abentleySince building packages means running arbitrary code, people who contributed their machines to the build farm would be running a grave security risk for themselves.20:47
ClassBotLogs for this session will be available at http://irclogs.ubuntu.com/2010/09/28/%23ubuntu-classroom.html21:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat ||
=== ghostcube_ is now known as ghostcube
=== yofel_ is now known as yofel

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!