Merge lp:~diegosarmentero/ubuntuone-control-panel/x-button into lp:ubuntuone-control-panel

Proposed by Diego Sarmentero
Status: Merged
Approved by: Diego Sarmentero
Approved revision: 377
Merged at revision: 377
Proposed branch: lp:~diegosarmentero/ubuntuone-control-panel/x-button
Merge into: lp:ubuntuone-control-panel
Diff against target: 47 lines (+2/-10)
2 files modified
ubuntuone/controlpanel/gui/qt/share_links.py (+2/-5)
ubuntuone/controlpanel/gui/qt/tests/test_share_links.py (+0/-5)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntuone-control-panel/x-button
Reviewer Review Type Date Requested Status
Michał Karnicki (community) Approve
dobey (community) Approve
Review via email: mp+132729@code.launchpad.net

Commit message

- Remove the text on x button pressed (LP: #1070917).

Description of the change

This wasn't working because the focusOutEvent was being fired before the button can detect the click, so the click over the button was actually never being executed.

To post a comment you must log in.
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Michał Karnicki (karni) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/controlpanel/gui/qt/share_links.py'
2--- ubuntuone/controlpanel/gui/qt/share_links.py 2012-11-01 17:57:13 +0000
3+++ ubuntuone/controlpanel/gui/qt/share_links.py 2012-11-02 17:19:19 +0000
4@@ -84,8 +84,6 @@
5 self._enhanced_line = EnhancedLineEdit(self.ui.line_search,
6 self._line_close_btn, icon=":/delete_search.png",
7 style='enhanced_borderless')
8- self.ui.line_search.popup.popupHidden.connect(
9- self._hide_line_btn_close_hide)
10 self.ui.line_search.popup.popupShown.connect(
11 self._hide_line_btn_close_show)
12 EnhancedLineEdit(self.ui.line_copy_link, self._copy_link_from_line,
13@@ -95,6 +93,8 @@
14 self.ui.back_to_file_list.setCursor(QtCore.Qt.PointingHandCursor)
15 self.ui.back_to_file_list_2.setCursor(QtCore.Qt.PointingHandCursor)
16 self.ui.open_in_browser.setCursor(QtCore.Qt.PointingHandCursor)
17+ self._enhanced_line.btn_operation.setCursor(
18+ QtCore.Qt.ArrowCursor)
19
20 self.ui.line_search.itemSelected.connect(self.share_file)
21 self.ui.line_search.filesFound.connect(self._load_search_results)
22@@ -248,9 +248,6 @@
23 self.ui.line_search.setText('')
24 self.ui.line_search.popup.hide()
25 self.ui.line_search.setFocus()
26-
27- def _hide_line_btn_close_hide(self):
28- """Hide the button inside the search line edit-"""
29 self._enhanced_line.btn_operation.hide()
30
31 def _hide_line_btn_close_show(self):
32
33=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_share_links.py'
34--- ubuntuone/controlpanel/gui/qt/tests/test_share_links.py 2012-10-29 13:34:33 +0000
35+++ ubuntuone/controlpanel/gui/qt/tests/test_share_links.py 2012-11-02 17:19:19 +0000
36@@ -171,11 +171,6 @@
37 self.addCleanup(self.ui.ui.line_search.popup.hide)
38 self.ui._line_close_btn()
39 self.assertFalse(self.ui.ui.line_search.popup.isVisible())
40-
41- def test_hide_line_btn_close_hide(self):
42- """Check the state of the inline button."""
43- self.ui._enhanced_line.btn_operation.show()
44- self.ui.ui.line_search.popup.popupHidden.emit()
45 self.assertFalse(self.ui._enhanced_line.btn_operation.isVisible())
46
47 def test_hide_line_btn_close_show(self):

Subscribers

People subscribed via source and target branches