Skip to content

Commit

Permalink
implement gallery delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
neffo committed Jun 20, 2021
1 parent e1492d5 commit 9c6f149
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 166 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ BingWallpaper@ineffable-gmail.com.zip
*.log
#Settings.ui#
translations.txt
Settings.ui.h
Settings4.ui.h
carousel.ui.h
carousel4.ui.h
43 changes: 0 additions & 43 deletions Settings.ui.h

This file was deleted.

43 changes: 0 additions & 43 deletions Settings4.ui.h

This file was deleted.

6 changes: 4 additions & 2 deletions buildzip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
glib-compile-schemas schemas/
intltool-extract --type=gettext/glade Settings.ui
intltool-extract --type=gettext/glade Settings4.ui
xgettext -k -k_ -kN_ -o locale/BingWallpaper.pot Settings.ui.h Settings4.ui.h extension.js prefs.js blur.js utils.js convenience.js --from-code=UTF-8
intltool-extract --type=gettext/glade carousel.ui
intltool-extract --type=gettext/glade carousel4.ui
xgettext -k -k_ -kN_ -o locale/BingWallpaper.pot Settings.ui.h Settings4.ui.h extension.js prefs.js blur.js utils.js convenience.js carousel.ui carousel4.ui --from-code=UTF-8

echo "Translation status" > translations.txt
for D in locale/*; do
Expand All @@ -17,4 +19,4 @@ rm BingWallpaper@ineffable-gmail.com.zip

zip -r BingWallpaper@ineffable-gmail.com.zip *

zip -d BingWallpaper@ineffable-gmail.com.zip screenshot/* screenshot buildzip.sh Settings.ui.h npm-debug.log icons/original/* .* translations.txt *.h package.json
zip -d BingWallpaper@ineffable-gmail.com.zip screenshot/* screenshot buildzip.sh npm-debug.log icons/original/* .* translations.txt *.h package.json
4 changes: 2 additions & 2 deletions carousel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Author: Michael Carroll
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="galleryImage">
<property name="width-request">480</property>
<property name="height-request">270</property>
<property name="width-request">320</property>
<property name="height-request">180</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
Expand Down
4 changes: 2 additions & 2 deletions carousel4.ui
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<property name="can-focus">0</property>
<child>
<object class="GtkImage" id="galleryImage">
<property name="width-request">480</property>
<property name="height-request">270</property>
<property name="width-request">320</property>
<property name="height-request">180</property>
<property name="can-focus">0</property>
<layout>
<property name="column">0</property>
Expand Down
11 changes: 1 addition & 10 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,16 +690,7 @@ class BingWallpaperIndicator extends PanelMenu.Button {
var to_delete = imagelist.shift(); // get the first (oldest item from the list)
log("image: " + to_delete);
if (deletepictures && to_delete != '') {
var file = Gio.file_new_for_path(to_delete);
if (file.query_exists(null)) {
try {
file.delete(null);
log("deleted file: " + to_delete);
}
catch (error) {
log("an error occured deleting " + to_delete + " : " + error);
}
}
Utils.deleteImage(to_delete);
}
}

Expand Down

0 comments on commit 9c6f149

Please sign in to comment.