3
# This file is part of Diamond.
5
# Diamond is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation, either version 3 of the License, or
8
# (at your option) any later version.
10
# Diamond is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with Diamond. If not, see <http://www.gnu.org/licenses/>.
21
class DataButtonsWidget(gtk.HBox):
23
__gsignals__ = { "revert" : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
24
"store" : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ())}
27
gtk.HBox.__gobject_init__(self)
28
revertButton = gtk.Button()
29
revertButton.set_label("Revert data")
30
revertButton.connect("clicked", self._revert)
32
storeButton = gtk.Button()
33
storeButton.set_label("Store data")
34
storeButton.connect("clicked", self._store)
36
self.pack_start(revertButton)
37
self.pack_end(storeButton)
41
def _revert(self, widget = None):
44
def _store(self, widget = None):
47
gobject.type_register(DataButtonsWidget)