예제 #1
0
static GdkPixbuf*
get_iface_pixbuf (OobsIface *iface)
{
  GdkPixbuf *pixbuf = NULL;
  const gchar *icon = NULL;

  if (OOBS_IS_IFACE_WIRELESS (iface))
    icon = "mate-dev-wavelan";
  else if (OOBS_IS_IFACE_IRLAN (iface))
    icon = "irda";
  else if (OOBS_IS_IFACE_ETHERNET (iface))
    icon = "mate-dev-ethernet";
  else if (OOBS_IS_IFACE_PLIP (iface))
    icon = "plip";
  else if (OOBS_IS_IFACE_PPP (iface))
    icon = "mate-modem";

  if (icon)
    pixbuf = gtk_icon_theme_load_icon (gst_tool_get_icon_theme (tool),
				       icon, 48, 0, NULL);

  /* fallback to a "generic" icon */
  if (!pixbuf)
    pixbuf = gtk_icon_theme_load_icon (gst_tool_get_icon_theme (tool),
				       "preferences-system-network", 48, 0, NULL);
  return pixbuf;
}
static void
share_nfs_add_static_combo_elements (GtkListStore *store)
{
	GtkTreeIter  iter;
	GdkPixbuf   *pixbuf;

	pixbuf = gtk_icon_theme_load_icon (gst_tool_get_icon_theme (tool),
					   "gnome-fs-network",
					   16, 0, NULL);

	gtk_list_store_append (store, &iter);
	gtk_list_store_set (store, &iter,
			    0, pixbuf,
			    1, _("Specify hostname"),
			    2, NFS_SHARE_HOSTNAME,
			    3, NULL,
			    -1);
	gtk_list_store_append (store, &iter);
	gtk_list_store_set (store, &iter,
			    0, pixbuf,
			    1, _("Specify IP address"),
			    2, NFS_SHARE_ADDRESS,
			    3, NULL,
			    -1);
	gtk_list_store_append (store, &iter);
	gtk_list_store_set (store, &iter,
			    0, pixbuf,
			    1, _("Specify network"),
			    2, NFS_SHARE_NETWORK,
			    3, NULL,
			    -1);
	gdk_pixbuf_unref (pixbuf);
}
예제 #3
0
static GdkPixbuf*
get_share_icon (OobsShare *share)
{
	GdkPixbuf *pixbuf = NULL;

	if (OOBS_IS_SHARE_SMB (share)) {
		pixbuf = gtk_icon_theme_load_icon (gst_tool_get_icon_theme (tool),
						   "gnome-fs-smb",
						   48, 0, NULL);
	} else if (OOBS_IS_SHARE_NFS (share)) {
		pixbuf = gtk_icon_theme_load_icon (gst_tool_get_icon_theme (tool),
						   "gnome-fs-nfs",
						   48, 0, NULL);
	}

	return pixbuf;
}