1
# -*- coding: utf-8 -*-
2
#####################################################################
3
# Rafael Proença <cypherbios@ubuntu.com>
4
# Laudeci Oliveira <laudeci@gmail.com>
6
# Copyright 2007 APTonCD DevTeam.
8
# This program is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published
10
# by the Free Software Foundation; version 2 only.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#####################################################################
21
from APTonCD.core import *
22
from APTonCD.core import gui
23
from APTonCD.core import constants
24
from APTonCD.widgets import *
26
WINDOW_NAME = 'dlgQuickGuide'
28
class QuickGuideDialog(controller.IController):
30
This class will show/ask/handle the adding media dialog
32
def __init__(self, controller = None):
36
self.controller = controller
37
self.glade = gui.get_glade(constants.PROPERTY_GUI, WINDOW_NAME)
40
self.window = gui.get_widget(self.glade, WINDOW_NAME)
41
self.window.set_icon_name(constants.APP_ICON_NAME)
44
self.chkShowStartup = gui.get_widget(self.glade, 'chkShowStartup')
45
self.cmdClose = gui.get_widget(self.glade, 'cmdClose')
48
self.window.set_transient_for(self.controller.get_main_window())
49
self.window.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
52
self.connect_signals()
53
self.window.set_modal(True)
56
return self.window.run()
61
def get_main_window(self):
63
implements IController interface method.
64
for access the class windows object.
67
return self.controller.get_main_window()
71
def get_parent_widget(self):
73
implements IController interface method.
77
self.controller.get_parent_widget()
79
return self.window.get_children()[0]
81
def connect_signals(self):
83
This procedure will connect widgets to its signal handler.
85
gui.connect(self.cmdClose, 'clicked', self.on_clicked)
87
def on_clicked(self, widget):
88
if widget == self.cmdClose:
91
def get_showstartup(self):
92
return self.chkShowStartup.get_active()