From javierayres at gmail.com Fri Aug 3 03:23:35 2018 From: javierayres at gmail.com (Javier Ayres) Date: Thu, 2 Aug 2018 22:23:35 -0300 Subject: [qutebrowser] Why does TabWidget's parent changes during execution? Message-ID: Hi all. I'm trying to start the work for issue 1716 (https://github.com/qutebrowser/qutebrowser/issues/1716) and I'm running into the following problem: 1- In TabbedBrowser's __init__ method, self.widget is set to "tabwidget.TabWidget(win_id, parent=self)". With pdb, I can verify immediately after that self.widget.parent() correctly returns the TabbedBrowser instance. 2- Later, at the point of executing browsertab.create, the TabWidget instance is passed down as the "parent" argument, but if I do parent.parent(), I receive a MainWindow instance instead. I have verified with pdb that in both cases it's the same instance of TabWidget, and I have re-defined TabWidget.setParent method to make it throw an exception in case it was being called somewhere, but it is definitely not. I basically need to access the TabbedBrowser instance down from an AbstractTab instance, and this seemed like a clean way of doing so without passing new arguments to objects constructors. Cheers. From jaygkamat at gmail.com Sat Aug 4 18:37:53 2018 From: jaygkamat at gmail.com (Jay Kamat) Date: Sat, 04 Aug 2018 09:37:53 -0700 Subject: [qutebrowser] Why does TabWidget's parent changes during execution? In-Reply-To: References: Message-ID: <87zhy2t7dq.fsf@gmail.com> Javier Ayres writes: > 1- In TabbedBrowser's __init__ method, self.widget is set to > "tabwidget.TabWidget(win_id, parent=self)". With pdb, I can verify > immediately after that self.widget.parent() correctly returns the > TabbedBrowser instance. > 2- Later, at the point of executing browsertab.create, the TabWidget > instance is passed down as the "parent" argument, but if I do > parent.parent(), I receive a MainWindow instance instead. I'm not sure about this, but I'm pretty sure that the parent/child relationship can be changed by qt depending on the layout of the elements. I don't think it's a good idea to rely on it being set like that, especially because it's pretty easy to change the parent/child relationship and not realize that you're breaking the code that depends on a child/parent being a certain type of object. > I have verified with pdb that in both cases it's the same instance of > TabWidget, and I have re-defined TabWidget.setParent method to make it > throw an exception in case it was being called somewhere, but it is > definitely not. > > I basically need to access the TabbedBrowser instance down from an > AbstractTab instance, and this seemed like a clean way of doing so > without passing new arguments to objects constructors. how about: tab-browser = objreg.get('tabbed-browser', scope='window', window=self.win_id) At some point though, I think that passing the argument in might be cleaner, especially if you need it a lot of times. -Jay From javierayres at gmail.com Sat Aug 4 21:31:28 2018 From: javierayres at gmail.com (Javier Ayres) Date: Sat, 4 Aug 2018 16:31:28 -0300 Subject: [qutebrowser] Why does TabWidget's parent changes during execution? In-Reply-To: <87zhy2t7dq.fsf@gmail.com> References: <87zhy2t7dq.fsf@gmail.com> Message-ID: > I'm not sure about this, but I'm pretty sure that the parent/child > relationship can be changed by qt depending on the layout of the elements. I > don't think it's a good idea to rely on it being set like that, especially > because it's pretty easy to change the parent/child relationship and not > realize that you're breaking the code that depends on a child/parent being a > certain type of object. Oh I see, okay this a good tip. > how about: > tab-browser = objreg.get('tabbed-browser', scope='window', window=self.win_id) > > At some point though, I think that passing the argument in might be cleaner, > especially if you need it a lot of times. I guess I'll go with the extra argument, plus I think I remember Florian mentioning he wants to get rid of objreg eventually. Thanks for your help. From bearcatsandor at gmail.com Sun Aug 19 22:32:04 2018 From: bearcatsandor at gmail.com (=?UTF-8?B?QmVhcmNhdCBNLiDFnsOhbmRvcg==?=) Date: Sun, 19 Aug 2018 14:32:04 -0600 Subject: [qutebrowser] Editing and re-loading quickmarks In-Reply-To: <694D51C3-8EEB-47D0-8ADD-14A90345E6B1@rcorre.net> References: <694D51C3-8EEB-47D0-8ADD-14A90345E6B1@rcorre.net> Message-ID: Issue submitted. My apologies for letting this slide. On Wed, Jul 18, 2018 at 9:21 AM Ryan Roden-Corrent wrote: > Makes sense -- I think a bookmark-source command would be useful, though > it could be part of config-source as well. > > Mind opening an issue to request this? Away from my PC right now and I > don't want this to get lost. > - Ryan > > On July 14, 2018 12:57:05 PM PDT, "Bearcat M. ??ndor" < > bearcatsandor at gmail.com> wrote: > >Cool, thanks for the link to the pull. My issue isn't editing them so > >much > >(i always have multiple terminals open anyhow with vim under my paws), > >but > >how to refresh the list of marks while qutebrowser is running. In fact, > >it > >would be a great to be able to reload all configs that way, but this is > >probably a qtwebengine issue, and not a qutebrowser issue, yes? Is > >that > >what config-source does, but it just doesn't read quickmarks/bookmarks > >as > >part of the config? > > > >On Fri, Jul 13, 2018 at 8:58 AM Ryan Roden-Corrent > >wrote: > > > >> Hi Bearcat, > >> > >> There's a patch under review to merge quickmarks and bookmarks into > >one > >> feature, so you won't have to pick between the two. There's nothing > >wrong > >> with using quickmarks though :) > >> > >> I think a :bookmark-edit command would be great though. It has been > >on my > >> radar but since the current PR is already big, I decided not to work > >in any > >> features until that was reviewed. > >> > >> See https://github.com/qutebrowser/qutebrowser/pull/3855. > >> > >> > >> - Ryan > >> > >> On July 12, 2018 2:34:11 PM PDT, "Bearcat M. ??ndor" < > >> bearcatsandor at gmail.com> wrote: > >> >Florian, > >> > > >> >Is there a way to edit quickmarks within qutebrowser? The only way > >> >i've > >> >found is to open the quickmarks file, edit it, save it and then > >> >quit/start > >> >qutebrowser. There doesn't seem to be a "reload in place" command > >that > >> >re-reads the quickmarks file. > >> > > >> >For what it's worth, i'm using quickmarks instead of bookmarks, > >which > >> >may > >> >be improper. > >> > > >> >I realize that you're busy with exams, so whenever you get to this > >> >question > >> >is fine with me. > >> > -- Bearcat M. ??ndor Feline Soul Systems LLC Voice: 872.CAT.SOUL (872.228.7685) Fax: 406.235.7070 -------------- next part -------------- An HTML attachment was scrubbed... URL: