Skip to content

Commit

Permalink
Merge pull request #525 from VDuchon/multiline_custom_commands
Browse files Browse the repository at this point in the history
Allow multiline commands in Custom Commands plugin
  • Loading branch information
mattrose authored Nov 2, 2021
2 parents 65c630b + 0a4affe commit a9e4fcd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions terminatorlib/plugins/custom_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ def _create_command_dialog(self, enabled_var = False, name_var = "", command_var

label = Gtk.Label(label=_("Command:"))
table.attach(label, 0, 1, 2, 3)
command = Gtk.Entry()
command.set_text(command_var)
command = Gtk.TextView()
command.get_buffer().set_text(command_var)
table.attach(command, 1, 2, 2, 3)

dialog.vbox.pack_start(table, True, True, 0)
Expand All @@ -320,7 +320,7 @@ def on_new(self, button, data):
if res == Gtk.ResponseType.ACCEPT:
item['enabled'] = enabled.get_active()
item['name'] = name.get_text()
item['command'] = command.get_text()
item['command'] = command.get_buffer().get_text(command.get_buffer().get_start_iter(), command.get_buffer().get_end_iter(), True)
if item['name'] == '' or item['command'] == '':
err = Gtk.MessageDialog(dialog,
Gtk.DialogFlags.MODAL,
Expand Down Expand Up @@ -430,7 +430,7 @@ def on_edit(self, button, data):
if res == Gtk.ResponseType.ACCEPT:
item['enabled'] = enabled.get_active()
item['name'] = name.get_text()
item['command'] = command.get_text()
item['command'] = command.get_buffer().get_text(command.get_buffer().get_start_iter(), command.get_buffer().get_end_iter(), True)
if item['name'] == '' or item['command'] == '':
err = Gtk.MessageDialog(dialog,
Gtk.DialogFlags.MODAL,
Expand Down

0 comments on commit a9e4fcd

Please sign in to comment.