[vinagre/plugin] Make connection icons work again, based on plugins
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Subject: [vinagre/plugin] Make connection icons work again, based on plugins
- Date: Fri, 24 Jul 2009 18:37:41 +0000 (UTC)
commit 78c1a73904616b634e29388be8d788146f01fea3
Author: Jonh Wendell <jwendell gnome org>
Date: Fri Jul 24 15:36:52 2009 -0300
Make connection icons work again, based on plugins
vinagre/vinagre-connection.c | 8 +-------
vinagre/vinagre-window.c | 6 ++++--
2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/vinagre/vinagre-connection.c b/vinagre/vinagre-connection.c
index eb9640f..efa4647 100644
--- a/vinagre/vinagre-connection.c
+++ b/vinagre/vinagre-connection.c
@@ -479,16 +479,13 @@ vinagre_connection_get_name (VinagreConnection *conn)
GdkPixbuf *
vinagre_connection_get_icon (VinagreConnection *conn)
{
-/*
GdkPixbuf *pixbuf;
GtkIconTheme *icon_theme;
gchar *icon_name;
g_return_val_if_fail (VINAGRE_IS_CONNECTION (conn), NULL);
- g_return_val_if_fail (conn->priv->protocol != VINAGRE_CONNECTION_PROTOCOL_INVALID, NULL);
- icon_name = g_strdup_printf ("application-x-%s",
- vinagre_connection_protos [conn->priv->protocol-1]);
+ icon_name = g_strdup_printf ("application-x-%s", conn->priv->protocol);
icon_theme = gtk_icon_theme_get_default ();
pixbuf = gtk_icon_theme_load_icon (icon_theme,
icon_name,
@@ -498,9 +495,6 @@ vinagre_connection_get_icon (VinagreConnection *conn)
g_free (icon_name);
return pixbuf;
-*/
- // TODO:
- return NULL;
}
gboolean
diff --git a/vinagre/vinagre-window.c b/vinagre/vinagre-window.c
index 00d6295..aa1508e 100644
--- a/vinagre/vinagre-window.c
+++ b/vinagre/vinagre-window.c
@@ -527,7 +527,7 @@ vinagre_window_populate_bookmarks (VinagreWindow *window,
static guint i = 0;
GSList *l;
VinagreBookmarksEntry *entry;
- gchar *action_name, *action_label, *path, *tooltip;
+ gchar *action_name, *action_label, *path, *tooltip, *icon_name;
GtkAction *action;
VinagreWindowPrivate *p = window->priv;
VinagreConnection *conn;
@@ -583,7 +583,9 @@ vinagre_window_populate_bookmarks (VinagreWindow *window,
action_label,
tooltip,
NULL);
- g_object_set (G_OBJECT (action), "icon-name", "application-x-vnc", NULL);
+ icon_name = g_strdup_printf ("application-x-%s", vinagre_connection_get_protocol (conn));
+ g_object_set (G_OBJECT (action), "icon-name", icon_name, NULL);
+ g_free (icon_name);
g_object_set_data (G_OBJECT (action), "conn", conn);
gtk_action_group_add_action (p->bookmarks_list_action_group,
action);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]