Commit cda52790 authored by Antenore Gatta's avatar Antenore Gatta

Hide unneeded toolbar buttons

parent 9b84854a
......@@ -43,6 +43,7 @@
#include <gtk/gtk.h>
#include <stdlib.h>
#include "remmina.h"
#include "remmina_connection_window.h"
#include "remmina_file.h"
#include "remmina_file_manager.h"
......@@ -1887,6 +1888,8 @@ remmina_connection_holder_create_toolbar(RemminaConnectionHolder* cnnhld, gint m
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1);
gtk_widget_show(GTK_WIDGET(toolitem));
if (!kioskmode && kioskmode == FALSE) {
/* Fullscreen toggle */
toolitem = gtk_toggle_tool_button_new();
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(toolitem), "remmina-fullscreen-symbolic");
......@@ -1897,6 +1900,7 @@ remmina_connection_holder_create_toolbar(RemminaConnectionHolder* cnnhld, gint m
priv->toolitem_fullscreen = toolitem;
gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(toolitem), mode != SCROLLED_WINDOW_MODE);
g_signal_connect(G_OBJECT(toolitem), "clicked", G_CALLBACK(remmina_connection_holder_toolbar_fullscreen), cnnhld);
}
/* Fullscreen drop-down options */
toolitem = gtk_tool_item_new();
......@@ -1929,6 +1933,7 @@ remmina_connection_holder_create_toolbar(RemminaConnectionHolder* cnnhld, gint m
gtk_widget_set_sensitive(GTK_WIDGET(widget), FALSE);
}
if (!kioskmode && kioskmode == FALSE) {
/* Switch tabs */
toolitem = gtk_toggle_tool_button_new();
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(toolitem), "remmina-switch-page-symbolic");
......@@ -1942,6 +1947,7 @@ remmina_connection_holder_create_toolbar(RemminaConnectionHolder* cnnhld, gint m
toolitem = gtk_separator_tool_item_new();
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1);
gtk_widget_show(GTK_WIDGET(toolitem));
}
/* Dynamic Resolution Update */
toolitem = gtk_toggle_tool_button_new();
......@@ -2027,12 +2033,14 @@ remmina_connection_holder_create_toolbar(RemminaConnectionHolder* cnnhld, gint m
gtk_widget_show(GTK_WIDGET(toolitem));
g_signal_connect(G_OBJECT(toolitem), "clicked", G_CALLBACK(remmina_connection_holder_toolbar_screenshot), cnnhld);
if (!kioskmode && kioskmode == FALSE) {
toolitem = gtk_tool_button_new(NULL, "_Bottom");
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(toolitem), "remmina-go-bottom-symbolic");
remmina_connection_holder_set_tooltip(GTK_WIDGET(toolitem), _("Minimize window"), remmina_pref.shortcutkey_minimize, 0);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1);
gtk_widget_show(GTK_WIDGET(toolitem));
g_signal_connect(G_OBJECT(toolitem), "clicked", G_CALLBACK(remmina_connection_holder_toolbar_minimize), cnnhld);
}
toolitem = gtk_tool_button_new(NULL, "_Disconnect");
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(toolitem), "remmina-disconnect-symbolic");
......@@ -2584,6 +2592,9 @@ static void remmina_connection_window_init(RemminaConnectionWindow* cnnwin)
cnnwin->priv = priv;
priv->view_mode = AUTO_MODE;
if (kioskmode && kioskmode == TRUE)
priv->view_mode = VIEWPORT_FULLSCREEN_MODE;
priv->floating_toolbar_opacity = 1.0;
priv->kbcaptured = FALSE;
priv->mouse_pointer_entered = FALSE;
......
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