window: add an is-maximized property to GtkWindow

With proper notifications, plus an accessor method for that state. This
allows client to just listen to notify::is-maximized instead of tracking
window-state-event.

https://bugzilla.gnome.org/show_bug.cgi?id=698786
This commit is contained in:
Cosimo Cecchi
2013-04-24 15:45:49 -04:00
committed by Matthias Clasen
parent 1691bb741d
commit 197785744b
5 changed files with 41 additions and 5 deletions

View File

@ -433,7 +433,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
type_hint == GDK_WINDOW_TYPE_HINT_NORMAL)
{
const gchar *icon_name;
gboolean maximized = _gtk_window_get_maximized (window);
gboolean maximized = gtk_window_is_maximized (window);
icon_name = maximized ? "window-restore-symbolic" : "window-maximize-symbolic";
button = gtk_button_new ();