Skip to content

Commit

Permalink
merged readme, pull request #10, pull request #9
Browse files Browse the repository at this point in the history
  • Loading branch information
mathematicalcoffee committed Jun 6, 2013
2 parents 9ee9fe7 + dc5f20d commit 5c971e5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 20 deletions.
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,31 @@ Supports custom button layouts and css theming!
</tr>
</table>

Configure with `gnome-shell-extension-prefs` (GNOME 3.4) or by editing `extension.js` (GNOME 3.2).
Configure with `gnome-shell-extension-prefs` (GNOME 3.4+) or by editing `extension.js` (GNOME 3.2).

Author: biox (Josiah Messiah)
Maintainers: mathematical.coffee <mathematical.coffee@gmail.com>
arkan duthrey <arkan1313@gmail.com>
**Author**: biox (Josiah Messiah)
**Maintainers**: mathematical.coffee <mathematical.coffee@gmail.com>
**Contributors**: [Many (thankyou!)](https://github.com/mathematicalcoffee/Gnome-Shell-Window-Buttons-Extension/contributors)

Note - the [mathematicalcoffee fork](https://github.com/mathematicalcoffee/Gnome-Shell-Window-Buttons-Extension) of this extension is where development happens, and it all then gets pushed to the original [biox repository](https://github.com/biox/Gnome-Shell-Window-Buttons-Extension).
Note - the [mathematicalcoffee fork](https://github.com/mathematicalcoffee/Gnome-Shell-Window-Buttons-Extension) of this extension is where development happens, and it all then gets pushed to the original [biox repository](https://github.com/biox/Gnome-Shell-Window-Buttons-Extension) when stable.

Installation
------------
(NEW: hopefully, you can install from extensions.gnome.org).
**NEW**: Install it from [extensions.gnome.org](https://extensions.gnome.org/extension/426/window-buttons/).

### GNOME 3.4
If you wish to install manually (i.e. from the repository):

### GNOME 3.4, 3.6, 3.8
Either download the .zip file from the [Downloads page](https://github.com/biox/Gnome-Shell-Window-Buttons-Extension/downloads) or checkout the code to the `gnome3.4` branch.

If you have the .zip file, go to Gnome tweak tools --> Shell Extensions --> Install from zip file --> choose the zip file.

If you have the source code, copy the folder to the appropriate place:

$ cp window_buttons@biox.github.com ~/.local/share/gnome-shell/extensions/
$ gnome-shell-extension-tool -e window_buttons@biox.github.com

Configure using `gnome-shell-extension-prefs`. No shell restarts required.
Configure using `gnome-shell-extension-prefs`.

### GNOME 3.2
As above (but if you are checking out the code, use the `gnome3.2` branch).
Expand Down Expand Up @@ -155,7 +158,17 @@ See `themes/default/style.css` for more information.

Changelog
---------
v5/v5 on e.g.o:
v10 on e.g.o:
* GNOME 3.8 support added
* maximized windows that are minimized shouldn't count towards WINDOWS_MAXIMIZED (#9; deadalnix)
* fixed phantom space when no buttons are showing (#10; deadalnix)

v7/8/9 on e.g.o:

* quick fixes to get disable/re-enable working
* typos

v5/v6 on e.g.o:

* Buttons hide in the Overview (cfclavijo; #6)
* New theme Ambiance-Blue (cfclavijo; #6)
Expand Down
15 changes: 15 additions & 0 deletions README_DEVELOPERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
There are four branches:
* master [dev for gnome3.4+]
* gnome3.4 [stable for gnome3.4+ (--3.8 currently)]
* gnome3.2 [stable for gnome3.2]
* gnome3.2-dev [dev for gnome3.2]

The gnome3.2 and gnome3.4 branches are where the *stable* code for these respective versions of the extension live. They are quite different (for example GNOME 3.4 version can use gnome-shell-extension-prefs, whereas GNOME 3.2 you're stuck with editing the extensin.js file).

The master branch is for DEVELOPMENT of GNOME 3.4+ code. Push to branch gnome3.4+ when stable.

The gnome3.2-dev branch is for DEVELOPMENT of GNOME 3.2 code. Push to branch gnome3.2 when stable.

I can't quite remember how pushing between gnome3.2-dev and master works (i.e. applying universal changes to both branches)... I'm sure doing it in one direction will work better than the other but this currently escapes me.

Note - the way I (m.c) am playing it at the moment is as follows: mathematicalcoffee fork of this extension is where development happens, and it all then gets pushed to the biox repository.
28 changes: 17 additions & 11 deletions window_buttons@biox.github.com/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ WindowButtons.prototype = {
// show iff *any* window is (fully) maximized
case ShowButtonsWhen.ANY_WINDOW_MAXIMIZED:
for (let i = 0; i < windows.length; ++i) {
if (windows[i].get_maximized() === Meta.MaximizeFlags.BOTH) {
if (windows[i].get_maximized() === Meta.MaximizeFlags.BOTH &&
!windows[i].minimized) {
show = true;
break;
}
Expand All @@ -448,17 +449,22 @@ WindowButtons.prototype = {
}
}

// if the actors already match `show` don't do anything.
if (show === this.leftActor.visible &&
show === this.rightActor.visible) {
return false;
var showLeft = show && (this.leftBox.get_children().length > 0);
if (showLeft !== this.leftActor.visible) {
if (showLeft) {
this.leftActor.show();
} else {
this.leftActor.hide();
}
}
if (show) {
this.leftActor.show();
this.rightActor.show();
} else {
this.leftActor.hide();
this.rightActor.hide();

var showRight = show && (this.rightBox.get_children().length > 0);
if (showRight !== this.rightActor.visible) {
if (showRight) {
this.rightActor.show();
} else {
this.rightActor.hide();
}
}
return false;
},
Expand Down

0 comments on commit 5c971e5

Please sign in to comment.