Commit cda52790 authored by Antenore Gatta's avatar Antenore Gatta

Hide unneeded toolbar buttons

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