remove no more used function
This commit is contained in:
parent
df895d4817
commit
90a4a348ca
|
@ -636,8 +636,7 @@ class ChangeStatusMessageDialog:
|
||||||
msg_text = status_message_to_save_as_preset.decode('utf-8')
|
msg_text = status_message_to_save_as_preset.decode('utf-8')
|
||||||
msg_text_1l = helpers.to_one_line(msg_text)
|
msg_text_1l = helpers.to_one_line(msg_text)
|
||||||
if not msg_name: # msg_name was ''
|
if not msg_name: # msg_name was ''
|
||||||
msg_name = msg_text_1l
|
msg_name = msg_text_1l.decode('utf-8')
|
||||||
msg_name = msg_name.decode('utf-8')
|
|
||||||
|
|
||||||
if msg_name in self.preset_messages_dict:
|
if msg_name in self.preset_messages_dict:
|
||||||
def on_ok2():
|
def on_ok2():
|
||||||
|
@ -1471,8 +1470,6 @@ class FTOverwriteConfirmationDialog(ConfirmationDialog):
|
||||||
class CommonInputDialog:
|
class CommonInputDialog:
|
||||||
'''Common Class for Input dialogs'''
|
'''Common Class for Input dialogs'''
|
||||||
def __init__(self, title, label_str, is_modal, ok_handler, cancel_handler):
|
def __init__(self, title, label_str, is_modal, ok_handler, cancel_handler):
|
||||||
# if modal is True you also need to call get_response()
|
|
||||||
# and ok_handler won't be used
|
|
||||||
self.dialog = self.xml.get_widget('input_dialog')
|
self.dialog = self.xml.get_widget('input_dialog')
|
||||||
label = self.xml.get_widget('label')
|
label = self.xml.get_widget('label')
|
||||||
self.dialog.set_title(title)
|
self.dialog.set_title(title)
|
||||||
|
@ -1480,14 +1477,14 @@ class CommonInputDialog:
|
||||||
self.cancel_handler = cancel_handler
|
self.cancel_handler = cancel_handler
|
||||||
|
|
||||||
self.is_modal = is_modal
|
self.is_modal = is_modal
|
||||||
if not is_modal and ok_handler is not None:
|
|
||||||
self.ok_handler = ok_handler
|
self.ok_handler = ok_handler
|
||||||
okbutton = self.xml.get_widget('okbutton')
|
okbutton = self.xml.get_widget('okbutton')
|
||||||
okbutton.connect('clicked', self.on_okbutton_clicked)
|
okbutton.connect('clicked', self.on_okbutton_clicked)
|
||||||
cancelbutton = self.xml.get_widget('cancelbutton')
|
cancelbutton = self.xml.get_widget('cancelbutton')
|
||||||
cancelbutton.connect('clicked', self.on_cancelbutton_clicked)
|
cancelbutton.connect('clicked', self.on_cancelbutton_clicked)
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
self.dialog.show_all()
|
self.dialog.show_all()
|
||||||
|
|
||||||
def on_input_dialog_destroy(self, widget):
|
def on_input_dialog_destroy(self, widget):
|
||||||
if self.cancel_handler:
|
if self.cancel_handler:
|
||||||
|
@ -1507,12 +1504,6 @@ class CommonInputDialog:
|
||||||
def on_cancelbutton_clicked(self, widget):
|
def on_cancelbutton_clicked(self, widget):
|
||||||
self.dialog.destroy()
|
self.dialog.destroy()
|
||||||
|
|
||||||
def get_response(self):
|
|
||||||
if self.is_modal:
|
|
||||||
response = self.dialog.run()
|
|
||||||
self.dialog.destroy()
|
|
||||||
return response
|
|
||||||
|
|
||||||
class InputDialog(CommonInputDialog):
|
class InputDialog(CommonInputDialog):
|
||||||
'''Class for Input dialog'''
|
'''Class for Input dialog'''
|
||||||
def __init__(self, title, label_str, input_str = None, is_modal = True,
|
def __init__(self, title, label_str, input_str = None, is_modal = True,
|
||||||
|
|
Loading…
Reference in New Issue