git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* qgit shows wrong popup
@ 2006-01-11 23:21 Pavel Roskin
       [not found] ` <e5bfff550601120455p1b1654cx43beb684a3fd5dc7@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Roskin @ 2006-01-11 23:21 UTC (permalink / raw)
  To: Marco Costalba; +Cc: git

Hello, Marco!

Current qgit has a bug that manifests itself on stgit repositories.
Suppose I have two patches known to stgit, one is applied and the other
is not.

If the unapplied patch is selected and I right-click on the applied
patch below, I get a popup with "Push patch" disabled.  If I select the
applied patch by the left click, then "Pop patch" appears in that place,
and it's enabled.  Also, "Make Tag" appears in the menu.

Going from the applied patch to the unapplied one by the right click
results in having disabled "Pop patch" instead of the correct enabled
"Push patch".

Screenshots can be found at
http://red-bean.com/proski/qgit/

I found this comment in mainimpl.cpp:
  // call an async context popup, DO NOT filter out event
  // we append the event to main event loop queue so Qt can send
  // currentChanged() signal to listViewLog before our popup is
populated

I guess the code doesn't work the way the comment says.

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: qgit shows wrong popup
       [not found] ` <e5bfff550601120455p1b1654cx43beb684a3fd5dc7@mail.gmail.com>
@ 2006-01-13 17:41   ` Marco Costalba
  2006-01-13 21:06     ` Pavel Roskin
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Costalba @ 2006-01-13 17:41 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: git


>>I found this comment in mainimpl.cpp:
>>  // call an async context popup, DO NOT filter out event
>>  // we append the event to main event loop queue so Qt can send
>>  // currentChanged() signal to listViewLog before our popup is
>>populated
>>
>>I guess the code doesn't work the way the comment says.
>>
Hi Pavel,

please test the following an let me know if it is ok for you.

@@ -1378,9 +1378,21 @@ void MainImpl::customEvent(QCustomEvent*
  	if (e->type() == STATS_EV) // archive loading complete
  		loadComplete(((ThreadStatsEvent*)e)->data());

-	if (e->type() == POPUP_EV) // deferred popup
-		doContexPopup(listViewLog->currentItem());
-
+	if (e->type() == POPUP_EV) { // deferred popup
+		QListViewItem* item = listViewLog->currentItem();
+		if (item) {
+			// if mainview is already updated pop-up
+			// context menu, otherwise it means dispatch()
+			// has not been called til now, so resend the event,
+			// it will be queued up after dispatch.
+			if (item->text(COMMIT_COL) == mainViewSha)
+				doContexPopup(listViewLog->currentItem());
+			else {
+				DeferredPopupEvent* e = new DeferredPopupEvent();
+				QApplication::postEvent(this, e);
+			}
+		}
+	}
  	if (e->type() == POPUP_TREE_EV) // deferred tree popup
  		doTreeContexPopup(treeView->currentItem());



	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: qgit shows wrong popup
  2006-01-13 17:41   ` Marco Costalba
@ 2006-01-13 21:06     ` Pavel Roskin
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Roskin @ 2006-01-13 21:06 UTC (permalink / raw)
  To: Marco Costalba; +Cc: git

Hi, Marco!

On Fri, 2006-01-13 at 18:41 +0100, Marco Costalba wrote:
> please test the following an let me know if it is ok for you.

It works, but not the first time.  Suppose I have two unapplied patches
and one applied.  qgit focuses on the top unapplied patch on startup.
Right-click on the applied patch shows disabled "Push Patch".  Then I
select the top line again, right-click on the applied patch, and I see
enabled "Pop Patch".

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-13 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-11 23:21 qgit shows wrong popup Pavel Roskin
     [not found] ` <e5bfff550601120455p1b1654cx43beb684a3fd5dc7@mail.gmail.com>
2006-01-13 17:41   ` Marco Costalba
2006-01-13 21:06     ` Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).