|
|
22448f |
From 6e7a67c80bdaf6d2379dbe3273321ebd10ab11e4 Mon Sep 17 00:00:00 2001
|
|
|
22448f |
From: Marek Kasik <mkasik@redhat.com>
|
|
|
22448f |
Date: Fri, 14 Aug 2015 14:05:15 +0200
|
|
|
22448f |
Subject: Add minimize button to the fullscreen toolbar
|
|
|
22448f |
|
|
|
22448f |
Add button which when pressed iconifies Vinagre window.
|
|
|
22448f |
|
|
|
22448f |
https://bugzilla.gnome.org/show_bug.cgi?id=753626
|
|
|
22448f |
---
|
|
|
22448f |
vinagre/vinagre-tab.c | 16 ++++++++++++++++
|
|
|
22448f |
vinagre/vinagre-window.c | 6 ++++++
|
|
|
22448f |
vinagre/vinagre-window.h | 2 ++
|
|
|
22448f |
3 files changed, 24 insertions(+)
|
|
|
22448f |
|
|
|
22448f |
diff --git a/vinagre/vinagre-tab.c b/vinagre/vinagre-tab.c
|
|
|
22448f |
index 8828fb3..f19bfe5 100644
|
|
|
22448f |
--- a/vinagre/vinagre-tab.c
|
|
|
22448f |
+++ b/vinagre/vinagre-tab.c
|
|
|
22448f |
@@ -331,6 +331,13 @@ close_button_clicked (GtkToolButton *button,
|
|
|
22448f |
}
|
|
|
22448f |
|
|
|
22448f |
static void
|
|
|
22448f |
+minimize_button_clicked (GtkToolButton *button,
|
|
|
22448f |
+ VinagreTab *tab)
|
|
|
22448f |
+{
|
|
|
22448f |
+ vinagre_window_minimize (tab->priv->window);
|
|
|
22448f |
+}
|
|
|
22448f |
+
|
|
|
22448f |
+static void
|
|
|
22448f |
fullscreen_button_clicked (GtkToolButton *button,
|
|
|
22448f |
VinagreTab *tab)
|
|
|
22448f |
{
|
|
|
22448f |
@@ -356,6 +363,15 @@ setup_layout (VinagreTab *tab)
|
|
|
22448f |
gtk_toolbar_insert (GTK_TOOLBAR (tab->priv->toolbar), GTK_TOOL_ITEM (button), 0);
|
|
|
22448f |
g_signal_connect (button, "clicked", G_CALLBACK (close_button_clicked), tab);
|
|
|
22448f |
|
|
|
22448f |
+ /* Minimize window */
|
|
|
22448f |
+ button = GTK_WIDGET (gtk_tool_button_new (NULL, NULL));
|
|
|
22448f |
+ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (button), "window-minimize-symbolic");
|
|
|
22448f |
+ /* Translators: Pressing this button will minimize Vinagre */
|
|
|
22448f |
+ gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Minimize window"));
|
|
|
22448f |
+ gtk_widget_show (button);
|
|
|
22448f |
+ gtk_toolbar_insert (GTK_TOOLBAR (tab->priv->toolbar), GTK_TOOL_ITEM (button), 0);
|
|
|
22448f |
+ g_signal_connect (button, "clicked", G_CALLBACK (minimize_button_clicked), tab);
|
|
|
22448f |
+
|
|
|
22448f |
/* Connection name/menu */
|
|
|
22448f |
str = vinagre_connection_get_best_name (tab->priv->conn);
|
|
|
22448f |
button = GTK_WIDGET (gtk_tool_button_new (NULL, str));
|
|
|
22448f |
diff --git a/vinagre/vinagre-window.c b/vinagre/vinagre-window.c
|
|
|
22448f |
index c6d7cc9..09b4812 100644
|
|
|
22448f |
--- a/vinagre/vinagre-window.c
|
|
|
22448f |
+++ b/vinagre/vinagre-window.c
|
|
|
22448f |
@@ -934,6 +934,12 @@ vinagre_window_toggle_fullscreen (VinagreWindow *window)
|
|
|
22448f |
gtk_window_fullscreen (GTK_WINDOW (window));
|
|
|
22448f |
}
|
|
|
22448f |
|
|
|
22448f |
+void
|
|
|
22448f |
+vinagre_window_minimize (VinagreWindow *window)
|
|
|
22448f |
+{
|
|
|
22448f |
+ gtk_window_iconify (GTK_WINDOW (window));
|
|
|
22448f |
+}
|
|
|
22448f |
+
|
|
|
22448f |
/**
|
|
|
22448f |
* vinagre_window_get_statusbar:
|
|
|
22448f |
* @window: A window
|
|
|
22448f |
diff --git a/vinagre/vinagre-window.h b/vinagre/vinagre-window.h
|
|
|
22448f |
index 100681f..de273e7 100644
|
|
|
22448f |
--- a/vinagre/vinagre-window.h
|
|
|
22448f |
+++ b/vinagre/vinagre-window.h
|
|
|
22448f |
@@ -85,6 +85,8 @@ gboolean vinagre_window_is_fullscreen (VinagreWindow *window);
|
|
|
22448f |
|
|
|
22448f |
void vinagre_window_toggle_fullscreen (VinagreWindow *window);
|
|
|
22448f |
|
|
|
22448f |
+void vinagre_window_minimize (VinagreWindow *window);
|
|
|
22448f |
+
|
|
|
22448f |
void vinagre_window_merge_tab_ui (VinagreWindow *window);
|
|
|
22448f |
|
|
|
22448f |
GList *vinagre_window_get_connections (VinagreWindow *window);
|
|
|
22448f |
--
|
|
|
22448f |
cgit v0.12
|
|
|
22448f |
|