Merge lp:~costales/gui-ufw/renamed_object into lp:gui-ufw

Proposed by costales
Status: Merged
Merged at revision: 30
Proposed branch: lp:~costales/gui-ufw/renamed_object
Merge into: lp:gui-ufw
Prerequisite: lp:~costales/gui-ufw/force_fw_status
Diff against target: 668 lines (+121/-121)
5 files modified
gufw/gufw/view/add.py (+19/-19)
gufw/gufw/view/gufw.py (+70/-70)
gufw/gufw/view/listening.py (+4/-4)
gufw/gufw/view/preferences.py (+19/-19)
gufw/gufw/view/update.py (+9/-9)
To merge this branch: bzr merge lp:~costales/gui-ufw/renamed_object
Reviewer Review Type Date Requested Status
costales Pending
Review via email: mp+367307@code.launchpad.net

Description of the change

Not force FW status and rename object

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'gufw/gufw/view/add.py'
--- gufw/gufw/view/add.py 2019-05-01 08:45:59 +0000
+++ gufw/gufw/view/add.py 2019-05-11 17:52:09 +0000
@@ -100,7 +100,7 @@
100 self.advanced_iface.append_text(_("All Interfaces"))100 self.advanced_iface.append_text(_("All Interfaces"))
101 # Translators: About traffic101 # Translators: About traffic
102 self.advanced_routed.append_text(_("Not Forward"))102 self.advanced_routed.append_text(_("Not Forward"))
103 for ifaceName in self.gufw.fw.get_net_interfaces():103 for ifaceName in self.gufw.frontend.get_net_interfaces():
104 self.advanced_iface.append_text(ifaceName)104 self.advanced_iface.append_text(ifaceName)
105 self.advanced_routed.append_text(ifaceName)105 self.advanced_routed.append_text(ifaceName)
106 self.advanced_iface.set_active(0)106 self.advanced_iface.set_active(0)
@@ -108,7 +108,7 @@
108 self.advanced_log.set_active(0)108 self.advanced_log.set_active(0)
109 self.advanced_protocol.set_active(0)109 self.advanced_protocol.set_active(0)
110 110
111 if self.gufw.fw.get_policy('routed') == 'disabled':111 if self.gufw.frontend.get_policy('routed') == 'disabled':
112 self.advanced_routed_img.set_visible(False)112 self.advanced_routed_img.set_visible(False)
113 self.advanced_routed.set_visible(False)113 self.advanced_routed.set_visible(False)
114 114
@@ -164,16 +164,16 @@
164 return True # Overwrite event164 return True # Overwrite event
165 165
166 def _win_close(self):166 def _win_close(self):
167 self.gufw.show_add_btn.set_sensitive(self.gufw.fw.get_status())167 self.gufw.show_add_btn.set_sensitive(self.gufw.frontend.get_status())
168 self.gufw.edit_rule_btn.set_sensitive(self.gufw.fw.get_status())168 self.gufw.edit_rule_btn.set_sensitive(self.gufw.frontend.get_status())
169 self.gufw.report_rule_btn.set_sensitive(self.gufw.fw.get_status())169 self.gufw.report_rule_btn.set_sensitive(self.gufw.frontend.get_status())
170 self._hide_win()170 self._hide_win()
171 171
172 def on_copy_from_IP_clicked(self, widget, data=None):172 def on_copy_from_IP_clicked(self, widget, data=None):
173 self.advanced_from_ip.set_text(self.gufw.fw.get_internal_ip())173 self.advanced_from_ip.set_text(self.gufw.frontend.get_internal_ip())
174 174
175 def on_copy_to_IP_clicked(self, widget, data=None):175 def on_copy_to_IP_clicked(self, widget, data=None):
176 self.advanced_to_ip.set_text(self.gufw.fw.get_internal_ip())176 self.advanced_to_ip.set_text(self.gufw.frontend.get_internal_ip())
177 177
178 def on_copy_simple_to_advanced_clicked(self, widget, data=None):178 def on_copy_simple_to_advanced_clicked(self, widget, data=None):
179 self.advanced_rule_name.set_text(self.simple_rule_name.get_text())179 self.advanced_rule_name.set_text(self.simple_rule_name.get_text())
@@ -359,11 +359,11 @@
359 self.advanced_routed.set_tooltip_text(_("You need to set an Interface for forwarding to this another interface"))359 self.advanced_routed.set_tooltip_text(_("You need to set an Interface for forwarding to this another interface"))
360 360
361 # Not allow same iface when is routed361 # Not allow same iface when is routed
362 if self.gufw.fw.get_policy('routed') != 'disabled':362 if self.gufw.frontend.get_policy('routed') != 'disabled':
363 self.advanced_routed.remove_all()363 self.advanced_routed.remove_all()
364 # Translators: About traffic364 # Translators: About traffic
365 self.advanced_routed.append_text(_("Not Forward"))365 self.advanced_routed.append_text(_("Not Forward"))
366 for ifaceName in self.gufw.fw.get_net_interfaces(self.advanced_iface.get_active_text()):366 for ifaceName in self.gufw.frontend.get_net_interfaces(self.advanced_iface.get_active_text()):
367 self.advanced_routed.append_text(ifaceName)367 self.advanced_routed.append_text(ifaceName)
368 self.advanced_routed.set_active(0)368 self.advanced_routed.set_active(0)
369 369
@@ -378,7 +378,7 @@
378 self.warningbox.hide()378 self.warningbox.hide()
379 379
380 def on_btnAddRuleWin_clicked(self, widget, data=None):380 def on_btnAddRuleWin_clicked(self, widget, data=None):
381 if not self.gufw.fw.get_status():381 if not self.gufw.frontend.get_status():
382 self.gufw.show_dialog(self.win_add, _("Error: Firewall is disabled"), _("The firewall has to be enabled first"))382 self.gufw.show_dialog(self.win_add, _("Error: Firewall is disabled"), _("The firewall has to be enabled first"))
383 return383 return
384 384
@@ -399,10 +399,10 @@
399 from_port = from_split399 from_port = from_split
400 to_port = to_split400 to_port = to_split
401 if direction == 'both':401 if direction == 'both':
402 cmd = self.gufw.fw.add_rule(name, insert, policy, 'in', iface, routed, logging, proto, from_ip, from_port, to_ip, to_port)402 cmd = self.gufw.frontend.add_rule(name, insert, policy, 'in', iface, routed, logging, proto, from_ip, from_port, to_ip, to_port)
403 cmd = self.gufw.fw.add_rule(name, insert, policy, 'out', iface, routed, logging, proto, from_ip, from_port, to_ip, to_port)403 cmd = self.gufw.frontend.add_rule(name, insert, policy, 'out', iface, routed, logging, proto, from_ip, from_port, to_ip, to_port)
404 else:404 else:
405 cmd = self.gufw.fw.add_rule(name, insert, policy, direction, iface, routed, logging, proto, from_ip, from_port, to_ip, to_port)405 cmd = self.gufw.frontend.add_rule(name, insert, policy, direction, iface, routed, logging, proto, from_ip, from_port, to_ip, to_port)
406 406
407 if cmd[0]:407 if cmd[0]:
408 flag_Warning = True408 flag_Warning = True
@@ -422,7 +422,7 @@
422 self.gufw.set_statusbar_msg(_("Error: No rules added. Review the log"))422 self.gufw.set_statusbar_msg(_("Error: No rules added. Review the log"))
423 423
424 def _add_rule_preconfig(self):424 def _add_rule_preconfig(self):
425 self._add(self.gufw.fw.get_profile(), # profile425 self._add(self.gufw.frontend.get_profile(), # profile
426 self.preconfig_app.get_active_text(), # name426 self.preconfig_app.get_active_text(), # name
427 self.gufw.NUM2POLICY[self.preconfig_policy.get_active()], # policy427 self.gufw.NUM2POLICY[self.preconfig_policy.get_active()], # policy
428 self.gufw.NUM2DIRECTION[self.preconfig_direction.get_active()], # direction428 self.gufw.NUM2DIRECTION[self.preconfig_direction.get_active()], # direction
@@ -431,7 +431,7 @@
431 '', # from port431 '', # from port
432 '', # to IP432 '', # to IP
433 self.apps.get_app(self.preconfig_app.get_active_text())[1]) # to port[/proto][|port[/proto]]433 self.apps.get_app(self.preconfig_app.get_active_text())[1]) # to port[/proto][|port[/proto]]
434 self.gufw.print_rules(self.gufw.fw.get_rules())434 self.gufw.print_rules(self.gufw.frontend.get_rules())
435 435
436 def _add_rule_simple(self):436 def _add_rule_simple(self):
437 if not self.simple_port.get_text():437 if not self.simple_port.get_text():
@@ -442,7 +442,7 @@
442 self.gufw.show_dialog(self.win_add, _("Edward Snowden's Greatest Fear"), _('"Nothing Will Change"'))442 self.gufw.show_dialog(self.win_add, _("Edward Snowden's Greatest Fear"), _('"Nothing Will Change"'))
443 return443 return
444 444
445 self._add(self.gufw.fw.get_profile(), # profile445 self._add(self.gufw.frontend.get_profile(), # profile
446 self.simple_rule_name.get_text(), # name446 self.simple_rule_name.get_text(), # name
447 self.gufw.NUM2POLICY[self.simple_policy.get_active()], # policy447 self.gufw.NUM2POLICY[self.simple_policy.get_active()], # policy
448 self.gufw.NUM2DIRECTION[self.simple_direction.get_active()], # direction448 self.gufw.NUM2DIRECTION[self.simple_direction.get_active()], # direction
@@ -451,7 +451,7 @@
451 '', # from port451 '', # from port
452 '', # to IP452 '', # to IP
453 self.simple_port.get_text()) # to port453 self.simple_port.get_text()) # to port
454 self.gufw.print_rules(self.gufw.fw.get_rules())454 self.gufw.print_rules(self.gufw.frontend.get_rules())
455 455
456 def _add_rule_advanced(self):456 def _add_rule_advanced(self):
457 # Validations457 # Validations
@@ -478,7 +478,7 @@
478 to_ip = self.advanced_to_ip.get_text()478 to_ip = self.advanced_to_ip.get_text()
479 to_port = self.advanced_to_port.get_text()479 to_port = self.advanced_to_port.get_text()
480 480
481 self._add(self.gufw.fw.get_profile(), # profile481 self._add(self.gufw.frontend.get_profile(), # profile
482 self.advanced_rule_name.get_text(), # name482 self.advanced_rule_name.get_text(), # name
483 self.gufw.NUM2POLICY[self.advanced_policy.get_active()], # policy483 self.gufw.NUM2POLICY[self.advanced_policy.get_active()], # policy
484 self.gufw.NUM2DIRECTION[self.advanced_direction.get_active()], # direction484 self.gufw.NUM2DIRECTION[self.advanced_direction.get_active()], # direction
@@ -491,7 +491,7 @@
491 iface, # interface491 iface, # interface
492 routed, # routed492 routed, # routed
493 self.gufw.NUM2LOGGING[self.advanced_log.get_active()]) # logging 493 self.gufw.NUM2LOGGING[self.advanced_log.get_active()]) # logging
494 self.gufw.print_rules(self.gufw.fw.get_rules())494 self.gufw.print_rules(self.gufw.frontend.get_rules())
495495
496496
497class AppProfiles:497class AppProfiles:
498498
=== modified file 'gufw/gufw/view/gufw.py'
--- gufw/gufw/view/gufw.py 2019-05-11 17:52:08 +0000
+++ gufw/gufw/view/gufw.py 2019-05-11 17:52:09 +0000
@@ -70,7 +70,7 @@
70 2: 'log-all'}70 2: 'log-all'}
7171
72 def __init__(self, frontend):72 def __init__(self, frontend):
73 self.fw = frontend73 self.frontend = frontend
74 74
75 self.builder = Gtk.Builder()75 self.builder = Gtk.Builder()
76 self.builder.set_translation_domain('gufw')76 self.builder.set_translation_domain('gufw')
@@ -214,22 +214,22 @@
214 self.stack_vbox.pack_end(stack, True, True, 0)214 self.stack_vbox.pack_end(stack, True, True, 0)
215 215
216 def _set_initial_values(self):216 def _set_initial_values(self):
217 for profile in self.fw.get_all_profiles():217 for profile in self.frontend.get_all_profiles():
218 self.profile.append_text(profile)218 self.profile.append_text(profile)
219 self.profile.set_active(self.fw.get_all_profiles().index(self.fw.get_profile()))219 self.profile.set_active(self.frontend.get_all_profiles().index(self.frontend.get_profile()))
220 220
221 self.switchStatus.set_active(self.fw.get_status())221 self.switchStatus.set_active(self.frontend.get_status())
222 222
223 self.incoming.set_active(self.POLICY2NUM[self.fw.get_policy('incoming')])223 self.incoming.set_active(self.POLICY2NUM[self.frontend.get_policy('incoming')])
224 self.outgoing.set_active(self.POLICY2NUM[self.fw.get_policy('outgoing')])224 self.outgoing.set_active(self.POLICY2NUM[self.frontend.get_policy('outgoing')])
225 self.routed.set_active(self.POLICY2NUM[self.fw.get_policy('routed')])225 self.routed.set_active(self.POLICY2NUM[self.frontend.get_policy('routed')])
226 self.incoming.set_sensitive(self.fw.get_status())226 self.incoming.set_sensitive(self.frontend.get_status())
227 self.outgoing.set_sensitive(self.fw.get_status())227 self.outgoing.set_sensitive(self.frontend.get_status())
228 self.routed.set_sensitive(self.fw.get_status())228 self.routed.set_sensitive(self.frontend.get_status())
229 self.show_add_btn.set_sensitive(self.fw.get_status())229 self.show_add_btn.set_sensitive(self.frontend.get_status())
230 self.detele_rule_btn.set_sensitive(self.fw.get_status())230 self.detele_rule_btn.set_sensitive(self.frontend.get_status())
231 self.edit_rule_btn.set_sensitive(self.fw.get_status())231 self.edit_rule_btn.set_sensitive(self.frontend.get_status())
232 self.report_rule_btn.set_sensitive(self.fw.get_status())232 self.report_rule_btn.set_sensitive(self.frontend.get_status())
233 233
234 render_txt = Gtk.CellRendererText()234 render_txt = Gtk.CellRendererText()
235 235
@@ -282,7 +282,7 @@
282 282
283 self.listening = ListeningReport(self)283 self.listening = ListeningReport(self)
284 284
285 self.add_to_log(self.fw.get_log(), self.GRAY, False)285 self.add_to_log(self.frontend.get_log(), self.GRAY, False)
286 286
287 self._load_tutorial()287 self._load_tutorial()
288 288
@@ -291,11 +291,11 @@
291 self._restore_window_size(self.winMain)291 self._restore_window_size(self.winMain)
292 self.winMain.show_all()292 self.winMain.show_all()
293 293
294 if self.fw.get_policy('routed') == 'disabled':294 if self.frontend.get_policy('routed') == 'disabled':
295 self.routed_lbl.set_visible(False)295 self.routed_lbl.set_visible(False)
296 self.box_routed.set_visible(False)296 self.box_routed.set_visible(False)
297 297
298 self.print_rules(self.fw.get_rules(False))298 self.print_rules(self.frontend.get_rules(False))
299 299
300 self.btn_report_play.hide()300 self.btn_report_play.hide()
301301
@@ -372,11 +372,11 @@
372 self.show_dialog(self.winMain, _("Error"), _("Filename has not valid characters. Rename the file\nto only letters, numbers, dashes and underscores"))372 self.show_dialog(self.winMain, _("Error"), _("Filename has not valid characters. Rename the file\nto only letters, numbers, dashes and underscores"))
373 return373 return
374 374
375 if profile in self.fw.get_all_profiles():375 if profile in self.frontend.get_all_profiles():
376 self.set_statusbar_msg(_("Operation cancelled"))376 self.set_statusbar_msg(_("Operation cancelled"))
377 self.show_dialog(self.winMain, _("Profile already exists"), _("Delete it before from the Preferences Window or rename the file (the profile will be the filename)"))377 self.show_dialog(self.winMain, _("Profile already exists"), _("Delete it before from the Preferences Window or rename the file (the profile will be the filename)"))
378 else:378 else:
379 self.fw.import_profile(import_profile)379 self.frontend.import_profile(import_profile)
380 self.profile.append_text(profile)380 self.profile.append_text(profile)
381 self.add_to_log(_("Profile imported: ") + import_profile)381 self.add_to_log(_("Profile imported: ") + import_profile)
382 self.set_statusbar_msg(_("Profile imported, now you can choose it in the profiles"))382 self.set_statusbar_msg(_("Profile imported, now you can choose it in the profiles"))
@@ -391,7 +391,7 @@
391 if export_profile[-8:] != '.profile':391 if export_profile[-8:] != '.profile':
392 export_profile = export_profile + '.profile'392 export_profile = export_profile + '.profile'
393 393
394 self.fw.export_profile(export_profile)394 self.frontend.export_profile(export_profile)
395 self.add_to_log(_("Profile exported: ") + export_profile)395 self.add_to_log(_("Profile exported: ") + export_profile)
396 self.set_statusbar_msg(_("Profile exported"))396 self.set_statusbar_msg(_("Profile exported"))
397 397
@@ -407,10 +407,10 @@
407 Gtk.main_quit()407 Gtk.main_quit()
408 408
409 def _set_shield(self):409 def _set_shield(self):
410 if self.fw.get_status():410 if self.frontend.get_status():
411 file_shield = os.path.join('/usr/share/gufw/media/shields/', self.fw.get_policy('incoming').lower() + '_' + self.fw.get_policy('outgoing').lower() + '_' + self.fw.get_policy('routed').lower() + '.png')411 file_shield = os.path.join('/usr/share/gufw/media/shields/', self.frontend.get_policy('incoming').lower() + '_' + self.frontend.get_policy('outgoing').lower() + '_' + self.frontend.get_policy('routed').lower() + '.png')
412 else:412 else:
413 if self.fw.get_policy('routed') == 'disabled':413 if self.frontend.get_policy('routed') == 'disabled':
414 file_shield = os.path.join('/usr/share/gufw/media/shields/', 'disabled_disabled_disabled.png')414 file_shield = os.path.join('/usr/share/gufw/media/shields/', 'disabled_disabled_disabled.png')
415 else:415 else:
416 file_shield = os.path.join('/usr/share/gufw/media/shields/', 'disabled_disabled_enabled.png')416 file_shield = os.path.join('/usr/share/gufw/media/shields/', 'disabled_disabled_enabled.png')
@@ -419,20 +419,20 @@
419 def on_menu_reset_activate(self, widget, data=None):419 def on_menu_reset_activate(self, widget, data=None):
420 answer = self._show_question(self.winMain, _("Reset Firewall"), _("This will remove all rules in the current\nprofile and disable the firewall"), _("Do you want to continue?"))420 answer = self._show_question(self.winMain, _("Reset Firewall"), _("This will remove all rules in the current\nprofile and disable the firewall"), _("Do you want to continue?"))
421 if answer:421 if answer:
422 if self.fw.get_status():422 if self.frontend.get_status():
423 self.switchStatus.set_active(False)423 self.switchStatus.set_active(False)
424 self.fw.reset()424 self.frontend.reset()
425 self.add_to_log(_("Removed rules and reset firewall!"))425 self.add_to_log(_("Removed rules and reset firewall!"))
426 426
427 def on_btnLogRemove_clicked(self, widget, data=None):427 def on_btnLogRemove_clicked(self, widget, data=None):
428 self.fw.refresh_log()428 self.frontend.refresh_log()
429 self.log_txt.set_text('')429 self.log_txt.set_text('')
430 self.add_to_log(_("Gufw Log: Removed"))430 self.add_to_log(_("Gufw Log: Removed"))
431 self.set_statusbar_msg(_("Gufw Log removed"))431 self.set_statusbar_msg(_("Gufw Log removed"))
432 432
433 def on_btnLogCopy_clicked(self, widget, data=None):433 def on_btnLogCopy_clicked(self, widget, data=None):
434 self.clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)434 self.clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
435 self.clipboard.set_text(self.fw.get_log(), -1)435 self.clipboard.set_text(self.frontend.get_log(), -1)
436 self.set_statusbar_msg(_("Text copied to clipboard"))436 self.set_statusbar_msg(_("Text copied to clipboard"))
437 437
438 def on_donate_btn_clicked(self, widget, data=None):438 def on_donate_btn_clicked(self, widget, data=None):
@@ -472,32 +472,32 @@
472 preferenceswin = Preferences(self)472 preferenceswin = Preferences(self)
473 473
474 def on_incoming_changed(self, widget, data=None):474 def on_incoming_changed(self, widget, data=None):
475 self.fw.set_policy('incoming', self.NUM2POLICY[self.incoming.get_active()].lower())475 self.frontend.set_policy('incoming', self.NUM2POLICY[self.incoming.get_active()].lower())
476 self._set_shield()476 self._set_shield()
477 # Translators: Policy477 # Translators: Policy
478 self.add_to_log(_("Incoming: ") + self.incoming.get_active_text(), self.POLICY2COLOR[self.fw.get_policy('incoming')])478 self.add_to_log(_("Incoming: ") + self.incoming.get_active_text(), self.POLICY2COLOR[self.frontend.get_policy('incoming')])
479 self.set_statusbar_msg(_("Incoming policy changed"))479 self.set_statusbar_msg(_("Incoming policy changed"))
480 if self.fw.get_policy('incoming') != self.NUM2POLICY[self.incoming.get_active()].lower():480 if self.frontend.get_policy('incoming') != self.NUM2POLICY[self.incoming.get_active()].lower():
481 self.show_dialog(self.winMain, _("There was an error changing the incoming policy"), _("Restart your firewall to refresh to the real status\nand please report this bug"))481 self.show_dialog(self.winMain, _("There was an error changing the incoming policy"), _("Restart your firewall to refresh to the real status\nand please report this bug"))
482 482
483 def on_outgoing_changed(self, widget, data=None):483 def on_outgoing_changed(self, widget, data=None):
484 self.fw.set_policy('outgoing', self.NUM2POLICY[self.outgoing.get_active()].lower())484 self.frontend.set_policy('outgoing', self.NUM2POLICY[self.outgoing.get_active()].lower())
485 self._set_shield()485 self._set_shield()
486 self.add_to_log(_("Outgoing: ") + self.outgoing.get_active_text(), self.POLICY2COLOR[self.fw.get_policy('outgoing')])486 self.add_to_log(_("Outgoing: ") + self.outgoing.get_active_text(), self.POLICY2COLOR[self.frontend.get_policy('outgoing')])
487 self.set_statusbar_msg(_("Outgoing policy changed"))487 self.set_statusbar_msg(_("Outgoing policy changed"))
488 if self.fw.get_policy('outgoing') != self.NUM2POLICY[self.outgoing.get_active()].lower():488 if self.frontend.get_policy('outgoing') != self.NUM2POLICY[self.outgoing.get_active()].lower():
489 self.show_dialog(self.winMain, _("There was an error changing the outgoing policy"), _("Restart your firewall to refresh to the real status\nand please report this bug"))489 self.show_dialog(self.winMain, _("There was an error changing the outgoing policy"), _("Restart your firewall to refresh to the real status\nand please report this bug"))
490 490
491 def on_routed_changed(self, widget, data=None):491 def on_routed_changed(self, widget, data=None):
492 try: # Could be inconsistent between imports and changes of Routed status492 try: # Could be inconsistent between imports and changes of Routed status
493 self.fw.set_policy('routed', self.NUM2POLICY[self.routed.get_active()].lower())493 self.frontend.set_policy('routed', self.NUM2POLICY[self.routed.get_active()].lower())
494 except Exception:494 except Exception:
495 return495 return
496 self._set_shield()496 self._set_shield()
497 # Translators: Routed firewall changed497 # Translators: Routed firewall changed
498 self.add_to_log(_("Routed: ") + self.routed.get_active_text(), self.POLICY2COLOR[self.fw.get_policy('routed')])498 self.add_to_log(_("Routed: ") + self.routed.get_active_text(), self.POLICY2COLOR[self.frontend.get_policy('routed')])
499 self.set_statusbar_msg(_("Routed policy changed"))499 self.set_statusbar_msg(_("Routed policy changed"))
500 if self.fw.get_policy('routed') != self.NUM2POLICY[self.routed.get_active()].lower():500 if self.frontend.get_policy('routed') != self.NUM2POLICY[self.routed.get_active()].lower():
501 self.show_dialog(self.winMain, _("There was an error changing the routed policy"), _("Restart your firewall to refresh to the real status\nand please report this bug"))501 self.show_dialog(self.winMain, _("There was an error changing the routed policy"), _("Restart your firewall to refresh to the real status\nand please report this bug"))
502 502
503 def on_btnAddRule_clicked(self, widget, data=None):503 def on_btnAddRule_clicked(self, widget, data=None):
@@ -539,10 +539,10 @@
539 self.listening.set_pause(False)539 self.listening.set_pause(False)
540 540
541 def on_switchStatus_active_notify(self, widget, data=None):541 def on_switchStatus_active_notify(self, widget, data=None):
542 self.fw.set_status(self.switchStatus.get_active())542 self.frontend.set_status(self.switchStatus.get_active())
543 self.print_rules(self.fw.get_rules(False))543 self.print_rules(self.frontend.get_rules(False))
544 544
545 if self.fw.get_status():545 if self.frontend.get_status():
546 # Translators: About firewall546 # Translators: About firewall
547 self.add_to_log(_("Status: Enabled"), self.GREEN)547 self.add_to_log(_("Status: Enabled"), self.GREEN)
548 self.set_statusbar_msg(_("Firewall enabled"))548 self.set_statusbar_msg(_("Firewall enabled"))
@@ -551,15 +551,15 @@
551 self.add_to_log(_("Status: Disabled"), self.RED)551 self.add_to_log(_("Status: Disabled"), self.RED)
552 self.set_statusbar_msg(_("Firewall disabled"))552 self.set_statusbar_msg(_("Firewall disabled"))
553 553
554 self.incoming.set_sensitive(self.fw.get_status())554 self.incoming.set_sensitive(self.frontend.get_status())
555 self.outgoing.set_sensitive(self.fw.get_status())555 self.outgoing.set_sensitive(self.frontend.get_status())
556 self.routed.set_sensitive(self.fw.get_status())556 self.routed.set_sensitive(self.frontend.get_status())
557 self.show_add_btn.set_sensitive(self.fw.get_status())557 self.show_add_btn.set_sensitive(self.frontend.get_status())
558 self.detele_rule_btn.set_sensitive(self.fw.get_status())558 self.detele_rule_btn.set_sensitive(self.frontend.get_status())
559 self.edit_rule_btn.set_sensitive(self.fw.get_status())559 self.edit_rule_btn.set_sensitive(self.frontend.get_status())
560 self.report_rule_btn.set_sensitive(self.fw.get_status())560 self.report_rule_btn.set_sensitive(self.frontend.get_status())
561 self._set_shield()561 self._set_shield()
562 if self.fw.get_status() != self.switchStatus.get_active():562 if self.frontend.get_status() != self.switchStatus.get_active():
563 self.show_dialog(self.winMain, _("There was an error changing the firewall status"), _("Restart your firewall to refresh to the real status and please report this bug"))563 self.show_dialog(self.winMain, _("There was an error changing the firewall status"), _("Restart your firewall to refresh to the real status and please report this bug"))
564564
565 def on_btnDeleteRule_clicked(self, widget, data=None):565 def on_btnDeleteRule_clicked(self, widget, data=None):
@@ -574,16 +574,16 @@
574 total_rules = sorted(total_rules, key=int, reverse=True)574 total_rules = sorted(total_rules, key=int, reverse=True)
575 575
576 # Confirm?576 # Confirm?
577 if (self.fw.get_config_value('ConfirmDeteleRule') == 'yes') and (len(total_rules) > 0):577 if (self.frontend.get_config_value('ConfirmDeteleRule') == 'yes') and (len(total_rules) > 0):
578 answer = self._show_question(self.winMain, _("Delete rule"), _("You will delete all selected rules"), _("Do you want to continue?"))578 answer = self._show_question(self.winMain, _("Delete rule"), _("You will delete all selected rules"), _("Do you want to continue?"))
579 if not answer:579 if not answer:
580 return580 return
581 581
582 for row in total_rules:582 for row in total_rules:
583 rules_selected = True 583 rules_selected = True
584 rules_before = self.fw.get_rules()584 rules_before = self.frontend.get_rules()
585 cmd = self.fw.delete_rule(row)585 cmd = self.frontend.delete_rule(row)
586 rules_after = self.fw.get_rules()586 rules_after = self.frontend.get_rules()
587 587
588 if len(rules_before) != len(rules_after):588 if len(rules_before) != len(rules_after):
589 self.add_to_log(cmd[0])589 self.add_to_log(cmd[0])
@@ -594,7 +594,7 @@
594 self.set_statusbar_msg(_("Error. Review Gufw Log"))594 self.set_statusbar_msg(_("Error. Review Gufw Log"))
595 595
596 if rules_selected:596 if rules_selected:
597 self.print_rules(self.fw.get_rules())597 self.print_rules(self.frontend.get_rules())
598 else:598 else:
599 self.show_dialog(self.winMain, _("No rule selected"), _("You have to select a rule"))599 self.show_dialog(self.winMain, _("No rule selected"), _("You have to select a rule"))
600 600
@@ -638,15 +638,15 @@
638 updatewin = Update(self, ufw_row, description, cmd, policy, direction, proto, from_ip, from_port, to_ip, to_port, iface, routed, logging)638 updatewin = Update(self, ufw_row, description, cmd, policy, direction, proto, from_ip, from_port, to_ip, to_port, iface, routed, logging)
639639
640 def on_profile_changed(self, widget, data=None):640 def on_profile_changed(self, widget, data=None):
641 operation = self.fw.set_profile(self.profile.get_active_text())641 operation = self.frontend.set_profile(self.profile.get_active_text())
642 self.add_to_log(_("Changing profile: ") + self.profile.get_active_text())642 self.add_to_log(_("Changing profile: ") + self.profile.get_active_text())
643 643
644 self.incoming.set_active(self.POLICY2NUM[self.fw.get_policy('incoming')])644 self.incoming.set_active(self.POLICY2NUM[self.frontend.get_policy('incoming')])
645 self.outgoing.set_active(self.POLICY2NUM[self.fw.get_policy('outgoing')])645 self.outgoing.set_active(self.POLICY2NUM[self.frontend.get_policy('outgoing')])
646 self.routed.set_active(self.POLICY2NUM[self.fw.get_policy('routed')])646 self.routed.set_active(self.POLICY2NUM[self.frontend.get_policy('routed')])
647 self.switchStatus.set_active(self.fw.get_status())647 self.switchStatus.set_active(self.frontend.get_status())
648 648
649 self.print_rules(self.fw.get_rules())649 self.print_rules(self.frontend.get_rules())
650 650
651 for msg in operation:651 for msg in operation:
652 self.add_to_log(msg)652 self.add_to_log(msg)
@@ -687,11 +687,11 @@
687 return self.txt_tag_black687 return self.txt_tag_black
688 688
689 def add_to_log(self, msg, color=BLACK, force_save=True):689 def add_to_log(self, msg, color=BLACK, force_save=True):
690 if not self.fw.get_logging():690 if not self.frontend.get_logging():
691 return691 return
692 692
693 if force_save:693 if force_save:
694 new_line = self.fw.add_to_log(msg)694 new_line = self.frontend.add_to_log(msg)
695 self.log_txt.insert_with_tags(self.log_txt.get_start_iter(), new_line, self._get_log_color(color)) 695 self.log_txt.insert_with_tags(self.log_txt.get_start_iter(), new_line, self._get_log_color(color))
696 else:696 else:
697 self.log_txt.insert_with_tags(self.log_txt.get_end_iter(), msg, self._get_log_color(color)) 697 self.log_txt.insert_with_tags(self.log_txt.get_end_iter(), msg, self._get_log_color(color))
@@ -702,7 +702,7 @@
702 702
703 def print_rules(self, rules):703 def print_rules(self, rules):
704 self.rules_model.clear()704 self.rules_model.clear()
705 if not self.fw.get_status():705 if not self.frontend.get_status():
706 return706 return
707 707
708 row = 1708 row = 1
@@ -800,10 +800,10 @@
800 800
801 width = 0801 width = 0
802 height = 0802 height = 0
803 if self.fw.get_config_value('WindowWidth'):803 if self.frontend.get_config_value('WindowWidth'):
804 width = int(self.fw.get_config_value('WindowWidth'))804 width = int(self.frontend.get_config_value('WindowWidth'))
805 if self.fw.get_config_value('WindowHeight'):805 if self.frontend.get_config_value('WindowHeight'):
806 height = int(self.fw.get_config_value('WindowHeight'))806 height = int(self.frontend.get_config_value('WindowHeight'))
807 807
808 if width >= Gdk.Screen.width() and height >= Gdk.Screen.height():808 if width >= Gdk.Screen.width() and height >= Gdk.Screen.height():
809 win.maximize()809 win.maximize()
@@ -812,8 +812,8 @@
812 812
813 def _save_window_size(self, win):813 def _save_window_size(self, win):
814 width, height = win.get_size()814 width, height = win.get_size()
815 self.fw.set_config_value('WindowWidth', str(width))815 self.frontend.set_config_value('WindowWidth', str(width))
816 self.fw.set_config_value('WindowHeight', str(height))816 self.frontend.set_config_value('WindowHeight', str(height))
817 817
818 def validate_rule(self, win, from_ip, from_port, to_ip, to_port, insert='', routed=''):818 def validate_rule(self, win, from_ip, from_port, to_ip, to_port, insert='', routed=''):
819 # At least 1 Port/IP819 # At least 1 Port/IP
@@ -826,7 +826,7 @@
826 insert_into = 0826 insert_into = 0
827 else:827 else:
828 insert_into = int(insert)828 insert_into = int(insert)
829 if insert_into > 0 and insert_into > self.fw.get_number_rules():829 if insert_into > 0 and insert_into > self.frontend.get_number_rules():
830 self.show_dialog(win, _("Insert number bigger that number of rules"), _("By example, if you have 3 rules, you can't insert a rule into position 4"))830 self.show_dialog(win, _("Insert number bigger that number of rules"), _("By example, if you have 3 rules, you can't insert a rule into position 4"))
831 return False831 return False
832 832
833833
=== modified file 'gufw/gufw/view/listening.py'
--- gufw/gufw/view/listening.py 2019-05-01 08:45:59 +0000
+++ gufw/gufw/view/listening.py 2019-05-11 17:52:09 +0000
@@ -34,8 +34,8 @@
34 34
35 self._show_report()35 self._show_report()
36 36
37 if self.gufw.fw.get_config_value('RefreshInterval'):37 if self.gufw.frontend.get_config_value('RefreshInterval'):
38 time = int(self.gufw.fw.get_config_value('RefreshInterval'))38 time = int(self.gufw.frontend.get_config_value('RefreshInterval'))
39 else:39 else:
40 time = REFRESH_TIME40 time = REFRESH_TIME
41 GLib.timeout_add((time * 1000), self._show_report)41 GLib.timeout_add((time * 1000), self._show_report)
@@ -44,7 +44,7 @@
44 if not self.running_listening:44 if not self.running_listening:
45 return False45 return False
46 46
47 report = self.gufw.fw.get_listening_report()47 report = self.gufw.frontend.get_listening_report()
48 self._view_report(report, self.previous_report)48 self._view_report(report, self.previous_report)
49 self.previous_report = report49 self.previous_report = report
50 50
@@ -85,7 +85,7 @@
85 self.gufw.listening_model.set_value(iter_row, 3, line_split[3].strip()) # app85 self.gufw.listening_model.set_value(iter_row, 3, line_split[3].strip()) # app
86 self.gufw.listening_model.set_value(iter_row, 5, row) # number86 self.gufw.listening_model.set_value(iter_row, 5, row) # number
87 87
88 if self.gufw.fw.get_status():88 if self.gufw.frontend.get_status():
89 if line_split[4] == 'allow':89 if line_split[4] == 'allow':
90 self.gufw.listening_model.set_value(iter_row, 4, self.gufw.RED)90 self.gufw.listening_model.set_value(iter_row, 4, self.gufw.RED)
91 elif line_split[4] == 'deny':91 elif line_split[4] == 'deny':
9292
=== modified file 'gufw/gufw/view/preferences.py'
--- gufw/gufw/view/preferences.py 2019-05-01 08:45:59 +0000
+++ gufw/gufw/view/preferences.py 2019-05-11 17:52:09 +0000
@@ -60,20 +60,20 @@
60 self.list_selection = self.builder.get_object('profiles_selection')60 self.list_selection = self.builder.get_object('profiles_selection')
61 61
62 def _set_initial_values(self):62 def _set_initial_values(self):
63 self.ufw_logging.set_active(UFW_LEVEL2NUM[self.gufw.fw.get_ufw_logging()])63 self.ufw_logging.set_active(UFW_LEVEL2NUM[self.gufw.frontend.get_ufw_logging()])
64 if self.gufw.fw.get_logging():64 if self.gufw.frontend.get_logging():
65 self.gufw_logging.set_active(True)65 self.gufw_logging.set_active(True)
66 if self.gufw.fw.get_config_value('ConfirmDeteleRule') == 'yes':66 if self.gufw.frontend.get_config_value('ConfirmDeteleRule') == 'yes':
67 self.gufw_confirm_delete.set_active(True)67 self.gufw_confirm_delete.set_active(True)
68 68
69 if self.gufw.fw.get_config_value('RefreshInterval'):69 if self.gufw.frontend.get_config_value('RefreshInterval'):
70 self.report_interval.set_value(int(self.gufw.fw.get_config_value('RefreshInterval')))70 self.report_interval.set_value(int(self.gufw.frontend.get_config_value('RefreshInterval')))
71 else:71 else:
72 self.report_interval.set_value(3)72 self.report_interval.set_value(3)
73 73
74 # Profiles (model)74 # Profiles (model)
75 self.profile_rows = Gtk.ListStore(str)75 self.profile_rows = Gtk.ListStore(str)
76 for profile in self.gufw.fw.get_all_profiles():76 for profile in self.gufw.frontend.get_all_profiles():
77 self.profile_rows.append([profile])77 self.profile_rows.append([profile])
78 self.list_profiles.set_model(self.profile_rows)78 self.list_profiles.set_model(self.profile_rows)
79 # Profiles (Editable one column)79 # Profiles (Editable one column)
@@ -109,11 +109,11 @@
109 return109 return
110 # Not the default110 # Not the default
111 previous_name = self.profile_rows[path][0]111 previous_name = self.profile_rows[path][0]
112 if previous_name == self.gufw.fw.get_profile():112 if previous_name == self.gufw.frontend.get_profile():
113 self.gufw.show_dialog(self.win_preferences, _("Current profile"), _("You can't rename the current profile"))113 self.gufw.show_dialog(self.win_preferences, _("Current profile"), _("You can't rename the current profile"))
114 return114 return
115 115
116 self.gufw.fw.rename_profile(self.profile_rows[path][0], new_name)116 self.gufw.frontend.rename_profile(self.profile_rows[path][0], new_name)
117 self.profile_rows[path][0] = new_name117 self.profile_rows[path][0] = new_name
118 self.gufw.profile.remove(int(path))118 self.gufw.profile.remove(int(path))
119 self.gufw.profile.insert_text(int(path), new_name)119 self.gufw.profile.insert_text(int(path), new_name)
@@ -131,8 +131,8 @@
131 exist_profile = True131 exist_profile = True
132 break # Next ind132 break # Next ind
133 133
134 self.gufw.fw.add_profile(new_name)134 self.gufw.frontend.add_profile(new_name)
135 ind = self.gufw.fw.get_all_profiles().index(new_name)135 ind = self.gufw.frontend.get_all_profiles().index(new_name)
136 self.profile_rows.append([new_name])136 self.profile_rows.append([new_name])
137 self.gufw.profile.append_text(new_name)137 self.gufw.profile.append_text(new_name)
138 self.gufw.add_to_log(_("Created Profile: ") + new_name)138 self.gufw.add_to_log(_("Created Profile: ") + new_name)
@@ -143,32 +143,32 @@
143 self.gufw.show_dialog(self.win_preferences, _("Select a profile"), _("You need to select a profile for deleting"))143 self.gufw.show_dialog(self.win_preferences, _("Select a profile"), _("You need to select a profile for deleting"))
144 else:144 else:
145 deleted_profile = model.get_value(treeiter, 0)145 deleted_profile = model.get_value(treeiter, 0)
146 if deleted_profile == self.gufw.fw.get_profile():146 if deleted_profile == self.gufw.frontend.get_profile():
147 self.gufw.show_dialog(self.win_preferences, _("Profile not erasable"), _("You can't remove the current profile"))147 self.gufw.show_dialog(self.win_preferences, _("Profile not erasable"), _("You can't remove the current profile"))
148 else:148 else:
149 self.gufw.profile.remove(self.gufw.fw.get_all_profiles().index(deleted_profile))149 self.gufw.profile.remove(self.gufw.frontend.get_all_profiles().index(deleted_profile))
150 self.gufw.fw.delete_profile(deleted_profile)150 self.gufw.frontend.delete_profile(deleted_profile)
151 self.profile_rows.remove(treeiter)151 self.profile_rows.remove(treeiter)
152 self.gufw.add_to_log(_("Deleted Profile: ") + deleted_profile)152 self.gufw.add_to_log(_("Deleted Profile: ") + deleted_profile)
153 153
154 def on_ufw_logging_changed(self, widget, data=None):154 def on_ufw_logging_changed(self, widget, data=None):
155 self.gufw.fw.set_ufw_logging(NUM2UFW_LEVEL[self.ufw_logging.get_active()])155 self.gufw.frontend.set_ufw_logging(NUM2UFW_LEVEL[self.ufw_logging.get_active()])
156 self.gufw.add_to_log(_("ufw Logging: ") + self.ufw_logging.get_active_text())156 self.gufw.add_to_log(_("ufw Logging: ") + self.ufw_logging.get_active_text())
157 157
158 def on_gufw_logging_toggled(self, widget, data=None):158 def on_gufw_logging_toggled(self, widget, data=None):
159 if self.gufw_logging.get_active():159 if self.gufw_logging.get_active():
160 self.gufw.fw.set_logging(True)160 self.gufw.frontend.set_logging(True)
161 self.gufw.add_to_log(_("Gufw Logging: Enabled"))161 self.gufw.add_to_log(_("Gufw Logging: Enabled"))
162 else:162 else:
163 self.gufw.add_to_log(_("Gufw Logging: Disabled"))163 self.gufw.add_to_log(_("Gufw Logging: Disabled"))
164 self.gufw.fw.set_logging(False)164 self.gufw.frontend.set_logging(False)
165 165
166 def on_gufw_confirm_delete_toggled(self, widget, data=None):166 def on_gufw_confirm_delete_toggled(self, widget, data=None):
167 if self.gufw_confirm_delete.get_active():167 if self.gufw_confirm_delete.get_active():
168 self.gufw.fw.set_config_value('ConfirmDeteleRule', 'yes')168 self.gufw.frontend.set_config_value('ConfirmDeteleRule', 'yes')
169 self.gufw.add_to_log(_("Confirm Delete Dialog: Enabled"))169 self.gufw.add_to_log(_("Confirm Delete Dialog: Enabled"))
170 else:170 else:
171 self.gufw.fw.set_config_value('ConfirmDeteleRule', 'no')171 self.gufw.frontend.set_config_value('ConfirmDeteleRule', 'no')
172 self.gufw.add_to_log(_("Confirm Delete Dialog: Disabled"))172 self.gufw.add_to_log(_("Confirm Delete Dialog: Disabled"))
173 173
174 def on_close_btn_clicked(self, widget, data=None):174 def on_close_btn_clicked(self, widget, data=None):
@@ -179,6 +179,6 @@
179 179
180 def on_report_interval_scale_button_release_event(self, widget, data=None):180 def on_report_interval_scale_button_release_event(self, widget, data=None):
181 refresh_time = int(self.report_interval.get_value())181 refresh_time = int(self.report_interval.get_value())
182 self.gufw.fw.set_config_value('RefreshInterval', refresh_time)182 self.gufw.frontend.set_config_value('RefreshInterval', refresh_time)
183 # Translators: Refresh the live traffic on GUI183 # Translators: Refresh the live traffic on GUI
184 self.gufw.add_to_log(_("Refresh Interval: ") + str(refresh_time) + '"')184 self.gufw.add_to_log(_("Refresh Interval: ") + str(refresh_time) + '"')
185185
=== modified file 'gufw/gufw/view/update.py'
--- gufw/gufw/view/update.py 2019-05-01 08:45:59 +0000
+++ gufw/gufw/view/update.py 2019-05-11 17:52:09 +0000
@@ -63,7 +63,7 @@
63 self.builder.connect_signals(self)63 self.builder.connect_signals(self)
64 self.win_update.show_all()64 self.win_update.show_all()
65 65
66 if self.gufw.fw.get_policy('routed') == 'disabled':66 if self.gufw.frontend.get_policy('routed') == 'disabled':
67 self.update_routed_img.set_visible(False)67 self.update_routed_img.set_visible(False)
68 self.update_routed.set_visible(False)68 self.update_routed.set_visible(False)
69 69
@@ -103,7 +103,7 @@
103 # Translators: About the network interfaces in the OS103 # Translators: About the network interfaces in the OS
104 self.update_iface.append_text(_("All Interfaces"))104 self.update_iface.append_text(_("All Interfaces"))
105 self.update_routed.append_text(_("Not Forward"))105 self.update_routed.append_text(_("Not Forward"))
106 for ifaceName in self.gufw.fw.get_net_interfaces():106 for ifaceName in self.gufw.frontend.get_net_interfaces():
107 self.update_iface.append_text(ifaceName)107 self.update_iface.append_text(ifaceName)
108 self.update_routed.append_text(ifaceName)108 self.update_routed.append_text(ifaceName)
109 if ifaceName == self.rule_iface:109 if ifaceName == self.rule_iface:
@@ -165,10 +165,10 @@
165 self.win_update.destroy()165 self.win_update.destroy()
166 166
167 def on_update_copy_from_IP_clicked(self, widget, data=None):167 def on_update_copy_from_IP_clicked(self, widget, data=None):
168 self.update_from_ip.set_text(self.gufw.fw.get_internal_ip())168 self.update_from_ip.set_text(self.gufw.frontend.get_internal_ip())
169 169
170 def on_update_copy_to_IP_clicked(self, widget, data=None):170 def on_update_copy_to_IP_clicked(self, widget, data=None):
171 self.update_to_ip.set_text(self.gufw.fw.get_internal_ip())171 self.update_to_ip.set_text(self.gufw.frontend.get_internal_ip())
172 172
173 def on_update_rule_name_icon_press(self, widget, data=None, data2=None):173 def on_update_rule_name_icon_press(self, widget, data=None, data2=None):
174 self.update_rule_name.set_text('')174 self.update_rule_name.set_text('')
@@ -195,11 +195,11 @@
195 self.update_routed.set_tooltip_text(_("You need to set an Interface for forwarding to this another interface"))195 self.update_routed.set_tooltip_text(_("You need to set an Interface for forwarding to this another interface"))
196 196
197 # Not allow same iface when is routed197 # Not allow same iface when is routed
198 if self.gufw.fw.get_policy('routed') != 'disabled':198 if self.gufw.frontend.get_policy('routed') != 'disabled':
199 self.update_routed.remove_all()199 self.update_routed.remove_all()
200 # Translators: About traffic200 # Translators: About traffic
201 self.update_routed.append_text(_("Not Forward"))201 self.update_routed.append_text(_("Not Forward"))
202 for ifaceName in self.gufw.fw.get_net_interfaces(self.update_iface.get_active_text()):202 for ifaceName in self.gufw.frontend.get_net_interfaces(self.update_iface.get_active_text()):
203 self.update_routed.append_text(ifaceName)203 self.update_routed.append_text(ifaceName)
204 self.update_routed.set_active(0)204 self.update_routed.set_active(0)
205 205
@@ -254,17 +254,17 @@
254 # Delete the same rules254 # Delete the same rules
255 same_rules_rows = self._get_same_rules(self.rule_cmd)255 same_rules_rows = self._get_same_rules(self.rule_cmd)
256 for same_row in same_rules_rows:256 for same_row in same_rules_rows:
257 cmd = self.gufw.fw.delete_rule(same_row)257 cmd = self.gufw.frontend.delete_rule(same_row)
258 self.gufw.add_to_log(_("Editing rule (Removing): ") + new_description + ' | ' + cmd[0] + ' > ' + cmd[1].replace('\n', ' | '))258 self.gufw.add_to_log(_("Editing rule (Removing): ") + new_description + ' | ' + cmd[0] + ' > ' + cmd[1].replace('\n', ' | '))
259 259
260 # Add new260 # Add new
261 insert_row = ''261 insert_row = ''
262 cmd = self.gufw.fw.add_rule(new_description, insert_row, new_policy, new_direction, new_iface, new_routed, new_logging, new_proto, new_from_ip, new_from_port, new_to_ip, new_to_port)262 cmd = self.gufw.frontend.add_rule(new_description, insert_row, new_policy, new_direction, new_iface, new_routed, new_logging, new_proto, new_from_ip, new_from_port, new_to_ip, new_to_port)
263263
264 self.gufw.add_to_log(_("Editing rule (Adding): ") + new_description + ' | ' + cmd[1] + ' > ' + cmd[2].replace('\n', ' | '), self.gufw.POLICY2COLOR[new_policy])264 self.gufw.add_to_log(_("Editing rule (Adding): ") + new_description + ' | ' + cmd[1] + ' > ' + cmd[2].replace('\n', ' | '), self.gufw.POLICY2COLOR[new_policy])
265 self.gufw.set_statusbar_msg(_("Updated rule ") + str(self.ufw_row))265 self.gufw.set_statusbar_msg(_("Updated rule ") + str(self.ufw_row))
266 266
267 self.gufw.print_rules(self.gufw.fw.get_rules())267 self.gufw.print_rules(self.gufw.frontend.get_rules())
268 self.win_update.destroy()268 self.win_update.destroy()
269 269
270 def _get_same_rules(self, rule_cmd):270 def _get_same_rules(self, rule_cmd):

Subscribers

People subscribed via source and target branches

to all changes: