develop #2
|
@ -157,9 +157,7 @@ class Controller(WidgetFileActionMixin, PaneMixin, WindowMixin, ShowHideMixin, \
|
||||||
if action == "empty_trash":
|
if action == "empty_trash":
|
||||||
self.empty_trash()
|
self.empty_trash()
|
||||||
|
|
||||||
|
|
||||||
if action == "create":
|
if action == "create":
|
||||||
self.create_files()
|
self.create_files()
|
||||||
self.hide_new_file_menu()
|
|
||||||
|
|
||||||
self.ctrlDown = False
|
self.ctrlDown = False
|
||||||
|
|
|
@ -16,7 +16,6 @@ class ShowHideMixin:
|
||||||
def stop_file_searching(self, widget=None, eve=None):
|
def stop_file_searching(self, widget=None, eve=None):
|
||||||
self.is_searching = False
|
self.is_searching = False
|
||||||
|
|
||||||
|
|
||||||
def show_exists_page(self, widget=None, eve=None):
|
def show_exists_page(self, widget=None, eve=None):
|
||||||
response = self.file_exists_dialog.run()
|
response = self.file_exists_dialog.run()
|
||||||
self.file_exists_dialog.hide()
|
self.file_exists_dialog.hide()
|
||||||
|
@ -81,12 +80,14 @@ class ShowHideMixin:
|
||||||
appchooser_widget = self.builder.get_object("appchooser_widget")
|
appchooser_widget = self.builder.get_object("appchooser_widget")
|
||||||
response = appchooser_menu.run()
|
response = appchooser_menu.run()
|
||||||
|
|
||||||
if response == Gtk.ResponseType.CANCEL:
|
|
||||||
self.hide_appchooser_menu()
|
|
||||||
if response == Gtk.ResponseType.OK:
|
if response == Gtk.ResponseType.OK:
|
||||||
self.open_with_files(appchooser_widget)
|
self.open_with_files(appchooser_widget)
|
||||||
self.hide_appchooser_menu()
|
self.hide_appchooser_menu()
|
||||||
|
|
||||||
|
if response == Gtk.ResponseType.CANCEL:
|
||||||
|
self.hide_appchooser_menu()
|
||||||
|
|
||||||
|
|
||||||
def hide_appchooser_menu(self, widget=None, eve=None):
|
def hide_appchooser_menu(self, widget=None, eve=None):
|
||||||
self.builder.get_object("appchooser_menu").hide()
|
self.builder.get_object("appchooser_menu").hide()
|
||||||
|
|
||||||
|
@ -103,12 +104,18 @@ class ShowHideMixin:
|
||||||
|
|
||||||
|
|
||||||
def show_new_file_menu(self, widget=None, eve=None):
|
def show_new_file_menu(self, widget=None, eve=None):
|
||||||
self.builder.get_object("new_file_menu").run()
|
self.builder.get_object("context_menu_fname").set_text("")
|
||||||
|
|
||||||
|
new_file_menu = self.builder.get_object("new_file_menu")
|
||||||
|
response = new_file_menu.run()
|
||||||
|
if response == Gtk.ResponseType.APPLY:
|
||||||
|
self.create_files()
|
||||||
|
if response == Gtk.ResponseType.CANCEL:
|
||||||
|
self.hide_new_file_menu()
|
||||||
|
|
||||||
def hide_new_file_menu(self, widget=None, eve=None):
|
def hide_new_file_menu(self, widget=None, eve=None):
|
||||||
self.builder.get_object("new_file_menu").hide()
|
self.builder.get_object("new_file_menu").hide()
|
||||||
|
|
||||||
|
|
||||||
def show_edit_file_menu(self, widget=None, eve=None):
|
def show_edit_file_menu(self, widget=None, eve=None):
|
||||||
if widget:
|
if widget:
|
||||||
widget.grab_focus()
|
widget.grab_focus()
|
||||||
|
|
|
@ -239,7 +239,7 @@ class WidgetFileActionMixin:
|
||||||
else: # Create Folder
|
else: # Create Folder
|
||||||
self.handle_files([path], "create_dir")
|
self.handle_files([path], "create_dir")
|
||||||
|
|
||||||
fname_field.set_text("")
|
self.hide_new_file_menu()
|
||||||
|
|
||||||
def move_files(self, files, target):
|
def move_files(self, files, target):
|
||||||
self.handle_files(files, "move", target)
|
self.handle_files(files, "move", target)
|
||||||
|
|
Loading…
Reference in New Issue