Commit 6a50081a authored by Jean-Louis Dupond's avatar Jean-Louis Dupond

Fix layout

parent f13fb942
......@@ -513,52 +513,50 @@ static void remmina_connection_holder_check_resize(RemminaConnectionHolder* cnnh
switch (cnnhld->cnnwin->priv->view_mode)
{
case SCROLLED_FULLSCREEN_MODE:
gtk_window_resize(GTK_WINDOW(cnnhld->cnnwin), screen_width, screen_height);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(cnnobj->scrolled_container),
(scroll_required ? GTK_POLICY_AUTOMATIC : GTK_POLICY_NEVER),
(scroll_required ? GTK_POLICY_AUTOMATIC : GTK_POLICY_NEVER));
break;
case VIEWPORT_FULLSCREEN_MODE:
gtk_window_resize (GTK_WINDOW(cnnhld->cnnwin), screen_width, screen_height);
gtk_container_set_border_width (GTK_CONTAINER (cnnhld->cnnwin), scroll_required ? 1 : 0);
break;
case SCROLLED_WINDOW_MODE:
if (remmina_file_get_int (cnnobj->remmina_file, "viewmode", AUTO_MODE) == AUTO_MODE)
{
gtk_window_set_default_size (GTK_WINDOW(cnnhld->cnnwin),
MIN (server_width, screen_width), MIN (server_height, screen_height));
if (server_width >= screen_width ||
server_height >= screen_height)
{
gtk_window_maximize (GTK_WINDOW(cnnhld->cnnwin));
remmina_file_set_int (cnnobj->remmina_file, "window_maximize", TRUE);
}
else
{
remmina_connection_holder_toolbar_autofit (NULL, cnnhld);
remmina_file_set_int (cnnobj->remmina_file, "window_maximize", FALSE);
}
}
else
{
gtk_window_set_default_size (GTK_WINDOW(cnnhld->cnnwin),
remmina_file_get_int (cnnobj->remmina_file, "window_width", 640),
remmina_file_get_int (cnnobj->remmina_file, "window_height", 480));
if (remmina_file_get_int (cnnobj->remmina_file, "window_maximize", FALSE))
{
gtk_window_maximize (GTK_WINDOW(cnnhld->cnnwin));
}
}
break;
default:
break;
}
}
break;
case VIEWPORT_FULLSCREEN_MODE:
gtk_window_resize (GTK_WINDOW(cnnhld->cnnwin), screen_width, screen_height);
gtk_container_set_border_width (GTK_CONTAINER (cnnhld->cnnwin), scroll_required ? 1 : 0);
break;
case SCROLLED_WINDOW_MODE:
if (remmina_file_get_int (cnnobj->remmina_file, "viewmode", AUTO_MODE) == AUTO_MODE)
{
gtk_window_set_default_size (GTK_WINDOW(cnnhld->cnnwin),
MIN (server_width, screen_width), MIN (server_height, screen_height));
if (server_width >= screen_width || server_height >= screen_height)
{
gtk_window_maximize (GTK_WINDOW(cnnhld->cnnwin));
remmina_file_set_int (cnnobj->remmina_file, "window_maximize", TRUE);
}
else
{
remmina_connection_holder_toolbar_autofit (NULL, cnnhld);
remmina_file_set_int (cnnobj->remmina_file, "window_maximize", FALSE);
}
}
else
{
gtk_window_set_default_size (GTK_WINDOW(cnnhld->cnnwin),
remmina_file_get_int (cnnobj->remmina_file, "window_width", 640),
remmina_file_get_int (cnnobj->remmina_file, "window_height", 480));
if (remmina_file_get_int (cnnobj->remmina_file, "window_maximize", FALSE))
{
gtk_window_maximize (GTK_WINDOW(cnnhld->cnnwin));
}
}
break;
default:
break;
}
}
static void remmina_connection_holder_set_tooltip(GtkWidget* item, const gchar* tip, guint key1, guint key2)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment