Skip to content

Commit

Permalink
close #282
Browse files Browse the repository at this point in the history
  • Loading branch information
spheras committed Apr 29, 2020
1 parent a86872b commit 16383f1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
13 changes: 13 additions & 0 deletions etc/knowhow
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,16 @@ $ sudo apt install snapcraft

$ sudo docker pull snapcore/snapcraft
$ sudo docker run -v $PWD:$PWD -w $PWD snapcore/snapcraft snapcraft

Relase a new version
····················
https://wiki.debian.org/Creating%20signed%20GitHub%20releases
1. tag the code (change version): $ git tag -s v1.1.2
2. push the tag created: $ git push --tags
3. then publish a new release into github
4. download the .gz generated at the release
5. sign the tarball (change version): $ gpg --armor --detach-sign desktopfolder-1.1.2.tar.gz
6. it will create a desktopfolder-1.1.2.tar.gz.asc file
7. Edit your release again and attach the detached signature desktopfolder-1.1.2.tar.gz.asc as binary to the release.
8. Compile with debian at the root: $ debuild -uc -us
9. Attach also the .dsc .tar.xz and .deb generated
27 changes: 21 additions & 6 deletions src/widgets/PhotoWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ public class DesktopFolder.PhotoWindow : Gtk.ApplicationWindow {
return true;
});

this.button_press_event.connect (this.on_press);
this.button_release_event.connect (this.on_release);
this.button_press_event.connect (this.on_button_press);
this.key_release_event.connect(this.on_key_release);
this.button_release_event.connect (this.on_button_release);
this.draw.connect (this.draw_background);

// help: doesn't have the gtk window any active signal? or css :active state?
Expand Down Expand Up @@ -275,19 +276,33 @@ public class DesktopFolder.PhotoWindow : Gtk.ApplicationWindow {
* @description release event captured.
* @return bool @see widget on_release signal
*/
private bool on_release (Gdk.EventButton event) {
private bool on_button_release (Gdk.EventButton event) {
// we are now a dock Window, to avoid minimization when show desktop
// TODO exists a way to make resizable and moveable a dock window?
this.type_hint = Gdk.WindowTypeHint.DESKTOP;
return false;
}

/**
* @name on_press
* @name on_key_release
* @description a key pressed was released
@return bool @see widget key_release_event
*/
private bool on_key_release (Gdk.EventKey event) {
if (event.type == Gdk.EventType.KEY_RELEASE && event.str==" ") {
this.manager.open ();
return true;
}
return false;
}


/**
* @name on_button_press
* @description press event captured. The Window should show the popup on right button
* @return bool @see widget on_press signal
* @return bool @see widget button_press_event signal
*/
private bool on_press (Gdk.EventButton event) {
private bool on_button_press (Gdk.EventButton event) {
// we are now a normal Window, to allow resizing and movement
// TODO exists a way to make resizable and moveable a dock window?
this.type_hint = Gdk.WindowTypeHint.NORMAL;
Expand Down

0 comments on commit 16383f1

Please sign in to comment.