Merge Stable Changesto Master #9
.gitignore
plugins
README.md
archiver
disk_usage
favorites
file_properties
movie_tv_info
searcher
template
trasher
vod_thumbnailer
youtube_download
src/versions/solarfm-0.0.1/SolarFM/solarfm
__builtins__.py__main__.pyapp.py
core
context_menu.pycontroller.pycontroller_data.py
mixins
signals
plugins
shellfm
windows
trasher
utils
user_config/usr/share/solarfm
Main_Window.gladecontexct_menu.json
fileicons
3g2.png3gp.pngai.pngair.pngasf.pngavi.pngbib.pngcls.pngcsv.pngdeb.pngdjvu.pngdmg.pngdoc.pngdocx.pngdwf.pngdwg.pngeps.pngepub.pngexe.pngf.pngf77.pngf90.pngflac.pngflv.pnggif.pnggz.pngico.pngindd.pngiso.pngjpeg.pngjpg.pnglog.pngm4a.pngm4v.pngmidi.pngmkv.pngmov.pngmp3.pngmp4.pngmpeg.pngmpg.pngmsi.pngodp.pngods.pngodt.pngoga.pngogg.pngogv.pngpdf.pngpng.pngpps.pngppsx.pngppt.pngpptx.pngpsd.pngpub.pngpy.pngqt.pngra.pngram.pngrar.pngrm.pngrpm.pngrtf.pngrv.pngskp.pngspx.pngsql.pngsty.pngtar.pngtex.pngtgz.pngtiff.pngttf.pngtxt.pngvob.pngwav.pngwmv.pngxls.pngxlsx.pngxml.pngxpi.pngzip.png
key-bindings.jsonsettings.json@@ -329,8 +329,8 @@ class WidgetFileActionMixin:
|
|||||||
if action == "move" or action == "rename":
|
if action == "move" or action == "rename":
|
||||||
container, cancle_eve, update_progress, finish_callback = self.create_io_widget(action, file)
|
container, cancle_eve, update_progress, finish_callback = self.create_io_widget(action, file)
|
||||||
file.move_async(destination=target, flags=Gio.FileCopyFlags.BACKUP,
|
file.move_async(destination=target, flags=Gio.FileCopyFlags.BACKUP,
|
||||||
io_priority=100, cancellable=cancle_eve,
|
io_priority=98, cancellable=cancle_eve,
|
||||||
progress_callback=None) # NOTE: progress_callback causes seg fault when set
|
progress_callback=None, callback=finish_callback) # NOTE: progress_callback causes seg fault when set
|
||||||
self.builder.get_object("io_list").add(container)
|
self.builder.get_object("io_list").add(container)
|
||||||
|
|
||||||
|
|
||||||
@@ -339,9 +339,6 @@ class WidgetFileActionMixin:
|
|||||||
|
|
||||||
self.exists_file_rename_bttn.set_sensitive(False)
|
self.exists_file_rename_bttn.set_sensitive(False)
|
||||||
|
|
||||||
# NOTE: There is something not right about the way we are doing this.
|
|
||||||
# Calling cancel results in an error getting thrown to finish_callback
|
|
||||||
# and checking for task.had_error() is True and task.get_completed() is False
|
|
||||||
def create_io_widget(self, action, file):
|
def create_io_widget(self, action, file):
|
||||||
cancle_eve = Gio.Cancellable.new()
|
cancle_eve = Gio.Cancellable.new()
|
||||||
container = Gtk.Box()
|
container = Gtk.Box()
|
||||||
@@ -365,22 +362,26 @@ class WidgetFileActionMixin:
|
|||||||
progress.set_fraction(current/total)
|
progress.set_fraction(current/total)
|
||||||
|
|
||||||
def finish_callback(file, task=None, eve=None):
|
def finish_callback(file, task=None, eve=None):
|
||||||
io_list.remove(container)
|
if action == "move":
|
||||||
# if not task.had_error():
|
status = file.move_finish(task)
|
||||||
# self.builder.get_object("io_list").remove(container)
|
if action == "copy":
|
||||||
# else:
|
status = file.copy_finish(task)
|
||||||
# print(f"{action} of {file.get_basename()} failed...")
|
|
||||||
|
if status:
|
||||||
|
self.builder.get_object("io_list").remove(container)
|
||||||
|
else:
|
||||||
|
print(f"{action} of {file.get_basename()} failed...")
|
||||||
|
|
||||||
def delete_container(widget, eve):
|
def delete_container(widget, eve):
|
||||||
io_list.remove(container)
|
io_list.remove(container)
|
||||||
|
|
||||||
|
|
||||||
|
stats.pack_end(del_button, False, False, 5)
|
||||||
|
del_button.connect("clicked", delete_container, ())
|
||||||
|
|
||||||
if not action in ("create", "rename"):
|
if not action in ("create", "rename"):
|
||||||
stats.pack_end(cncl_button, False, False, 5)
|
stats.pack_end(cncl_button, False, False, 5)
|
||||||
cncl_button.connect("clicked", do_cancel, *(container, cancle_eve))
|
cncl_button.connect("clicked", do_cancel, *(container, cancle_eve))
|
||||||
else:
|
|
||||||
stats.pack_end(del_button, False, False, 5)
|
|
||||||
del_button.connect("clicked", delete_container, ())
|
|
||||||
|
|
||||||
container.set_orientation(1)
|
container.set_orientation(1)
|
||||||
stats.set_orientation(0)
|
stats.set_orientation(0)
|
||||||
|
Reference in New Issue
Block a user