window: remove unused code
We don't need to add these style classes.
This commit is contained in:
@ -5072,7 +5072,6 @@ update_window_buttons (GtkWindow *window)
|
|||||||
image = gtk_image_new_from_icon_name ("window-minimize-symbolic", GTK_ICON_SIZE_MENU);
|
image = gtk_image_new_from_icon_name ("window-minimize-symbolic", GTK_ICON_SIZE_MENU);
|
||||||
g_object_set (image, "use-fallback", TRUE, NULL);
|
g_object_set (image, "use-fallback", TRUE, NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (button), image);
|
gtk_container_add (GTK_CONTAINER (button), image);
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (button), "window-minimize-button");
|
|
||||||
gtk_widget_set_can_focus (button, FALSE);
|
gtk_widget_set_can_focus (button, FALSE);
|
||||||
gtk_widget_show_all (button);
|
gtk_widget_show_all (button);
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
@ -5090,7 +5089,6 @@ update_window_buttons (GtkWindow *window)
|
|||||||
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
|
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
|
||||||
g_object_set (image, "use-fallback", TRUE, NULL);
|
g_object_set (image, "use-fallback", TRUE, NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (button), image);
|
gtk_container_add (GTK_CONTAINER (button), image);
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (button), "window-maximize-button");
|
|
||||||
gtk_widget_set_can_focus (button, FALSE);
|
gtk_widget_set_can_focus (button, FALSE);
|
||||||
gtk_widget_show_all (button);
|
gtk_widget_show_all (button);
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
@ -5105,7 +5103,6 @@ update_window_buttons (GtkWindow *window)
|
|||||||
image = gtk_image_new_from_icon_name ("window-delete-symbolic", GTK_ICON_SIZE_MENU);
|
image = gtk_image_new_from_icon_name ("window-delete-symbolic", GTK_ICON_SIZE_MENU);
|
||||||
g_object_set (image, "use-fallback", TRUE, NULL);
|
g_object_set (image, "use-fallback", TRUE, NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (button), image);
|
gtk_container_add (GTK_CONTAINER (button), image);
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (button), "window-close-button");
|
|
||||||
gtk_widget_set_can_focus (button, FALSE);
|
gtk_widget_set_can_focus (button, FALSE);
|
||||||
gtk_widget_show_all (button);
|
gtk_widget_show_all (button);
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
@ -5136,22 +5133,6 @@ update_window_buttons (GtkWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
set_client_decorated (GtkWidget *widget,
|
|
||||||
gboolean value)
|
|
||||||
{
|
|
||||||
GtkStyleContext *context;
|
|
||||||
GtkWindowPrivate *priv = GTK_WINDOW (widget)->priv;
|
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (widget);
|
|
||||||
priv->client_decorated = value;
|
|
||||||
|
|
||||||
if (value)
|
|
||||||
gtk_style_context_add_class (context, "client-decorated");
|
|
||||||
else
|
|
||||||
gtk_style_context_remove_class (context, "client-decorated");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_decoration (GtkWidget *widget)
|
create_decoration (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
@ -5172,7 +5153,7 @@ create_decoration (GtkWidget *widget)
|
|||||||
|
|
||||||
#ifdef GDK_WINDOWING_WAYLAND
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget)))
|
if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget)))
|
||||||
set_client_decorated (widget, TRUE);
|
priv->client_decorated = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!priv->client_decorated &&
|
if (!priv->client_decorated &&
|
||||||
@ -5185,7 +5166,7 @@ create_decoration (GtkWidget *widget)
|
|||||||
if (visual)
|
if (visual)
|
||||||
{
|
{
|
||||||
gtk_widget_set_visual (widget, visual);
|
gtk_widget_set_visual (widget, visual);
|
||||||
set_client_decorated (widget, TRUE);
|
priv->client_decorated = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user