ekiga r6584 - in trunk: . src/gui
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6584 - in trunk: . src/gui
- Date: Tue, 12 Aug 2008 20:07:10 +0000 (UTC)
Author: dsandras
Date: Tue Aug 12 20:07:10 2008
New Revision: 6584
URL: http://svn.gnome.org/viewvc/ekiga?rev=6584&view=rev
Log:
Do not present an oversized icon anymore.
Modified:
trunk/ChangeLog
trunk/src/gui/statusicon.cpp
Modified: trunk/src/gui/statusicon.cpp
==============================================================================
--- trunk/src/gui/statusicon.cpp (original)
+++ trunk/src/gui/statusicon.cpp Tue Aug 12 20:07:10 2008
@@ -503,31 +503,39 @@
statusicon_set_status (StatusIcon *statusicon,
guint status)
{
+ GtkFrontend *frontend = NULL;
+ GtkWidget *chat_window = NULL;
+ GdkPixbuf *pixbuf = NULL;
+
g_return_if_fail (statusicon != NULL);
+ frontend = dynamic_cast<GtkFrontend*>(statusicon->priv->core.get ("gtk-frontend"));
+ // FIXME use main_window here
+ chat_window = GTK_WIDGET (frontend->get_chat_window ());
+
/* Update the status icon */
switch (status) {
- case CONTACT_ONLINE:
- gtk_status_icon_set_from_stock (GTK_STATUS_ICON (statusicon), GM_STOCK_STATUS_ONLINE);
- break;
-
case (CONTACT_AWAY):
- gtk_status_icon_set_from_stock (GTK_STATUS_ICON (statusicon), GM_STOCK_STATUS_AWAY);
+ pixbuf = gtk_widget_render_icon (chat_window, GM_STOCK_STATUS_AWAY,
+ GTK_ICON_SIZE_MENU, NULL);
break;
case (CONTACT_DND):
- gtk_status_icon_set_from_stock (GTK_STATUS_ICON (statusicon), GM_STOCK_STATUS_DND);
- break;
-
- case (CONTACT_INVISIBLE):
- gtk_status_icon_set_from_stock (GTK_STATUS_ICON (statusicon), GM_STOCK_STATUS_OFFLINE);
+ pixbuf = gtk_widget_render_icon (chat_window, GM_STOCK_STATUS_DND,
+ GTK_ICON_SIZE_MENU, NULL);
break;
default:
+ case CONTACT_ONLINE:
+ pixbuf = gtk_widget_render_icon (chat_window, GM_STOCK_STATUS_ONLINE,
+ GTK_ICON_SIZE_MENU, NULL);
break;
}
+ gtk_status_icon_set_from_pixbuf (GTK_STATUS_ICON (statusicon), pixbuf);
+ g_object_unref (pixbuf);
+
statusicon->priv->status = status;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]