/srv/irclogs.ubuntu.com/2012/10/08/#ubuntu-unity.txt

=== thomj is now known as thomi
=== mmrazik is now known as mmrazik|otp
ricotzracarr, hi, please consider this bamf change or similar http://paste.debian.net/plain/19758507:02
=== mmrazik|otp is now known as mmrazik
=== mmrazik is now known as mmrazik|otp
tsdgeosTrevinho: what defines glib::Timeout ?08:25
gordtsdgeos, https://bazaar.launchpad.net/~unity-team/unity/trunk/view/head:/UnityCore/GLibSource.h#L13308:29
tsdgeosgord: ahhh, i thought it was in glibmm or something and couldn't find it anywhere08:29
tsdgeosdidn't think to look inside unity itself ^_ ^08:29
tsdgeostx08:29
gordyeah unity doesn't use glibmm, so anytime you see something like that, it'll be inside unitycore08:29
gopuHi all08:33
gopuMy unity is having some problem working in 3D08:33
gopuCompiz is taking 100 % Cpu in 3D08:33
gopuAny idea08:34
=== mmrazik|otp is now known as mmrazik
gopuAnyoone here08:36
tsdgeosgord: Trevinho suggested to change g_timeout_add to glib::Timeout, but the first takes a void* with data and the second not, what's the recommented way of using glib::Timeout? Do i inherit from it to stuff in my data?08:39
tsdgeosgord: ok, i see how to use it08:43
didrockssil2100: Mirv: can you review/approve https://code.launchpad.net/~didrocks/unity/workspace-switch-translation/+merge/128440 please?08:50
didrocksI'm cherry-picking it in 6.0 meanwhile08:50
sil2100didrocks: ok, one moment08:56
didrocksthanks :)08:56
Trevinhotsdgeos: glib::Timeout can also be called with a lambda function, so you can pass to it anything you want09:01
tsdgeosyep yep, found that, tx09:01
Trevinhotsdgeos: I suggest you to check test_glib_source to see better ways to use it or just grep the unity code :)09:01
tsdgeosyes, did that 15 minutes ago ;-)09:02
Trevinhotsdgeos: ok, nice :)09:02
tsdgeosTrevinho: do i really have to move to glib::DBusProxy? calling g_dbus_connection_call_sync really helps and shouldn't hurt in a test09:11
Trevinhotsdgeos: i tought it was simpler to read/write, but if you want continue with that it's ok..09:11
Trevinhotsdgeos: what's the problem with the glib:: one?09:11
tsdgeoswell, the thing is that i trigger the resync and then ask via dbus if it has sent already to know when to end the waiting loop, but to ask via dbus the function that returns a bool i'm using the sync method that is really convinient09:12
tsdgeosif i don't have the sync method i need a waiting loop inside the waiting loop09:12
tsdgeoswhich is a bit weirdish09:13
Trevinhotsdgeos: ah, ok09:13
Trevinhotsdgeos: or feel free to add a CallSync method to glib::DBusProxy too :)09:14
tsdgeosok, i'll have a look at it09:14
Trevinhotsdgeos: otherwise another way is just to use the async way.. but after calling it you can just add a utils::WaitForTimeoutMSec(msecs); without the need of adding a new loop09:15
tsdgeosyeah, just didn't want to add a random number in that wait09:15
tsdgeosi'll try to add the callsync method09:17
tsdgeosshouldn't be that hard09:17
tsdgeoslast famous words09:17
Trevinhotsdgeos: hehe :), if it causes too troubles, using the way you're using it's fine as well.. Maybe just add an utility method in TestDBusIndicators, to call a method without repeating all the common parameters (i.e. you pass to it only a method name)09:19
=== mmrazik is now known as mmrazik|lunch
ricotzmhr3, hi :)10:00
mhr3ricotz, hey10:01
ricotzmhr3, you have a moment for bamf?10:01
mhr3Trevinho, does ;)10:01
mhr3well.. might ;)10:01
Trevinhomhr3, ricotz yeah... I have :)10:01
ricotzmhr3, i already pinged racarr about it10:01
ricotz;)10:02
ricotzi really want to have the webapps dependency optional10:02
ricotzTrevinho, so maybe you could consider that http://paste.debian.net/plain/19758510:02
Trevinhoricotz: well, yes.. I tought the same few days ago...10:03
Trevinhoricotz: looking10:03
ricotzTrevinho, it is pretty easy and even doesnt touch the lib10:03
Trevinhoricotz: looks fair10:03
Trevinhoricotz: please do a MR for that10:04
ricotzTrevinho, the depcheck could be done more elegant of course by introducing a real --enable-* flag, but this automatic choice is working10:05
Trevinhoricotz: one thing, add another bamfdaemon_webapps_headers += ... and don't move the shared headers to bamfdaemon_sources10:08
ricotzTrevinho, https://code.launchpad.net/~ricotz/bamf/optional-webapps/+merge/12845610:08
ricotzTrevinho, yeah10:09
didrockssil2100: https://code.launchpad.net/~didrocks/unity/workspace-switch-translation/+merge/12845710:11
sil2100didrocks: ugh, ok10:14
didrockssil2100: it's better, we don't have anything to do with the manual upload :)10:15
sil2100didrocks: ok then ;)10:17
tsdgeosTrevinho: implemented all your suggestions10:20
Trevinhotsdgeos: cool10:22
ricotzTrevinho, updated the merge10:27
Trevinhoricotz: approved10:33
ricotzTrevinho, thanks :), feel free to merge it then10:35
Trevinhoricotz: automerger will do that in some minutes10:36
Trevinho(hopefully) :)10:36
ricotzTrevinho, alright10:36
ricotzTrevinho, another problem is for sure that if gtk2 is enabled webapps must be disabled10:37
Trevinhoricotz: mh probably...10:37
ricotzTrevinho, not sure if there are plans to drop gtk2 support which would solve this problem of course10:38
Trevinhoricotz: however I was wondering if we could drop bamf-gtk2...10:38
ricotzright10:38
Trevinhoeven if ginn still depends on it...10:40
ricotzTrevinho, ah, don't worry the daemon doesnt really have a gtk2 flavor so it isnt broken currently with enabled webapps10:41
Trevinhoricotz: yeah, i know10:41
=== mpt_ is now known as mpt
Trevinhotsdgeos: looks good overall, comments added11:00
tsdgeosTrevinho: the lambdas are actaully different11:03
Trevinhotsdgeos: mhmh11:05
tsdgeosTrevinho: i don't get what you mean with "fix the parameters indentation."11:05
Trevinhotsdgeos: well.. the is-connected one should be called anyway for all tests11:05
mhr3aaaaaah11:06
mhr3CallSync in UnityCore11:06
mhr3nooooooooooooooooo11:06
mhr3kill it!11:06
mhr3kill it now!11:06
tsdgeosTrevinho: well, i mymiced the hud tests, that only do the is connected for the first one11:06
tsdgeosmhr3: well it was Trevinho that suggested it11:06
tsdgeosi did not have it originally i'm just doing what you guys ask11:07
Trevinhotsdgeos: in GLibDBusProxy.cpp there's a missing space..11:07
tsdgeosTrevinho: which line?11:07
Trevinhotsdgeos: 108 in the diff11:08
Trevinhotsdgeos: about callsync btw why do you added also the g_main_loop thing?11:08
tsdgeosah right in the declaration11:09
tsdgeosTrevinho: because that's how the function you asked me to replace11:09
=== mmrazik|lunch is now known as mmrazik
tsdgeosworks11:09
tsdgeoscallsync is sync11:09
tsdgeosand thus will wait for the session to be stabilished11:09
tsdgeosnot fail because you're still not connected11:09
Trevinhojust call that... and eventually just make it protected so it won't be mis-used... or if mhr3 really doesn't want it, move back to the old one (but put it into a TestClass method)11:10
mhr3tsdgeos, Trevinho, it'd be much better to implement a sync-capable subclass somewhere in tests11:10
Trevinhotsdgeos: yes, sure but this shuould be handled by the client11:10
tsdgeos?11:11
=== MacSlow is now known as MacSlow|lunch
Trevinhotsdgeos: I mean, if the bus is not there, it should not be a problem of glib::Proxy, make the caller function to ensure that11:11
tsdgeosyou mean move the check to the test?11:12
mhr3Trevinho, acquiring the proxy is still async, that's why there's that awful thing11:13
Trevinhomhr3: yes, sure... but checking for IsConnected is enough11:14
Trevinhotsdgeos: yes11:14
mhr3tsdgeos, but yes pls, move it to tests, having the sync variant just breaks half of DBusProxy assumptions11:14
tsdgeosmhr3: well, you're asking me to move the whole function, not what Trevinho says11:14
tsdgeoscan i have a single direction plz? ;-)11:14
mhr3i say no DBusProxy::CallSync()11:15
Trevinhotsdgeos: ok, remove that... and move it back to the test (but inside an utility function)11:15
mhr3i'm fine with test::SyncDBusProxy : glib::DBusProxy {...}11:15
mhr3as it's indeed useful in test environment11:16
mhr3then again you can just have a wrapper method that will be sync, but call the async method11:16
mhr3tsdgeos, afterall that's what you did in there with the main loop spinning11:17
tsdgeosmhr3: not really11:17
tsdgeosmy spinning was for bus connecting11:17
tsdgeosbut the dbus call was also async11:17
tsdgeoserr11:18
tsdgeossync11:18
mhr3sure, but you can do the same thing for the call11:18
tsdgeosyeah11:18
tsdgeoswell11:18
tsdgeosas said already11:18
tsdgeosi *had* that11:18
tsdgeosand i was asked to change it back11:18
tsdgeosi don't mind going back11:18
tsdgeosbut being 'blamed' for something i did because i was asked feels a bit ackward11:19
mhr3sorry, Trevinho likes adding stuff, i'm always more inclined to keep out things that can lead to misuse11:19
* tsdgeos digs the old code11:21
mhr3tsdgeos, but your old code used the gio methods directly, right?11:23
tsdgeosg_dbus_connection_call_sync11:24
mhr3i do agree with Trevinho that it should use the c++ wrapper, otherwise there's just more risk of forgetting to unref the connection or something11:25
ricotzTrevinho, type and annotation fixes - http://paste.debian.net/plain/19765911:25
mhr3tsdgeos, Utils::WaitUntil() ftw ;)11:25
ricotzmhr3, maybe something for you to look at too ^11:26
mhr3the diff looks fine11:27
tsdgeosmhr3: how do you want me to use WaitUntil in my case?11:32
mhr3with lambda11:33
mhr3bool call_finished = false; proxy.Call([&] { .... call_finished = true; }); Utils::WaitUntil(call_finished);11:34
tsdgeosoh, i thought you meant for the other parts of the test where i do have my own timers11:35
mhr3didn't look throughly, maybe it'd make sense elsewhere as well11:35
mhr3timers are flaky11:35
mhr3+WaitUntil has a timeout by default11:36
mhr3would be awesome if WaitUntil could take a method that returns bool, is that doable with some std::function magic Trevinho?11:38
Trevinhomhr3: yes, I tought the same11:38
Trevinhomhr3: it should be easy to do11:39
Trevinhoa std::function<bool()> parameter should be fine11:39
tsdgeosok, i'll do that11:39
mhr3Trevinho, and then sigc::mem_fun?11:40
mhr3or how would the calling side look like?11:40
Trevinhomhr3: yes sigc::mem_fun is fine11:44
Trevinhoricotz: fine, please do a MR11:45
ricotzTrevinho, done, with some more additions11:45
Trevinhomhr3: also std::mem_fn is fine11:45
ricotzTrevinho, https://code.launchpad.net/~ricotz/bamf/type-fixes/+merge/12847211:45
Trevinhotsdgeos: see http://en.cppreference.com/w/cpp/utility/functional/mem_fn11:45
tsdgeosyes, i know i've that already11:46
Trevinhotsdgeos: cool11:47
mhr3Trevinho, i find mem_fn a bit weird, cause the instance is not part of the functor11:47
tsdgeosTrevinho: i'm still a bit confused as of what exactly you want with the dbus part of the test though11:47
Trevinhotsdgeos: what you mean?11:48
Trevinhotsdgeos: ah about the g_dbus_connection_call_sync ?11:49
tsdgeosTrevinho: yep11:49
Trevinhotsdgeos: it would be nice if you'd add a TestDBusIndicators::CallPanelMethod(std::string const& name, GVariant* parameters = nullptr) so that by default does11:50
Trevinhog_dbus_connection_call_sync(session, "com.canonical.Unity.Test", "/com/canonical/Unity/Panel/Service", "com.canonical.Unity.Panel.Service", name.c_str(), NULL, params, /* ret type */ G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);11:51
tsdgeosok, that works for me11:52
Trevinho(of course that requires that you initialize the proxy on setup, but that's fine)11:52
ricotzdidrocks, hi, i think the next bamf 0.3.4 package is ready to be built with introspection and vala bindings12:10
Trevinhotsdgeos: for the wait-until thing you can just add this: http://pastebin.ubuntu.com/1267338/12:20
=== _salem is now known as salem_
ricotzTrevinho, this would make the gir/vala-api nicer -- http://paste.debian.net/plain/19768512:50
Trevinhoricotz: probably it would be nice to add also a GLIB_DEPRECATED in the header12:54
didrocksricotz: hum, do you intend that for quantal? Seems for R or SRU :)12:54
Trevinhodidrocks: I'd bet for R12:54
Trevinhodidrocks: we'd need a trunk branch for bamf too, not to mess with the Q things12:55
ricotzdidrocks, yes R, but i dont see a problem for a SRU here12:55
didrocksTrevinho: I think Mirv did a quantal branch12:55
Trevinhodidrocks: not yet12:56
Trevinhodidrocks: I asked btw12:56
ricotzTrevinho, yeah, but i wanted to see if this is reasonable12:56
Trevinhoricotz: yes, it's fine for me12:56
ricotzTrevinho, so i guess it seem better to replace the old method body with calling the new one and change the internal usage of too12:57
Trevinhoricotz: yes, but leave that as it is for now... or it will break a lot some stuff I'm still working on :)12:58
tsdgeosTrevinho: sure, i had that already, but thanks for confirming i did it right :-)12:58
=== MacSlow|lunch is now known as MacSlow
ricotzTrevinho, ok12:59
ricotzTrevinho, although using GLIB_DEPRECATED will bump the depend to 2.3213:02
Trevinhoricotz: for R it should be fine13:05
ricotzTrevinho, do you want a MR for this too?13:16
ricotzit will break the current build though if deprecations arent disabled13:17
ricotzTrevinho, http://bazaar.launchpad.net/~ricotz/bamf/replace-user-visible/revision/49013:18
tsdgeosTrevinho: ok, i think i'm done with the updates (second round :D) https://code.launchpad.net/~aacid/unity/do_not_reuse_menus_on_order_change/+merge/12824313:38
MirvTrevinho: creating a R branch for bamf as well now13:53
tsdgeosdoes anyone know who should i ask about hints to where to start looking for https://bugs.launchpad.net/indicator-sound/+bug/1029219 ?13:55
ubot5Ubuntu bug 1029219 in WebApps: libunity-webapps "YouTube Webapp attaching to Rhythmbox, showing current song info. " [Medium,New]13:55
MirvTrevinho: done13:59
TrevinhoMirv: thanks14:14
Trevinhotsdgeos: could you add to your WaitUntil the extra bool parameter as the one I've pasted to you? So it can be used to check both functions returning false and true14:15
Trevinhotsdgeos: for the rest is fine now :)14:17
Trevinhotsdgeos: the last thing it would be using glib::Object to handle session and DBusIndicators::Ptr for the indicators (so you can avoid also the TearDown()) method, but this is optional :)14:18
tsdgeosok, let me try that14:20
tsdgeosTrevinho: if i do that i have to make the setup not create them the second time setup is called, no?14:24
Trevinhono...14:24
Trevinhotsdgeos: gtest does for every test -> Constructor() -> Setup() -> Test() -> TearDown()14:25
tsdgeosright14:25
tsdgeosbut if i have no teardown14:25
Trevinho(and ~dtor)14:25
tsdgeosand just a smart pointer14:25
tsdgeosah14:25
Trevinhothe destructor will do that14:25
tsdgeosit destructs the test class too?14:25
tsdgeosok14:25
Trevinhoyes14:25
Trevinhotsdgeos:  fyi also std::bind will work other than sigc::mem_fun (http://pastebin.ubuntu.com/1267338/), but they're fine as well14:26
tsdgeosok14:27
=== dandrader is now known as dandrader|afk
tsdgeosTrevinho: param + smart pointers added14:40
Trevinhotsdgeos: cool, thanks... Approved!14:41
=== dandrader|afk is now known as dandrader
tsdgeosTrevinho: now should this be added to precise and quantal at least, no?14:47
Trevinhotsdgeos: not directly, to get that you need to provide branches for unity-6.0 (should be easy) and unity-5.0 (it could probably be more difficult, due to changed code)14:49
tsdgeossure, i meant if you'll accept patches for those14:50
tsdgeossorry for being unclear14:50
Trevinhotsdgeos: yes, sure14:58
Trevinhotsdgeos: I've assigned to you the bug for the other series15:03
tsdgeosgreat thanks15:03
Trevinhosil2100: did you get my ping last week about backporting this to precise: https://bugs.launchpad.net/bamf/+bug/1026426?15:04
ubot5Ubuntu bug 1026426 in BAMF 0.2 "LibreOffice Unity integration (launcher and switcher) is broken" [High,Triaged]15:04
sil2100Trevinho: one moment ;)15:07
sil2100Ah, yes15:07
sil2100We're expecting this one even - we had a talk about how nice it would be to have for an SRU15:08
sil2100Trevinho: last week was a really busy time...15:09
Trevinhosil2100: yeah, I know, don't worry :)15:09
sil2100Trevinho: is it possible to get it ported easily?15:10
Trevinhosil2100: very easily: https://code.launchpad.net/~3v1n0/bamf/libbamf-safer-factory-rematch-2.0/+merge/12851815:11
sil2100Trevinho: awesome!15:11
Trevinhosil2100: ups, that MR is not valid... need to change the target branch, but it's just one line btw15:12
Trevinhosil2100: this is good https://code.launchpad.net/~3v1n0/bamf/libbamf-safer-factory-rematch-2.0/+merge/12851915:14
=== Guest33844 is now known as balloons
Dude-manHey guys... I'm trying to understand how the HUD is implemented... so developers don't have to make changes to their code... can anyone point to the souce, generally to start looking ? Thanks15:57
tsdgeosTrevinho: mmrazik: any idea what this error means ? https://jenkins.qa.ubuntu.com/job/automerge-unity/1502/console16:02
tsdgeosTrevinho: mmrazik: oh wait i was looking at the wrong place16:03
Trevinhotsdgeos: that log seems related to packaging issues16:03
tsdgeosno no16:03
tsdgeos/tmp/buildd/unity-6.8.0+bzr2814stagingfutureubuntu0+793/plugins/unityshell/src/unityshell.cpp:2462:31: error: base operand of '->' has non-pointer type 'unity::WindowManager'16:03
tsdgeosthat doesn't seem to be "mine"16:04
tsdgeosas in caused by my patch16:04
tsdgeosbut i'll merge and push16:04
tsdgeosTrevinho: wops, actually that line also fails to build here, any idea how that happened?16:09
Trevinhotsdgeos: merge with trunk...16:10
Trevinhoor...16:10
tsdgeosi did merge with trunk16:11
tsdgeosthat's actually what broke it :D16:11
Dude-manAnyone know anything about HUD ?16:14
Trevinhotsdgeos:  ah, ok... tests were compiling fine16:15
tsdgeosanyhow, eod here, next try tomorrow if master compiles :-)16:15
davmor2Dude-man: probably best to just ask16:21
Dude-mandavmor2, How da mean ?16:23
Dude-mandavmor2, I'm trying to find out how the HUD is working... internally ? just wanted to scratch an itch16:23
ricotzTrevinho, some more things ;) http://paste.debian.net/plain/19775816:24
Dude-manI'm looking to find which souce files to start with... I'm on archive.ubuntu.com looking through packages etc but if anyone has a quick answer to a dev doc or something It would help16:24
Trevinhoricotz: ok, MR it! ;)16:25
ricotzTrevinho, i am not sure about bamf_tab_source_get_tab_preview though16:25
ricotzespecially the element-type16:26
Trevinhoricotz: it should basically return the thumbnail of the webpage referred by the tab16:26
ricotzTrevinho, so the garray constain actual pixel-data in some format16:26
ricotz*contains16:27
Trevinhoricotz: yes, but the format depend on unity_webapps_context_request_preview16:30
Trevinhoso it's libunity-webapps thing, I don't know the internals16:30
=== dandrader is now known as dandrader|lunch
ricotzTrevinho, i see, so i hope transfer-none is the right thing to do here, otherwise it will leak like hell16:33
ricotzTrevinho, https://code.launchpad.net/~ricotz/bamf/annotation-fixes/+merge/12854416:42
Trevinhoricotz: i think no one will be affected, since the tab_preview is not implemented by any tab-source method yet17:14
Trevinhoricotz: you know one thing you could help? :)17:14
ricotzTrevinho, heh, i see ;)17:24
=== dandrader|lunch is now known as dandrader
Trevinhoricotz: I meant... We have an issue with the build system: it does not deletes the generated .c files on make dist(check)...17:37
Trevinhoricotz: and this is not a good thing when making tarballs...17:37
Trevinhoricotz: would you like to look fix that? :)17:38
ricotzTrevinho, so you dont want to ship the generated files at all?17:40
Trevinhoricotz: yes, no generated file should be kept17:40
ricotzseems easy to fix17:40
ricotzTrevinho, i will take a look later or tomorrow17:42
ricotzthis reminds me too of the messy .bzrignore file ;)17:43
=== rsalveti_ is now known as rsalveti
Trevinhoricotz: yeah, we have lots of things to clean... :)17:54
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
=== salem_ is now known as _salem
=== rsalveti_ is now known as rsalveti

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