Merge lp:~thisfred/ubuntuone-control-panel/attention-seeking into lp:ubuntuone-control-panel

Proposed by Eric Casteleijn
Status: Merged
Approved by: Eric Casteleijn
Approved revision: 99
Merged at revision: 94
Proposed branch: lp:~thisfred/ubuntuone-control-panel/attention-seeking
Merge into: lp:ubuntuone-control-panel
Diff against target: 48 lines (+12/-4)
2 files modified
bin/ubuntuone-control-panel-gtk (+4/-2)
ubuntuone/controlpanel/gtk/gui.py (+8/-2)
To merge this branch: bzr merge lp:~thisfred/ubuntuone-control-panel/attention-seeking
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+52131@code.launchpad.net

Commit message

Adds a command line option (--alert) to open the window with an urgency hint

Description of the change

Adds a command line option (--alert) to open the window with an urgency hint

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

The --alert option should be a boolean option. Right now, I can't use it without an explicit argument:

ubuntuone-control-panel-gtk: error: --alert option requires an argument
nessita@dali:~/canonical/u1/cp/review_attention-seeking$ DEBUG=True PYTHONPATH=. ./bin/ubuntuone-control-panel-gtk --alert
Usage: ubuntuone-control-panel-gtk [option]

ubuntuone-control-panel-gtk: error: --alert option requires an argument

Can you please fix that?

review: Needs Fixing
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Fixed in r98

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Here we go!

review: Approve
Revision history for this message
Manuel de la Peña (mandel) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (8.6 KiB)

The attempt to merge lp:~thisfred/ubuntuone-control-panel/attention-seeking into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

Running test suite for ubuntuone/controlpanel/tests
Xlib: extension "RANDR" missing on display ":99".
ubuntuone.controlpanel.tests.test_backend
  BackendAccountTestCase
    test_account_info ... [OK]
    test_account_info_fails ... [OK]
    test_account_info_with_current_plan ... [OK]
    test_backend_creation ... [OK]
    test_device_is_local ... [OK]
    test_get_token ... [OK]
  BackendBasicTestCase
    test_backend_creation ... [OK]
    test_device_is_local ... [OK]
    test_get_token ... [OK]
  BackendDevicesTestCase
    test_backend_creation ... [OK]
    test_change_download_speed_limit ... [OK]
    test_change_limit_bandwidth ... [OK]
    test_change_show_all_notifications ... [OK]
    test_change_upload_speed_limit ... [OK]
    test_changing_settings_for_wrong_id_has_no_effect ... [OK]
    test_device_is_local ... [OK]
    test_devices_info ... [OK]
    test_devices_info_fails ... [OK]
    test_get_token ... [OK]
    test_remove_device ... [OK]
    test_remove_device_clear_credentials_if_local_device ... [OK]
    test_remove_device_fails ... [OK]
  BackendFileSyncOpsTestCase
    test_backend_creation ... [OK]
    test_connect_files ... [OK]
    test_device_is_local ... [OK]
    test_disable_files ... [OK]
    test_disconnect_files ... [OK]
    test_enable_files ... [OK]
    test_get_token ... [OK]
    test_restart_files ... [OK]
    test_start_files ... [OK]
    test_stop_files ... [OK]
  BackendReplicationsTestCase
    test_backend_creation ... [OK]
    test_change_replication_settings ... [OK]
    test_change_replication_settings_no_set...

Read more...

99. By Eric Casteleijn

no XXX allowed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/ubuntuone-control-panel-gtk'
--- bin/ubuntuone-control-panel-gtk 2011-01-21 17:46:49 +0000
+++ bin/ubuntuone-control-panel-gtk 2011-03-07 19:53:08 +0000
@@ -40,12 +40,14 @@
40 help="Start the Ubuntu One Control Panel (GTK) in the "40 help="Start the Ubuntu One Control Panel (GTK) in the "
41 "PANEL_NAME tab. Possible values are: "41 "PANEL_NAME tab. Possible values are: "
42 "dashboard, volumes, devices, applications")42 "dashboard, volumes, devices, applications")
43 result.add_option("-a", "--alert", dest="alert", action="store_true",
44 help="Start the Ubuntu One Control Panel (GTK) alerting "
45 "the user to its presence.")
43 return result46 return result
4447
4548
46if __name__ == "__main__":49if __name__ == "__main__":
47 parser = parser_options()50 parser = parser_options()
48 (options, args) = parser.parse_args(sys.argv)51 (options, args) = parser.parse_args(sys.argv)
4952 gui = ControlPanelWindow(switch_to=options.switch_to, alert=options.alert)
50 gui = ControlPanelWindow(switch_to=options.switch_to)
51 gui.main()53 gui.main()
5254
=== modified file 'ubuntuone/controlpanel/gtk/gui.py'
--- ubuntuone/controlpanel/gtk/gui.py 2011-03-04 13:47:35 +0000
+++ ubuntuone/controlpanel/gtk/gui.py 2011-03-07 19:53:08 +0000
@@ -1495,7 +1495,7 @@
14951495
1496 TITLE = _('%(app_name)s Control Panel')1496 TITLE = _('%(app_name)s Control Panel')
14971497
1498 def __init__(self, switch_to=None):1498 def __init__(self, switch_to=None, alert=False):
1499 super(ControlPanelWindow, self).__init__()1499 super(ControlPanelWindow, self).__init__()
15001500
1501 self.set_title(self.TITLE % {'app_name': U1_APP_NAME})1501 self.set_title(self.TITLE % {'app_name': U1_APP_NAME})
@@ -1504,7 +1504,13 @@
1504 self.set_size_request(-1, 525) # bug #6831641504 self.set_size_request(-1, 525) # bug #683164
15051505
1506 self.connect('delete-event', lambda w, e: gtk.main_quit())1506 self.connect('delete-event', lambda w, e: gtk.main_quit())
1507 self.show()1507 if alert:
1508 print "YES"
1509 # NOTE this should prevent focus stealing but it does not :(
1510 self.present_with_time(1)
1511 self.set_urgency_hint(True)
1512 else:
1513 self.present()
15081514
1509 self.control_panel = ControlPanel(main_window=self)1515 self.control_panel = ControlPanel(main_window=self)
1510 self.add(self.control_panel)1516 self.add(self.control_panel)

Subscribers

People subscribed via source and target branches