88
88
def set_options(self, watch_type):
89
89
""" Show the table with the right watch options. """
90
values = self.specto.watch_db.plugin_dict[watch_type].get_add_gui_info()
90
self.watch_options[watch_type] = []
91
if hasattr(self.specto.watch_db.plugin_dict[watch_type], 'get_add_gui_info'):
92
values = self.specto.watch_db.plugin_dict[watch_type].get_add_gui_info()
97
if self.specto.watch_db.plugin_dict[watch_type].dbus_watch == True:
99
self.refresh_unit.hide()
100
self.wTree.get_widget("label_refresh1").hide()
92
104
#create the options gui
93
self.table = gtk.Table(rows=len(values), columns=1, homogeneous=False)
94
self.table.set_row_spacings(6)
95
self.table.set_col_spacings(6)
96
self.watch_options[watch_type] = {}
99
for value, widget in values:
100
table, _widget = widget.get_widget()
101
self.table.attach(table, 0, 1, i, i + 1)
102
self.watch_options[watch_type].update({value: widget})
106
vbox = self.wTree.get_widget("vbox_watch_options")
107
vbox.pack_start(self.table, False, False, 0)
106
self.table = gtk.Table(rows=len(values), columns=1, homogeneous=False)
107
self.table.set_row_spacings(6)
108
self.table.set_col_spacings(6)
109
self.watch_options[watch_type] = {}
112
for value, widget in values:
113
table, _widget = widget.get_widget()
114
self.table.attach(table, 0, 1, i, i + 1)
115
self.watch_options[watch_type].update({value: widget})
119
vbox = self.wTree.get_widget("vbox_watch_options")
120
vbox.pack_start(self.table, False, False, 0)
109
122
def set_refresh_values(self, widget):
110
123
""" Set the max and min values for the refresh unit. """
159
172
values['open_command'] = ""
162
gui_values = self.specto.watch_db.plugin_dict[values['type']].get_add_gui_info()
175
if hasattr(self.specto.watch_db.plugin_dict[values['type']], 'get_add_gui_info'):
176
gui_values = self.specto.watch_db.plugin_dict[values['type']].get_add_gui_info()
163
177
window_options = self.watch_options[values['type']]
165
179
for key in window_options: