[vinagre] Remove the bookmarks side panel
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Remove the bookmarks side panel
- Date: Sat, 11 Jun 2011 20:12:31 +0000 (UTC)
commit 0914d8ccea6c70f8608203ed59e1ae5584668dee
Author: David King <amigadave amigadave com>
Date: Sat Jun 11 22:05:09 2011 +0200
Remove the bookmarks side panel
As the bookmarks can also be browsed in the Bookmarks menu, remove the
duplicate functionality of the side panel.
Makefile.am | 5 +-
data/vinagre-fav-ui.xml | 54 --
data/vinagre-ui.xml | 1 -
po/POTFILES.in | 1 -
vinagre/vinagre-commands.c | 14 -
vinagre/vinagre-commands.h | 2 -
vinagre/vinagre-fav.c | 1119 --------------------------------------
vinagre/vinagre-fav.h | 72 ---
vinagre/vinagre-ui.h | 7 +-
vinagre/vinagre-window-private.h | 6 -
vinagre/vinagre-window.c | 93 +---
vinagre/vinagre-window.h | 2 -
12 files changed, 8 insertions(+), 1368 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c539888..791b194 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,7 +68,6 @@ noinst_vinagreh_headers = \
vinagre/vinagre-debug.h \
vinagre/vinagre-dirs.h \
vinagre/vinagre-dnd.h \
- vinagre/vinagre-fav.h \
vinagre/vinagre-notebook.h \
vinagre/vinagre-options.h \
vinagre/vinagre-plugins-engine.h \
@@ -99,7 +98,6 @@ handwritten_sources = \
vinagre/vinagre-connection.c \
vinagre/vinagre-debug.c \
vinagre/vinagre-dirs.c \
- vinagre/vinagre-fav.c \
vinagre/vinagre-notebook.c \
vinagre/vinagre-prefs.c \
vinagre/vinagre-reverse-vnc-listener.c \
@@ -270,8 +268,7 @@ dist_man_MANS = data/vinagre.1
dist_pkgdata_DATA = \
data/vinagre-ui.xml \
- data/vinagre.ui \
- data/vinagre-fav-ui.xml
+ data/vinagre.ui
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
diff --git a/data/vinagre-ui.xml b/data/vinagre-ui.xml
index 2255ff3..956bc47 100644
--- a/data/vinagre-ui.xml
+++ b/data/vinagre-ui.xml
@@ -43,7 +43,6 @@
<menu name="ViewMenu" action="View">
<menuitem name="ViewToolbarMenu" action="ViewToolbar"/>
<menuitem name="ViewStatusbarMenu" action="ViewStatusbar"/>
- <menuitem name="ViewSidePanelMenu" action="ViewSidePanel"/>
<separator/>
<menuitem name="ViewFullScreenMenu" action="ViewFullScreen"/>
</menu>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6b06b7b..82bf72b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -26,7 +26,6 @@ vinagre/vinagre-cache-prefs.c
vinagre/vinagre-commands.c
vinagre/vinagre-connect.c
vinagre/vinagre-connection.c
-vinagre/vinagre-fav.c
vinagre/vinagre-main.c
vinagre/vinagre-mdns.c
vinagre/vinagre-notebook.c
diff --git a/vinagre/vinagre-commands.c b/vinagre/vinagre-commands.c
index c055abd..8812d0d 100644
--- a/vinagre/vinagre-commands.c
+++ b/vinagre/vinagre-commands.c
@@ -34,7 +34,6 @@
#include "vinagre-connect.h"
#include "vinagre-bookmarks.h"
#include "vinagre-bookmarks-ui.h"
-#include "vinagre-fav.h"
#include "vinagre-window-private.h"
#include "vinagre-prefs.h"
#include "vinagre-cache-prefs.h"
@@ -277,19 +276,6 @@ vinagre_cmd_view_show_statusbar (GtkAction *action,
}
void
-vinagre_cmd_view_show_fav_panel (GtkAction *action,
- VinagreWindow *window)
-{
- g_return_if_fail (VINAGRE_IS_WINDOW (window));
-
- _toggle_widget_visible (window->priv->fav_panel);
-
- vinagre_cache_prefs_set_boolean ("window",
- "side-panel-visible",
- gtk_widget_get_visible (window->priv->fav_panel));
-}
-
-void
vinagre_cmd_view_fullscreen (GtkAction *action,
VinagreWindow *window)
{
diff --git a/vinagre/vinagre-commands.h b/vinagre/vinagre-commands.h
index c587e94..465b9c7 100644
--- a/vinagre/vinagre-commands.h
+++ b/vinagre/vinagre-commands.h
@@ -57,8 +57,6 @@ void vinagre_cmd_view_show_toolbar (GtkAction *action,
VinagreWindow *window);
void vinagre_cmd_view_show_statusbar (GtkAction *action,
VinagreWindow *window);
-void vinagre_cmd_view_show_fav_panel (GtkAction *action,
- VinagreWindow *window);
void vinagre_cmd_view_fullscreen (GtkAction *action,
VinagreWindow *window);
diff --git a/vinagre/vinagre-ui.h b/vinagre/vinagre-ui.h
index c68d61c..f7fd9fb 100644
--- a/vinagre/vinagre-ui.h
+++ b/vinagre/vinagre-ui.h
@@ -66,11 +66,7 @@ static const GtkToggleActionEntry vinagre_always_sensitive_toggle_entries[] =
{ "ViewStatusbar", NULL, N_("_Statusbar"), NULL,
N_("Show or hide the statusbar"),
- G_CALLBACK (vinagre_cmd_view_show_statusbar), FALSE },
-
- { "ViewSidePanel", NULL, N_("Side _Pane"), "F9",
- N_("Show or hide the side pane"),
- G_CALLBACK (vinagre_cmd_view_show_fav_panel), FALSE }
+ G_CALLBACK (vinagre_cmd_view_show_statusbar), FALSE }
};
static const GtkActionEntry vinagre_remote_connected_entries[] =
@@ -106,4 +102,3 @@ static const GtkToggleActionEntry vinagre_remote_initialized_toggle_entries[] =
G_END_DECLS
#endif /* __VINAGRE_UI_H__ */
-/* vim: set ts=8: */
diff --git a/vinagre/vinagre-window-private.h b/vinagre/vinagre-window-private.h
index b2fa616..4f11e6e 100644
--- a/vinagre/vinagre-window-private.h
+++ b/vinagre/vinagre-window-private.h
@@ -33,13 +33,10 @@ struct _VinagreWindowPrivate
{
VinagreNotebook *notebook;
VinagreReverseVncListener *listener;
- GtkWidget *fav_panel;
GtkWidget *statusbar;
guint generic_message_cid;
guint tip_message_cid;
- GtkWidget *hpaned;
-
/* Menus & Toolbars */
GtkUIManager *manager;
@@ -60,12 +57,10 @@ struct _VinagreWindowPrivate
gint width;
gint height;
GdkWindowState window_state;
- gint side_panel_size;
gboolean fullscreen;
gboolean toolbar_visible;
gboolean statusbar_visible;
- gboolean fav_panel_visible;
gboolean dispose_has_run;
};
@@ -73,4 +68,3 @@ struct _VinagreWindowPrivate
G_END_DECLS
#endif /* __VINAGRE_WINDOW_PRIVATE_H__ */
-/* vim: set ts=8: */
diff --git a/vinagre/vinagre-window.c b/vinagre/vinagre-window.c
index f904eac..57ef6db 100644
--- a/vinagre/vinagre-window.c
+++ b/vinagre/vinagre-window.c
@@ -34,7 +34,6 @@
#include "vinagre-window.h"
#include "vinagre-notebook.h"
-#include "vinagre-fav.h"
#include "vinagre-prefs.h"
#include "vinagre-cache-prefs.h"
#include "vinagre-bookmarks.h"
@@ -111,9 +110,6 @@ vinagre_window_show_hide_controls (VinagreWindow *window)
{
if (window->priv->fullscreen)
{
- window->priv->fav_panel_visible = gtk_widget_get_visible (window->priv->fav_panel);
- gtk_widget_hide (window->priv->fav_panel);
-
window->priv->toolbar_visible = gtk_widget_get_visible (window->priv->toolbar);
gtk_widget_hide (window->priv->toolbar);
@@ -127,9 +123,6 @@ vinagre_window_show_hide_controls (VinagreWindow *window)
}
else
{
- if (window->priv->fav_panel_visible)
- gtk_widget_show_all (window->priv->fav_panel);
-
if (window->priv->toolbar_visible)
gtk_widget_show_all (window->priv->toolbar);
@@ -471,16 +464,6 @@ create_menu_bar_and_toolbar (VinagreWindow *window,
show_hide_accels (window);
}
-static void
-fav_panel_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
- VinagreWindow *window)
-{
- window->priv->side_panel_size = allocation->width;
- if (window->priv->side_panel_size > 0)
- vinagre_cache_prefs_set_integer ("window", "side-panel-size", window->priv->side_panel_size);
-}
-
/*
* Doubles underscore to avoid spurious menu accels.
*/
@@ -600,10 +583,6 @@ vinagre_window_populate_bookmarks (VinagreWindow *window,
g_object_set_data (G_OBJECT (action), "conn", conn);
gtk_action_group_add_action (p->bookmarks_list_action_group,
action);
- g_signal_connect (action,
- "activate",
- G_CALLBACK (vinagre_fav_bookmarks_open),
- window->priv->fav_panel);
path = g_strdup_printf ("/MenuBar/BookmarksMenu/%s%s", group, parent?parent:"");
gtk_ui_manager_add_ui (p->manager,
@@ -641,9 +620,6 @@ vinagre_window_update_bookmarks_list_menu (VinagreWindow *window)
actions = gtk_action_group_list_actions (p->bookmarks_list_action_group);
for (l = actions; l != NULL; l = l->next)
{
- g_signal_handlers_disconnect_by_func (GTK_ACTION (l->data),
- G_CALLBACK (vinagre_fav_bookmarks_open),
- window->priv->fav_panel);
gtk_action_group_remove_action (p->bookmarks_list_action_group,
GTK_ACTION (l->data));
}
@@ -661,37 +637,11 @@ vinagre_window_update_bookmarks_list_menu (VinagreWindow *window)
}
static void
-create_side_panel (VinagreWindow *window)
-{
- window->priv->fav_panel = vinagre_fav_new (window);
-
- gtk_paned_pack1 (GTK_PANED (window->priv->hpaned),
- window->priv->fav_panel,
- FALSE,
- FALSE);
-
- window->priv->side_panel_size = vinagre_cache_prefs_get_integer ("window", "side-panel-size", 200);
- gtk_paned_set_position (GTK_PANED (window->priv->hpaned), window->priv->side_panel_size);
-
- g_signal_connect (window->priv->fav_panel,
- "size-allocate",
- G_CALLBACK (fav_panel_size_allocate),
- window);
-}
-
-static void
init_widgets_visibility (VinagreWindow *window)
{
GtkAction *action;
gboolean visible;
- /* side panel visibility */
- action = gtk_action_group_get_action (window->priv->always_sensitive_action_group,
- "ViewSidePanel");
- visible = vinagre_cache_prefs_get_boolean ("window", "side-panel-visible", TRUE);
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)) != visible)
- gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible);
-
/* toolbar visibility */
action = gtk_action_group_get_action (window->priv->always_sensitive_action_group,
"ViewToolbar");
@@ -735,16 +685,14 @@ create_statusbar (VinagreWindow *window,
}
static void
-create_notebook (VinagreWindow *window)
+_create_notebook (VinagreWindow *window, GtkWidget *main_box)
{
- window->priv->notebook = vinagre_notebook_new (window);
+ window->priv->notebook = vinagre_notebook_new (window);
- gtk_paned_pack2 (GTK_PANED (window->priv->hpaned),
- GTK_WIDGET (window->priv->notebook),
- TRUE,
- FALSE);
+ gtk_box_pack_start (GTK_BOX (main_box), GTK_WIDGET (window->priv->notebook),
+ TRUE, FALSE, 0);
- gtk_widget_show (GTK_WIDGET (window->priv->notebook));
+ gtk_widget_show (GTK_WIDGET (window->priv->notebook));
}
/* Initialise the reverse connections dialog, and start the listener if it is
@@ -836,21 +784,8 @@ vinagre_window_init (VinagreWindow *window)
/* Add status bar */
create_statusbar (window, main_box);
- /* Add the main area */
- window->priv->hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_box_pack_start (GTK_BOX (main_box),
- window->priv->hpaned,
- TRUE,
- TRUE,
- 0);
-
/* setup notebook area */
- create_notebook (window);
-
- /* side panel */
- create_side_panel (window);
-
- gtk_widget_show (window->priv->hpaned);
+ _create_notebook (window, main_box);
init_widgets_visibility (window);
// vinagre_window_merge_tab_ui (window);
@@ -1029,20 +964,6 @@ vinagre_window_get_connected_action (VinagreWindow *window)
return window->priv->remote_connected_action_group;
}
-/**
- * vinagre_window_get_fav_panel:
- * @window: A window
- *
- * Return value: (transfer none):
- */
-GtkWidget *
-vinagre_window_get_fav_panel (VinagreWindow *window)
-{
- g_return_val_if_fail (VINAGRE_IS_WINDOW (window), NULL);
-
- return window->priv->fav_panel;
-}
-
void
vinagre_window_close_active_tab (VinagreWindow *window)
{
@@ -1156,5 +1077,3 @@ vinagre_window_conn_exists (VinagreWindow *window, VinagreConnection *conn)
return tab;
}
-
-/* vim: set ts=8: */
diff --git a/vinagre/vinagre-window.h b/vinagre/vinagre-window.h
index 435ddf0..100681f 100644
--- a/vinagre/vinagre-window.h
+++ b/vinagre/vinagre-window.h
@@ -72,7 +72,6 @@ void vinagre_window_set_active_tab (VinagreWindow *window,
GtkWidget *vinagre_window_get_statusbar (VinagreWindow *window);
GtkWidget *vinagre_window_get_toolbar (VinagreWindow *window);
GtkWidget *vinagre_window_get_menubar (VinagreWindow *window);
-GtkWidget *vinagre_window_get_fav_panel (VinagreWindow *window);
VinagreNotebook *vinagre_window_get_notebook (VinagreWindow *window);
GtkActionGroup *vinagre_window_get_initialized_action (VinagreWindow *window);
GtkActionGroup *vinagre_window_get_always_sensitive_action (VinagreWindow *window);
@@ -95,4 +94,3 @@ VinagreTab *vinagre_window_conn_exists (VinagreWindow *window,
G_END_DECLS
#endif /* __VINAGRE_WINDOW_H__ */
-/* vim: set ts=8: */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]