4
4
# Written by Marc Tardif <marc@interunion.ca>
6
# This file is part of HWTest.
6
# This file is part of Checkbox.
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.
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.
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/>.
21
21
import os.path, sys
22
22
import gtk, gtk.glade
24
24
from gettext import gettext as _
26
from hwtest.lib.environ import add_variable, remove_variable
26
from checkbox.lib.environ import add_variable, remove_variable
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
32
32
# HACK: Setting and unsetting previous and next buttons to workaround
53
53
super(GTKInterface, self).__init__(config)
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
"checkbox-gtk.glade"))
60
60
self.widgets.signal_autoconnect(self)
62
self._dialog = self._get_widget("dialog_hwtest")
62
self._dialog = self._get_widget("dialog_checkbox")
63
63
self._dialog.set_title(config.title)
65
self._notebook = self._get_widget("notebook_hwtest")
65
self._notebook = self._get_widget("notebook_checkbox")
66
66
self._handler_id = None
68
68
def _get_widget(self, widget):
277
277
while gtk.events_pending():
278
278
gtk.main_iteration(False)
280
def on_dialog_hwtest_delete(self, widget, event=None):
280
def on_dialog_checkbox_delete(self, widget, event=None):