=== chriadam|away is now known as chriadam === chihchun_afk is now known as chihchun [07:07] didrocks: you here :D === chihchun is now known as chihchun_afk [07:13] zbenjamin: yep! :) [07:13] hey [07:22] didrocks: hey sorry, i was on holiday [07:24] zbenjamin: no worry! I hope you enjoyed them :) [07:24] didrocks: yeps :D it was good [07:30] didrocks: i saw you spent some quality time with the sdk [07:35] zbenjamin: heh, quite some yeah :) [07:35] zbenjamin: so, is my conclusion correct, you need to fiddle yourself with subdirectories? [07:36] zbenjamin: so doing something like this: https://github.com/didrocks/splitthebill/commit/11fd9cd1d399539597f186b5e94ef207abfdd986 [07:46] didrocks: yes, thats your responsibility with all qmake projects [07:47] zbenjamin: not really dev friendly I guess, especially as the ide is adding them directly (see the deletions) [07:47] didrocks: thats true. But you can not assume that srcdir == installdir. [07:48] I guess they just wanted to assume nothing [07:54] zbenjamin: in some way, they do assume that even if you put files in a subdirectory, you want a flat structure when deploying though [07:54] (which IMHO makes less sense that leaving files with the same dir structure) [07:59] rpadovani, looking forward to falldown hitting the store! === _salem is now known as salem_ === chriadam is now known as chriadam|away [08:29] didrocks: yeah for QML at least [08:29] didrocks: there should be proper QML support in qmake [08:31] agreed :) [10:47] zsombi: ping [11:09] nik90: ong [11:09] p [11:09] ongp? [11:11] p+ :D [11:11] nik90: so, whazzup? [11:12] zsombi: I need some brainstorming help with https://bugs.launchpad.net/ubuntu-clock-app/+bug/1488439 [11:12] Ubuntu bug 1488439 in Ubuntu Clock App "Editing alarms re-orders them but the list view isn’t updated" [High,Confirmed] [11:12] zsombi: shouldn' the listview automatically update when the data model changes? [11:13] it should be a Notifyable property informing qml of the changes made to the backend and update the labels? Or do I have to manually call for alarmModel refresh() ? [11:13] nik90: yes, it should, the only reason it doesn't may be that the date chaneg doesn't seem to be reported as position change on the alarm cache... [11:13] hmm, anyway I can detect this? [11:14] like using onModelReset or any other signal? [11:14] nik90: if you don't get any signal from the ListView, then the cache did not refresh [11:14] nik90: I think that one... [11:15] ok, so in the alarm list page, I will have onModelReset: refresh() to recreate the cache. [11:29] zsombi: https://code.launchpad.net/~nik90/ubuntu-clock-app/fix-alarm-list-refresh/+merge/269047 === salem_ is now known as _salem === MacSlow is now known as MacSlow|lunch [12:20] nik90: nice :) [12:22] zsombi: the one minor inconvenience was that I had to pass the entire alarmModel to the edit alarm page as an argument. Although that's fine I suppose [12:23] nik90: it is, as long as the model exists till teh entire lifetime of the page, beside, it only passes the reference, doesn't copy the model, so... :) [12:24] zsombi: indeed. I need to be careful about when I refresh the alarmModel indeed. We just fixed https://bugs.launchpad.net/bugs/1487789 few days back that scared the shit out of me. [12:24] Ubuntu bug 1487789 in Ubuntu Clock App "Edited alarm cannot be saved if any point clock app loses focus" [Critical,Fix committed] [12:24] :D [12:24] popey: ^^^ nik90 fixed the bug ;) [12:25] zsombi: nik90 is awesome. [12:25] lol :D [12:25] we knew that ;) [12:25] oh stop it guys ;) [12:26] t1mp: could you give an eye one more time on the cppAbstractButton MR pls? [12:26] kalikiana: ^ [12:26] you as well [12:27] zsombi: could you quickly add a comment approving the MR from a code-review perspective. I can then get it merged later today. [12:40] nik90: I don' thave right to approve it, but yes, I can comment [12:41] anyone alive [12:42] nik90: commented [12:42] zsombi: thnx, I or bartosz can top-approve once we do some more manual testing. [12:42] evrrybody is alive :) [12:43] zsombi: normally, an app dev would set onTriggered: {...} for an AbstractButton, and not override the trigger() function, right? [12:44] t1mp: yes... [12:45] t1mp: but, if you want to override the default trigger sequence, you would have to do it like that [12:46] zsombi: so if the abstract has an action, but you do not want that action triggered when you click the button? [12:46] weird use case ;) [12:46] t1mp: or you want to delay the action triggering, like we do in ListItem's case [12:46] s/abstract/abstract button [12:47] i have a proble i uploaded version 0.1 to the app store and now i'm ready for version 0.2 what do i need to change for it to build the new package? [12:48] zsombi: delay? in which way? time? [12:48] zsombi: are you talking about old or new list items? [12:48] t1mp: don't tell me you haven't seen the ListItem code :D [12:48] t1mp: new ListItems of course [12:48] t1mp: we must delay the action triggering in teh leading/trailing actions [12:49] t1mp: they should be triggered once the animation is over, remember? [12:49] t1mp: if I do not override AbstractButton.trigger(), then the action will be triggered immediately [12:50] t1mp: and if the action deletes the item, the UI will crash [12:50] t1mp: because there will be an ongoing animation to snap the ListItem's panel out [12:51] right [12:52] t1mp: but you approved this feature of trigger() overriding before, am surprised we are reloading the talks about it now :) [12:53] I'm not against it, but I did need to refresh my memory [12:53] t1mp: you scared me :D [12:59] zsombi: I think now the update to Empty.qml in 1.2 can be reverted [13:00] t1mp: I thought I did... [13:00] zsombi: so when you register a component from cpp, it automatically overrides the qml version? [13:00] t1mp: yes [13:00] cool. That may become even more useful in the future :) [13:01] t1mp: the qmldir is there just to automate the call of qmlRegisterType() fo ryou [13:01] zsombi: https://code.launchpad.net/~zsombi/ubuntu-ui-toolkit/cppAbstractButton/+merge/268442 l.222 [13:01] t1mp: we can even stop a type from being exported in certain version onwards [13:02] t1mp: yes, I saw it, I'll push an update as long as you confirm nothing else needs to be fixed on the branch [13:02] zsombi: yes it is good. Should we wait for kalikiana too? [13:03] t1mp: I dunno... we basically discussed this thing I just implemented there [13:03] ok [13:04] last I checked there's still some 1.2 stuff that's unecessary, in the list item and some import changes [13:04] by the looks of it that will be fixed? [13:04] kalikiana: which ones are? [13:05] zsombi: CheckBox, ComboButton, TextField [13:05] kalikiana: for 1.2 Checkbox and ComboButton we need thiose imports, I am getting ambiguous errors otherwise [13:05] same for text field [13:05] zsombi: oh. why? if they're using the same QML as before.. [13:05] kalikiana: perhaps the different type import for 1.3 messes it up... lemme check again [13:06] zsombi: hmm I guess if QML is being funny is fine - I'd just try to avoid unnecessary changes in 1.2 if possible [13:06] kalikiana: sure, +1 on that, let me check again [13:07] thanks [13:07] kalikiana: the nice thing is that qmlapicheck does the job for me now ;) [13:07] kalikiana: seems to be fine without 1.2 imports [13:07] :-D [13:08] kalikiana: I guess I had them dues to full cpp button... :) [13:10] kalikiana: t1mp: pushed an update, rolling back 1.2 changes [13:20] t1mp: kalikiana: so, should ActionContext.active work same way as the Item.enabled does? [13:22] zsombi: in what sense? [13:23] are you talking about making it dependent on parents? [13:23] kalikiana: in a sense that if the parent ActionContext is deactivated, all its child ActionContexts shousl also be deactivated [13:23] aha [13:23] yeah [13:23] we need that behavior [13:23] kalikiana: state being reflected thru teh action property [13:24] kalikiana: it gets deactivated, it's just not reported thru teh actuve property [13:24] zsombi: yeah [13:25] kalikiana: so the actions added to these child ActionContexts won't get triggered in these cases, but the active property will still say true [13:25] kalikiana: I thought so... so, I think then we have a problem of that being override :) [13:25] kalikiana: same way as the enabled or visible [13:26] damn it, I have 2sec lag time in chat!!! [13:27] kalikiana: so, the thing is, when an Item's enabled has a binding, and its parent gets disabled, the enabled will change, but the binding won't get broken [13:27] kalikiana: which means that if the binding is reevaluated, the enabled will be set back [13:27] kalikiana: same with visible [13:27] zsombi: well, from my point of view we don't really need the magical properties here. if you need to know if a context blocks an action you can ask the context about that [13:28] kalikiana: sure, internally we do actually [13:28] kalikiana: its just shoudl we reflect this tru the active property or not... that's the only question [13:30] zsombi: we need to ensure trigger() respects its context - there's no requirement beyond that. even a custom component wouldn't care so long as it simply calls that function [13:31] the only other aspect would be hotkey registration which probably should depend on whether the context is active [13:31] ie. if you have a shortcut ^X in two contexts one of which is enabled, it shouldn't clash [13:32] kalikiana: I think the shortcut registration can proceed no matter of what, the shortcut matcher otoh takes into account whether the action is activable or not, if not, then won't return the match [13:32] kalikiana: so in this sense if we have two actions with the same shortcut, and one is activable other si not, only teh activable will be selected [13:33] zsombi: yep, if that respects the context state that's all we need [13:33] and then there's no need for the action itself to magically change property values [13:35] kalikiana: right, what I'm trying to sort out with you si the ActionContext.active state :) [13:36] kalikiana: so if we want that to follow the same setup as Item.enabled/visible, then we may run into the same problemas Item.enabled/visible does [13:36] zsombi: oh, you mean having the context change its property value [13:36] I was thinking only of the action above [13:36] kalikiana: actually I was only talking about the context :) [13:37] kalikiana: like if you change the enabled/visible of a parent item, that affects the child items' properties as well [13:37] zsombi: right. my stance is the same, though. I don't find the semantics of those magical properties very nice to work with [13:37] kalikiana: now, if the child items do have bindings on these, those change these back eventually [13:37] it breaks bindings and makes it difficult to know what the real value is [13:38] kalikiana: the thing is that the enabled is handled behind teh scenes and bindings stay! [13:39] zsombi: well, yes, but you still get different values than you should, and you can't know the real state anymore [13:40] zsombi: I would like it if there was a way to actually know both [13:40] zsombi: it's also very specialized - rotation doesn't work in this way [13:41] you change the value, things move around, and the value is the same [13:41] kalikiana: let me get to a meeting, and we get back to it [13:41] k [13:48] kalikiana: we could have active, and effectiveActive props, what do you think? effectiveActive would be RO, so no binding on it would be doable [13:49] kalikiana: active would mean the local active, would not collide with the parent actives at all, and wouldn't be driven by that either [13:54] zsombi: the question is, what's the use case for it? === _salem is now known as salem_ [14:26] popey: I found out why some of the apps from the ppa weren't opening. They rely on Ubuntu.component 1.3 which is wily, that would explain why it worked for you and not me too I guess right? [14:27] popey: I upgraded today and they all open now :) Calendar refuses to accept my Google account which makes it a bit meh :( [14:47] Announcing Ubuntu Themed Days - Looking for feedback: https://www.reddit.com/r/UbuntuAppDev/comments/3ic48m/announcing_ubuntu_themed_days_looking_for_feedback/ [14:58] kalikiana: back now.... [14:58] t1mp: kalikiana: we are going to have a real palette FINALLY!!! [14:59] davmor2: yes, I'm on wily [15:00] zsombi: my last question wrt ActionContext was, what use case are we looking at for effectiveActive? if we only sort it out internally we don't necessarily want API [15:00] kalikiana: so, the only use case for effectiveActive I see is testing, however that one can be handled thru triggering actions and not getting any trigger count on the signal sspy [15:01] kalikiana: right, so I'd then skip it for now until further notice [15:01] yeah. I'd expect tests to only test the expected value anyway - there's no need for conditions [15:01] kalikiana: yes, I do the testing like that now [15:02] kalikiana: one more thing, I turned ActionContext into Item, the property lookup was really slow... so now those who want to group actions can use the ActionContext, and it is also a focus scope to propagate focusing [15:04] t1mp: kalikiana: we got 4 color sets, normal, selected, hovered and disabled, and few more palette value names: positive, negative, active, position [15:04] t1mp: kalikiana: and finally we are going to use these values in the UI spec!!!!!!!!!!! [15:05] zsombi: erm, what about focussed? [15:06] kalikiana: that will be potentially a simple color apart from the palette, as it only happens on components which are focused [15:07] kalikiana: so the visual component doing the focusing will need to be subtyped in themes if they need different color [15:07] kalikiana: or, we put it as color in the Palette, without being included in any color value set, I think this would be much better [15:08] kalikiana: in this way the Palette will have normal, selected, hovered, disabled value sets and focus + focusText pair [15:11] kalikiana: however we may not even need focusText for now... [15:11] zsombi: how is focus different to say selected? you select text and the component assumes focus styling, with the text changing colors [15:11] that seems reverse to what you're saying [15:11] kalikiana: the focus frame will be shown around a text input, and then the selected text will be colored differently, just like now [15:13] zsombi: yes. but that means selected isn't a state at all, but focus is [15:13] kalikiana: hmm.... actually you're right! the selected is actually the focus... [15:14] kalikiana: or... hold on, no [15:14] kalikiana: there will be a state in some components, called selected [15:14] kalikiana: we're gonna use the color set on those components, the focus is focus + normal [15:15] * zsombi double checks [15:16] zsombi: I'm kind of wondering how these categories are defined. for example normal=enabled/sleeping disabled=!enabled hovered=mouse within the component.... so why isn't focus=activeFocus in the same league as those other folks? [15:18] jdstrand: hey, I was wondering if the user denied some permissions, like the location one for an app. Is there an easy way for the app itself to know about it? (like showing two label, one "no location available" if no GPS is available and another "location is denied for this application")? [15:19] hi [15:19] didrocks, i guess thats a tvoss question, that stuff should be handled by the trust-store [15:19] ah, I'm happy to relay :) [15:19] there is not a way for the app to specifically ask if it has permission that I know of. it depends on what APIs the service in question offers [15:20] jdstrand: yeah, for location is just seem that no signal will be sent for instance, but that can also mean we didn't get any GPS fix [15:20] eg, does location service provide an api for the app to see if it has access. (I don't think it does) [15:20] yep, that's exactly it [15:21] thanks ogra_, jdstrand! [15:21] np [15:32] jdstrand, ping about manual review of apps :) === MacSlow|lunch is now known as MacSlow === chihchun_afk is now known as chihchun === chihchun is now known as chihchun_afk [15:58] kalikiana: you mean the colors? [15:58] mzanetti: ping [16:00] kalikiana: t1mpso, I can happrove https://code.launchpad.net/~zsombi/ubuntu-ui-toolkit/cppAbstractButton/+merge/268442? [16:00] t1mp: ^ [16:01] zsombi: yes, as far as I [16:01] 'm concerned [16:01] kalikiana: thx [16:01] kalikiana: t1mp was waiting on your approval [16:01] oh. but I already approved on lp [16:02] sorry about that [16:02] kalikiana: np, I happroved it now, thx + t1mp [16:02] kalikiana: so, back to colors... [16:02] zsombi: yes wrt the colors. it's unclear to me how selected warrants a category in the palette, but focus doesn't [16:03] kalikiana: so, selected == focus [16:03] hmm [16:03] kalikiana: and we may get an outline + text color pair there to handle the focus coloring of the components [16:03] zsombi: well, there's possibly two things we call selected, so we should try to avoid ambiguity here [16:04] you can select text - different colors [16:04] you can select list items [16:04] kalikiana: the text selection is called position... [16:04] you can select, as in focus [16:04] kalikiana: the list item selection is made thru checkboxes [16:04] zsombi: position? [16:05] kalikiana: perhaps a bit different, I do n't remember by heart, but we can ammend that [16:06] zsombi: I get the feeling if we're not careful the only way to talk about the palette will be with a cheatsheet that shows what the terms mean.. [16:06] kalikiana: then we will have different selections in different components as well, so.. [16:07] kalikiana: I second to that :) it's just we cannot really change the palette value set names like that... [16:07] selection styling depends on the component, just like focus does, that is fine [16:08] the question is if there is a color that'll be shared - or will selection in that way always be based on other things [16:08] kalikiana: yes, the text selection will also be used in file manager's selection too... potentially... [16:08] I mean colors [16:09] kalikiana: which is why the "position" was added [16:09] kalikiana: it's just badly named [16:09] kalikiana: sees UX doc end [16:10] zsombi: thing is nobody would ever say "I postioned a few files, now how do I copy them" ;-) [16:10] kalikiana: LOL exactly... and they really call it as [16:11] zsombi: so if "position" means selection in plan english, what does "selection" translate to? [16:12] kalikiana: just commented on it :D [16:13] kalikiana: + the "active" seems to be the color they use in focus highlighting... [16:14] ah found it in the doc now [16:14] okay, so position is even described as selection... [16:16] right :D [16:25] zsombi, pong [16:25] mzanetti: remember the mouse/keyboard detection thingie? [16:26] mzanetti: or you had sthing comitted upstream which would do some enumeration for these, right? [16:29] kalikiana: one more question, do you prefer overlay action context or modal action context naming? [16:31] kalikiana: maybe we don't even want to exose this... [16:31] kalikiana: but drive it from the Dialog in some way... [16:32] mzanetti: do you know what I'm talking about? [16:38] zsombi, yes [16:38] mzanetti: aaaaand? :) === salem_ is now known as _salem [19:14] popey: coreapps ppa will all the apps get rebuilt for wily? [19:25] davmor2: possibly === ahayzen_ is now known as ahayzen [21:51] Hm. How do I use i18n.tr to indicate a translation on an HTML string? I have, for example, the string "Hello, this is the world"; how do I express that in an i18n.tr-able form so that it can be translated? I don't want to do i18n.tr("Hello, you are the") + "" + i18n.tr("world") + "" because then someone translating won't get the whole sentence in one go (and so won't know which gender to put the [21:51] "the" in) [21:57] aquarius, you could put a // TRANSLATORS: comment on the line before which then shows in LP, like we do in the music-app here http://bazaar.launchpad.net/~music-app-dev/music-app/refactor/view/head:/app/components/Helpers/UserMetricsHelper.qml#L30 this then appears like this https://translations.launchpad.net/music-app/refactor/+pots/com.ubuntu.music/en_GB/25/+translate [21:57] ahayzen, I could, but then the comment would have to say "be careful to keep all the HTML formatting in place or you'll break everything" :-) [21:58] which I don't really wanna do [21:58] :-) [22:00] what I *want* to do is this: i18n.tr("Hello, your port is number %1".replace("%1", "%1")).arg(port); [22:01] but I bet that doesn't work right because it's not a plain string inside the i18n.tr call so the thing which parses the QML file won't get it correctly. [22:03] and I can't replace it *afterwards* (that is, i18n.tr("Port is %1 or maybe %2").arg(port1,port2).replace(port1, ""+port1+"").replace(port2, ""+port2+"") because port1 might be a substring of port2 [22:06] oo that looks like the tag() thing we never got working https://developer.ubuntu.com/api/apps/qml/sdk-15.04/Ubuntu.Components.i18n/#tag-method [22:11] ya, I was right, I can't do clever things inside an i18n.tr call. [22:17] actually... maybe I can. [22:19] ha haaaa! [22:20] no, wait. [22:21] darn it. [22:21] my trick won't work. [22:24] aquarius: you can have a function as the 2nd argument to String.replace, so you don't have to rely on the dumb defaults to do the replacement (and hence getting mixed up with substrings) [22:24] mcphail, the problem is that I don't know what to replace. [22:25] I would like the output string to be:

Hello, your number is 31

. I have a variable, n, which is set to 31. What should my i18n.tr line be? [22:26] * mcphail looks up his javascript book [22:26] Clearly the string that goes to translators should be "Hello, your number is 31" (with no HTML in it). [22:28] (er, sorry, the output string should be

Hello, your number is 31

[22:29] i18n.tr("Hello, your number is %1").arg(n).replace("%1", "%1") doesn't work because there's no %1 in the string by the time the replace runs [22:30] i18n.tr("Hello, your number is %1").replace("%1", "%1").arg(n) doesn't work because replace doesn't return a magic thing with a .arg method, it just returns a string [22:30] i18n.tr("Hello, your number is %1".replace("%1", "%1")).arg(n) doesn't work because it won't find a match to translate [22:30] aquarius: what about i18n.tr("Port is do_not_translate_this_placeholder_1 or maybe do_not_translate_this_placeholder_2").replace(/do_not_translate_this_placeholder_1/, ""+n1+"").replace(/...etcetc [22:31] ugly but might work [22:31] then I'm doing the substitutions myself rather than i18n.tr doing them [22:31] I suppose since it's just a port number, I could do that [22:32] aquarius: can't see how a port number would be internationalised. Different if it was something with a decimal point or whatever [22:32] ya [22:32] so, "your port is $PORT$" with a translator comment of "do not translate the $PORT$, just put it where the port number would be" [22:33] Might well work [22:34] aquarius: I'm sure the GNU gettext manual has a section on best practice for this kind of thing... [22:41] aquarius: "HTML markup, however, is common enough that it’s probably ok to use in translatable strings.", according to GNU anyway [22:41] right. I don't believe that :) [22:42] I do not want translators to have to understand markup [22:42] aquarius: fair enough, but at least you can quote a source which says it is OK :) http://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html#Preparing-Strings [22:42] especially since if they, for example, translate

Hello

to