~ubuntu-branches/ubuntu/raring/software-center/raring-proposed

« back to all changes in this revision

Viewing changes to tests/gtk3/windows.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2012-12-06 17:30:50 UTC
  • Revision ID: package-import@ubuntu.com-20121206173050-n7mxi5fzlsvtdh9l
Tags: 5.5.2
* lp:~mvo/software-center/fix-pygobject-deprecation-warnings:
  - fix deprecation warninings with the latest python-gi
* lp:~mvo/software-center/minor-logging-fixes:
  - drop some LOG.info() messages to LOG.debug() to spam the user
    less
* lp:~mvo/software-center/trivial-close-ui-tweak:
  - hide the main window immediately when closing down
* lp:~mvo/software-center/5.4-fix-save-person-to-config:
  - This branch ensures that the "username" is saved everytime
    that the ubuntu sso whoami call is done
* lp:~mvo/software-center/use-dpkg-builddeps:
  - use dpkg-checkbuilddeps to find test-dependencies
* lp:~mvo/software-center/update-sc-cmdline-flexibility:
  - update-software-center-agent: 
    + add --target-db-path commandline
  - update-software-center: 
    + add --app-install-desktop-dir and --target-db-path commandline
* lp:~mvo/software-center/raring-pep8:
  - fixes for new pep8

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
import xapian
9
9
 
10
 
from gi.repository import Gdk, GObject, Gtk
 
10
from gi.repository import Gdk, Gtk, GLib
11
11
from mock import Mock
12
12
 
13
13
import softwarecenter.distro
177
177
                do_events()
178
178
 
179
179
    if widget.stamp:
180
 
        GObject.source_remove(widget.stamp)
181
 
    widget.stamp = GObject.timeout_add(250, _work)
 
180
        GLib.source_remove(widget.stamp)
 
181
    widget.stamp = GLib.timeout_add(250, _work)
182
182
 
183
183
 
184
184
def get_test_window_appview():
535
535
 
536
536
    # useful for debugging
537
537
    #d.connect("key-press-event", _on_key_press)
538
 
    #GObject.timeout_add_seconds(1, _generate_events, d)
 
538
    #GLib.timeout_add_seconds(1, _generate_events, d)
539
539
 
540
540
    widget = purchaseview.PurchaseView()
541
541
    widget.config = Mock()
913
913
    w.register_computer("", "This computer should be first")
914
914
    w.select_first()
915
915
 
916
 
    GObject.timeout_add_seconds(5, w.register_computer, "EEEEE", "NameE")
 
916
    GLib.timeout_add_seconds(5, w.register_computer, "EEEEE", "NameE")
917
917
 
918
918
    def print_selected_hostid(widget, hostid, hostname):
919
919
        print("%s selected for %s" % (hostid, hostname))
970
970
 
971
971
    win = get_test_window(child=spinner_notebook)
972
972
    spinner_notebook.show_spinner("Loading for 1s ...")
973
 
    GObject.timeout_add_seconds(1, lambda: spinner_notebook.hide_spinner())
 
973
    GLib.timeout_add_seconds(1, lambda: spinner_notebook.hide_spinner())
974
974
    return win
975
975
 
976
976
 
1146
1146
            if isinstance(result, Gtk.Dialog):
1147
1147
                response = result.run()
1148
1148
                result.hide()
1149
 
                GObject.timeout_add(1, Gtk.main_quit)
 
1149
                GLib.timeout_add(1, Gtk.main_quit)
1150
1150
            elif isinstance(result, Gtk.Window):
1151
1151
                result.connect("destroy", Gtk.main_quit)
1152
1152
            Gtk.main()