diff options
author | Felix Kaser <f.kaser@gmx.net> | 2009-12-08 16:59:37 +0800 |
---|---|---|
committer | Felix Kaser <f.kaser@gmx.net> | 2009-12-15 20:52:44 +0800 |
commit | 693487af854d750c32700ef6622473a7953e6643 (patch) | |
tree | 7a37389cd9b752bd0c00646c72068f0605ad441c /src | |
parent | 220c7e08dbcce8325c8695573643e7448d98b9e1 (diff) | |
download | gsoc2013-empathy-693487af854d750c32700ef6622473a7953e6643.tar gsoc2013-empathy-693487af854d750c32700ef6622473a7953e6643.tar.gz gsoc2013-empathy-693487af854d750c32700ef6622473a7953e6643.tar.bz2 gsoc2013-empathy-693487af854d750c32700ef6622473a7953e6643.tar.lz gsoc2013-empathy-693487af854d750c32700ef6622473a7953e6643.tar.xz gsoc2013-empathy-693487af854d750c32700ef6622473a7953e6643.tar.zst gsoc2013-empathy-693487af854d750c32700ef6622473a7953e6643.zip |
added status image to infobar
when disconnected the infobar shows the offline icon
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-accounts-dialog.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index cf1330173..7dd9aa48b 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -80,6 +80,7 @@ typedef struct { GtkWidget *vbox_details; GtkWidget *infobar; GtkWidget *label_status; + GtkWidget *image_status; GtkWidget *frame_no_protocol; GtkWidget *treeview; @@ -195,6 +196,11 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog, _("Disconnected - REASON")); gtk_info_bar_set_message_type (GTK_INFO_BAR (priv->infobar), GTK_MESSAGE_WARNING); + + gtk_image_set_from_icon_name (GTK_IMAGE (priv->image_status), + empathy_icon_name_for_presence ( + TP_CONNECTION_PRESENCE_TYPE_OFFLINE), GTK_ICON_SIZE_SMALL_TOOLBAR); + gtk_widget_show (priv->image_status); break; default: gtk_label_set_text (GTK_LABEL (priv->label_status), @@ -1664,8 +1670,16 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog) gtk_container_add (GTK_CONTAINER (priv->alignment_infobar), priv->infobar); - priv->label_status = gtk_label_new (NULL); + content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (priv->infobar)); + + priv->image_status = gtk_image_new_from_stock ( + GTK_STOCK_INFO, GTK_ICON_SIZE_SMALL_TOOLBAR); + gtk_widget_show (priv->image_status); + gtk_box_pack_start (GTK_BOX (content_area), priv->image_status, + FALSE, FALSE, 0); + + priv->label_status = gtk_label_new (NULL); gtk_container_add (GTK_CONTAINER (content_area), priv->label_status); } |