From 0aca7078ad341c2e673026418a6561d60fe69544 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Mon, 7 Dec 2015 14:28:29 -0800 Subject: Remove "unmaximized" CSS class GTK already provides a "maximized" CSS class on GtkWindow, so now that we have the :not selector, we can use that instead of adding our own "unmaximized" class. This allows us to cut out more code, including a signal emission on every window state change. [endlessm/eos-sdk#3782] --- endless/eostopbar.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'endless/eostopbar.c') diff --git a/endless/eostopbar.c b/endless/eostopbar.c index bc690ee..bf04e24 100644 --- a/endless/eostopbar.c +++ b/endless/eostopbar.c @@ -17,7 +17,6 @@ * widget. */ #define _EOS_STYLE_CLASS_TOP_BAR "top-bar" -#define _EOS_STYLE_CLASS_UNMAXIMIZED "unmaximized" #define _EOS_TOP_BAR_HEIGHT_PX 36 #define _EOS_TOP_BAR_ICON_SIZE_PX 16 #define _EOS_TOP_BAR_BUTTON_SEPARATION_PX 8 @@ -70,8 +69,6 @@ eos_top_bar_constructed (GObject *object) "show-close-button", TRUE, "spacing", _EOS_TOP_BAR_BUTTON_SEPARATION_PX, NULL); - - eos_top_bar_update_window_maximized (self, TRUE); } static void @@ -334,27 +331,6 @@ eos_top_bar_set_center_widget (EosTopBar *self, } } -/* - * eos_top_bar_update_window_maximized: - * @self: the top bar - * @is_maximized: whether the window is currently maximized - * - * Private method for eos_window to update the topbar on the window maximized - * state. - */ -void -eos_top_bar_update_window_maximized (EosTopBar *self, - gboolean is_maximized) -{ - g_return_if_fail (EOS_IS_TOP_BAR (self)); - - GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET (self)); - if (!is_maximized) - gtk_style_context_add_class (context, _EOS_STYLE_CLASS_UNMAXIMIZED); - else - gtk_style_context_remove_class (context, _EOS_STYLE_CLASS_UNMAXIMIZED); -} - /* * eos_top_bar_get_show_credits_button: * @self: the top bar -- cgit v1.2.3