~kelemeng/checkbox/bug868571

« back to all changes in this revision

Viewing changes to checkbox_gtk/gtk_interface.py

  • Committer: Marc Tardif
  • Date: 2008-08-13 20:04:12 UTC
  • Revision ID: marc.tardif@canonical.com-20080813200412-52u3d6fs6ulnxlgv
Renamed hwtest to checkbox.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#
4
4
# Written by Marc Tardif <marc@interunion.ca>
5
5
#
6
 
# This file is part of HWTest.
 
6
# This file is part of Checkbox.
7
7
#
8
 
# HWTest is free software: you can redistribute it and/or modify
 
8
# Checkbox is free software: you can redistribute it and/or modify
9
9
# it under the terms of the GNU General Public License as published by
10
10
# the Free Software Foundation, either version 3 of the License, or
11
11
# (at your option) any later version.
12
12
#
13
 
# HWTest is distributed in the hope that it will be useful,
 
13
# Checkbox is distributed in the hope that it will be useful,
14
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
16
# GNU General Public License for more details.
17
17
#
18
18
# You should have received a copy of the GNU General Public License
19
 
# along with HWTest.  If not, see <http://www.gnu.org/licenses/>.
 
19
# along with Checkbox.  If not, see <http://www.gnu.org/licenses/>.
20
20
#
21
21
import os.path, sys
22
22
import gtk, gtk.glade
23
23
 
24
24
from gettext import gettext as _
25
25
 
26
 
from hwtest.lib.environ import add_variable, remove_variable
 
26
from checkbox.lib.environ import add_variable, remove_variable
27
27
 
28
 
from hwtest.result import FAIL, PASS, SKIP
29
 
from hwtest.user_interface import UserInterface
 
28
from checkbox.result import FAIL, PASS, SKIP
 
29
from checkbox.user_interface import UserInterface
30
30
 
31
31
 
32
32
# HACK: Setting and unsetting previous and next buttons to workaround
53
53
        super(GTKInterface, self).__init__(config)
54
54
 
55
55
        # load UI
56
 
        gtk.window_set_default_icon_name("hwtest")
 
56
        gtk.window_set_default_icon_name("checkbox")
57
57
        gtk.glade.textdomain(self.gettext_domain)
58
58
        self.widgets = gtk.glade.XML(os.path.join(config.gtk_path,
59
 
            "hwtest-gtk.glade"))
 
59
            "checkbox-gtk.glade"))
60
60
        self.widgets.signal_autoconnect(self)
61
61
 
62
 
        self._dialog = self._get_widget("dialog_hwtest")
 
62
        self._dialog = self._get_widget("dialog_checkbox")
63
63
        self._dialog.set_title(config.title)
64
64
 
65
 
        self._notebook = self._get_widget("notebook_hwtest")
 
65
        self._notebook = self._get_widget("notebook_checkbox")
66
66
        self._handler_id = None
67
67
 
68
68
    def _get_widget(self, widget):
277
277
        while gtk.events_pending():
278
278
            gtk.main_iteration(False)
279
279
 
280
 
    def on_dialog_hwtest_delete(self, widget, event=None):
 
280
    def on_dialog_checkbox_delete(self, widget, event=None):
281
281
        sys.exit(0)
282
282
        return True